X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/debe6624c1e9d4bf3243381153d1e173c849bcd8..e531b73f8910b3dcb2457bb74eb3723f2d516f5f:/docs/latex/wx/cmdevent.tex diff --git a/docs/latex/wx/cmdevent.tex b/docs/latex/wx/cmdevent.tex index 2b2a9d6841..f129cfc0ce 100644 --- a/docs/latex/wx/cmdevent.tex +++ b/docs/latex/wx/cmdevent.tex @@ -7,6 +7,10 @@ simple controls. More complex controls, such as \helpref{wxTreeCtrl}{wxtreectrl} \helpref{wxEvent}{wxevent} +\wxheading{Include files} + + + \wxheading{Event table macros} To process a menu command event, use these event handler macros to direct input to member @@ -14,9 +18,9 @@ functions that take a wxCommandEvent argument. \twocolwidtha{7cm} \begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_COMMAND(id, cmd, func)}}{Process a command, supplying the window identifier, +\twocolitem{{\bf EVT\_COMMAND(id, event, func)}}{Process a command, supplying the window identifier, command event identifier, and member function.} -\twocolitem{{\bf EVT\_COMMAND\_RANGE(id1, id2, cmd, func)}}{Process a command for a range +\twocolitem{{\bf EVT\_COMMAND\_RANGE(id1, id2, event, func)}}{Process a command for a range of window identifiers, supplying the minimum and maximum window identifiers, command event identifier, and member function.} \twocolitem{{\bf EVT\_BUTTON(id, func)}}{Process a wxEVT\_COMMAND\_BUTTON\_CLICKED command, @@ -27,12 +31,18 @@ which is generated by a wxCheckBox control.} which is generated by a wxChoice control.} \twocolitem{{\bf EVT\_LISTBOX(id, func)}}{Process a wxEVT\_COMMAND\_LISTBOX\_SELECTED command, which is generated by a wxListBox control.} -\twocolitem{{\bf EVT\_LISTBOX_DCLICK(id, func)}}{Process a wxEVT\_COMMAND\_LISTBOX\_DOUBLECLICKED command, +\twocolitem{{\bf EVT\_LISTBOX\_DCLICK(id, func)}}{Process a wxEVT\_COMMAND\_LISTBOX\_DOUBLECLICKED command, which is generated by a wxListBox control.} \twocolitem{{\bf EVT\_TEXT(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_UPDATED command, which is generated by a wxTextCtrl control.} \twocolitem{{\bf EVT\_TEXT\_ENTER(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_ENTER command, -which is generated by a wxTextCtrl control.} +which is generated by a wxTextCtrl control. Note that you must use +wxTE\_PROCESS\_ENTER flag when creating the control if you want it to generate +such events.} +\twocolitem{{\bf EVT\_TEXT\_MAXLEN(id, func)}}{Process a wxEVT\_COMMAND\_TEXT\_MAXLEN command, +which is generated by a wxTextCtrl control when the user tries to enter more +characters into it than the limit previosuly set with +\helpref{SetMaxLength}{wxtextctrlsetmaxlength}.} \twocolitem{{\bf EVT\_MENU(id, func)}}{Process a wxEVT\_COMMAND\_MENU\_SELECTED command, which is generated by a menu item.} \twocolitem{{\bf EVT\_MENU\_RANGE(id1, id2, func)}}{Process a wxEVT\_COMMAND\_MENU\_RANGE command, @@ -48,12 +58,16 @@ which is generated by a wxScrollBar control. This is provided for compatibility more specific scrollbar event macros should be used instead (see \helpref{wxScrollEvent}{wxscrollevent}).} \twocolitem{{\bf EVT\_COMBOBOX(id, func)}}{Process a wxEVT\_COMMAND\_COMBOBOX\_SELECTED command, which is generated by a wxComboBox control.} -\twocolitem{{\bf EVT\_TOOL(id, func)}}{Process a wxEVT\_COMMAND\_TOOL\_CLICKED command, -which is generated by a toobar button.} -\twocolitem{{\bf EVT\_TOOL\_RCLICKED(id, func)}}{Process a wxEVT\_COMMAND\_TOOL\_RCLICKED command, -which is generated by a toobar button.} -\twocolitem{{\bf EVT\_TOOL\_ENTER(id, func)}}{Process a wxEVT\_COMMAND\_TOOL\_ENTER command, -which is generated by a toobar button.} +\twocolitem{{\bf EVT\_TOOL(id, func)}}{Process a wxEVT\_COMMAND\_TOOL\_CLICKED event +(a synonym for wxEVT\_COMMAND\_MENU\_SELECTED). Pass the id of the tool.} +\twocolitem{{\bf EVT\_TOOL\_RANGE(id1, id2, func)}}{Process a wxEVT\_COMMAND\_TOOL\_CLICKED event +for a range id identifiers. Pass the ids of the tools.} +\twocolitem{{\bf EVT\_TOOL\_RCLICKED(id, func)}}{Process a wxEVT\_COMMAND\_TOOL\_RCLICKED event. +Pass the id of the tool.} +\twocolitem{{\bf EVT\_TOOL\_RCLICKED\_RANGE(id1, id2, func)}}{Process a wxEVT\_COMMAND\_TOOL\_RCLICKED event +for a range of ids. Pass the ids of the tools.} +\twocolitem{{\bf EVT\_TOOL\_ENTER(id, func)}}{Process a wxEVT\_COMMAND\_TOOL\_ENTER event. +Pass the id of the toolbar itself. The value of wxCommandEvent::GetSelection is the tool id, or -1 if the mouse cursor has moved off a tool.} \twocolitem{{\bf EVT\_COMMAND\_LEFT\_CLICK(id, func)}}{Process a wxEVT\_COMMAND\_LEFT\_CLICK command, which is generated by a control (Windows 95 and NT only).} \twocolitem{{\bf EVT\_COMMAND\_LEFT\_DCLICK(id, func)}}{Process a wxEVT\_COMMAND\_LEFT\_DCLICK command, @@ -72,10 +86,10 @@ which is generated by a control.} \membersection{wxCommandEvent::m\_clientData} -\member{char*}{m\_clientData} +\member{void*}{m\_clientData} Contains a pointer to client data for listboxes and choices, if the event -was a selection. +was a selection. Beware, this is not implemented anyway... \membersection{wxCommandEvent::m\_commandInt} @@ -109,13 +123,13 @@ Constructor. \membersection{wxCommandEvent::Checked} -\func{bool}{Checked}{\void} +\constfunc{bool}{Checked}{\void} -Returns TRUE or FALSE for a checkbox selection event. +Deprecated, use \helpref{IsChecked}{wxcommandeventischecked} instead. \membersection{wxCommandEvent::GetClientData} -\func{char*}{GetClientData}{\void} +\func{void*}{GetClientData}{\void} Returns client data pointer for a listbox or choice selection event (not valid for a deselection). @@ -146,6 +160,16 @@ a deselection). Returns item string for a listbox or choice selection event (not valid for a deselection). +\membersection{wxCommandEvent::IsChecked}\label{wxcommandeventischecked} + +\constfunc{bool}{IsChecked}{\void} + +This method can be used with checkbox and menu events: for the checkboxes, the +method returns {\tt TRUE} for a selection event and {\tt FALSE} for a +deselection one. For the menu events, this method indicates if the menu item +just has become checked or unchecked (and thus only makes sense for checkable +menu items). + \membersection{wxCommandEvent::IsSelection} \func{bool}{IsSelection}{\void} @@ -155,7 +179,7 @@ is a deselection. \membersection{wxCommandEvent::SetClientData} -\func{void}{SetClientData}{\param{char*}{ clientData}} +\func{void}{SetClientData}{\param{void*}{ clientData}} Sets the client data for this event.