X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3972fb4919148d1ed67f897ea5beb67eedd662f6..5c35d5c1d984f46d33e8181c907936e96160d795:/docs/latex/wx/accel.tex diff --git a/docs/latex/wx/accel.tex b/docs/latex/wx/accel.tex index 14aacf7843..304dbb3439 100644 --- a/docs/latex/wx/accel.tex +++ b/docs/latex/wx/accel.tex @@ -6,13 +6,17 @@ An object used by an application wishing to create an \helpref{accelerator table None +\wxheading{Include files} + + + \wxheading{See also} \helpref{wxAcceleratorTable}{wxacceleratortable}, \helpref{wxWindow::SetAcceleratorTable}{wxwindowsetacceleratortable} \latexignore{\rtfignore{\wxheading{Members}}} -\membersection{wxAcceleratorEntry::wxAcceleratorEntry}\label{wxacceleratorentryconstr} +\membersection{wxAcceleratorEntry::wxAcceleratorEntry}\label{wxacceleratorentryctor} \func{}{wxAcceleratorEntry}{\void} @@ -24,7 +28,7 @@ Constructor. \wxheading{Parameters} -\docparam{flags}{One of wxACCEL\_SHIFT, wxACCEL\_CTRL and wxACCEL\_NORMAL. Indicates +\docparam{flags}{One of wxACCEL\_ALT, wxACCEL\_SHIFT, wxACCEL\_CTRL and wxACCEL\_NORMAL. Indicates which modifier key is held down.} \docparam{keyCode}{The keycode to be detected. See \helpref{Keycodes}{keycodes} for a full list of keycodes.} @@ -57,7 +61,7 @@ Sets the accelerator entry parameters. \wxheading{Parameters} -\docparam{flags}{One of wxACCEL\_SHIFT, wxACCEL\_CTRL and wxACCEL\_NORMAL. Indicates +\docparam{flags}{One of wxACCEL\_ALT, wxACCEL\_SHIFT, wxACCEL\_CTRL and wxACCEL\_NORMAL. Indicates which modifier key is held down.} \docparam{keyCode}{The keycode to be detected. See \helpref{Keycodes}{keycodes} for a full list of keycodes.} @@ -77,6 +81,10 @@ initial accelerator table for a window. \helpref{wxObject}{wxobject} +\wxheading{Include files} + + + \wxheading{Example} {\small% @@ -85,17 +93,17 @@ initial accelerator table for a window. entries[0].Set(wxACCEL_CTRL, (int) 'N', ID_NEW_WINDOW); entries[1].Set(wxACCEL_CTRL, (int) 'X', wxID_EXIT); entries[2].Set(wxACCEL_SHIFT, (int) 'A', ID_ABOUT); - entries[3].Set(wxACCEL_NONE, WXK_DELETE, wxID_CUT); + entries[3].Set(wxACCEL_NORMAL, WXK_DELETE, wxID_CUT); wxAcceleratorTable accel(4, entries); frame->SetAcceleratorTable(accel); \end{verbatim} -} +}% \wxheading{Remarks} An accelerator takes precedence over normal processing and can be a convenient way to program some event handling. For example, you can use an accelerator table to enable a dialog with a multi-line text control to -accept CTRL-Enter as meaning 'OK' (but not in GTK at present). +accept CTRL-Enter as meaning `OK' (but not in GTK+ at present). \wxheading{See also} @@ -103,7 +111,7 @@ accept CTRL-Enter as meaning 'OK' (but not in GTK at present). \latexignore{\rtfignore{\wxheading{Members}}} -\membersection{wxAcceleratorTable::wxAcceleratorTable}\label{wxacceleratortableconstr} +\membersection{wxAcceleratorTable::wxAcceleratorTable}\label{wxacceleratortablector} \func{}{wxAcceleratorTable}{\void} @@ -111,7 +119,7 @@ Default constructor. \func{}{wxAcceleratorTable}{\param{const wxAcceleratorTable\& }{bitmap}} -Copy constructor. +Copy constructor, uses \helpref{reference counting}{trefcount}. \func{}{wxAcceleratorTable}{\param{int}{ n}, \param{wxAcceleratorEntry}{ entries[]}} @@ -129,25 +137,31 @@ Loads the accelerator table from a Windows resource (Windows only). \docparam{resource}{Name of a Windows accelerator.} -\membersection{wxAcceleratorTable::\destruct{wxAcceleratorTable}} +\pythonnote{The wxPython constructor accepts a list of +wxAcceleratorEntry objects, or 3-tuples consisting of flags, keyCode, +and cmd values like you would construct wxAcceleratorEntry objects with.} + +\perlnote{The wxPerl constructor accepts a list of either + Wx::AcceleratorEntry objects or references to 3-element arrays + ( flags, keyCode, cmd ), like the parameters of Wx::AcceleratorEntry::new.} + +\membersection{wxAcceleratorTable::\destruct{wxAcceleratorTable}}\label{wxacceleratortabledtor} \func{}{\destruct{wxAcceleratorTable}}{\void} Destroys the wxAcceleratorTable object. -\membersection{wxAcceleratorTable::Ok}\label{wxacceleratortableok} +\membersection{wxAcceleratorTable::IsOk}\label{wxacceleratortableisok} -\constfunc{bool}{Ok}{\void} +\constfunc{bool}{IsOk}{\void} -Returns TRUE if the accelerator table is valid. +Returns true if the accelerator table is valid. -\membersection{wxAcceleratorTable::operator $=$} +\membersection{wxAcceleratorTable::operator $=$}\label{wxacceleratortableassign} \func{wxAcceleratorTable\& }{operator $=$}{\param{const wxAcceleratorTable\& }{accel}} -Assignment operator. This operator does not copy any data, but instead -passes a pointer to the data in {\it accel} and increments a reference -counter. It is a fast operation. +Assignment operator, using \helpref{reference counting}{trefcount}. \wxheading{Parameters} @@ -155,9 +169,9 @@ counter. It is a fast operation. \wxheading{Return value} -Returns 'this' object. +Returns reference to this object. -\membersection{wxAcceleratorTable::operator $==$} +\membersection{wxAcceleratorTable::operator $==$}\label{wxacceleratortableequal} \func{bool}{operator $==$}{\param{const wxAcceleratorTable\& }{accel}} @@ -166,13 +180,13 @@ equal (a fast test). \wxheading{Parameters} -\docparam{accel}{Accelerator table to compare with 'this'} +\docparam{accel}{Accelerator table to compare with} \wxheading{Return value} -Returns TRUE if the accelerator tables were effectively equal, FALSE otherwise. +Returns true if the accelerator tables were effectively equal, false otherwise. -\membersection{wxAcceleratorTable::operator $!=$} +\membersection{wxAcceleratorTable::operator $!=$}\label{wxacceleratortablenotequal} \func{bool}{operator $!=$}{\param{const wxAcceleratorTable\& }{accel}} @@ -181,10 +195,10 @@ unequal (a fast test). \wxheading{Parameters} -\docparam{accel}{Accelerator table to compare with 'this'} +\docparam{accel}{Accelerator table to compare with} \wxheading{Return value} -Returns TRUE if the accelerator tables were unequal, FALSE otherwise. +Returns true if the accelerator tables were unequal, false otherwise.