X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/265accbe551ec481a3270b220933a0e99596fb7c..5c35d5c1d984f46d33e8181c907936e96160d795:/docs/latex/wx/tevent.tex diff --git a/docs/latex/wx/tevent.tex b/docs/latex/wx/tevent.tex index 0d0ae34d0b..b86612c155 100644 --- a/docs/latex/wx/tevent.tex +++ b/docs/latex/wx/tevent.tex @@ -211,7 +211,6 @@ here is a list of system events which will NOT get sent to the parent's event ha \twocolitem{\helpref{wxSizeEvent}{wxsizeevent}}{A size event} \twocolitem{\helpref{wxScrollWinEvent}{wxscrollwinevent}}{A scroll event sent by a scrolled window (not a scroll bar)} \twocolitem{\helpref{wxSysColourChangedEvent}{wxsyscolourchangedevent}}{A system colour change event} -\twocolitem{\helpref{wxUpdateUIEvent}{wxupdateuievent}}{A user interface update event} \end{twocollist} In some cases, it might be desired by the programmer to get a certain number @@ -220,6 +219,30 @@ used by, the native controls in a dialog. In this case, a special event handler will have to be written that will override ProcessEvent() in order to pass all events (or any selection of them) to the parent window. + +\subsection{Events generated by the user vs programmatically generated events}\label{progevent} + +While generically \helpref{wxEvents}{wxevent} can be generated both by user +actions (e.g. resize of a \helpref{wxWindow}{wxwindow}) and by calls to functions +(e.g. \helpref{wxWindow::SetSize}{wxwindowsetsize}), wxWidgets controls +normally send \helpref{wxCommandEvent}{wxcommandevent}-derived events only for +the user-generated events. The only {\bf exceptions} to this rule are: + +\begin{twocollist}\itemsep=0pt +\twocolitem{\helpref{wxNotebook::AddPage}{wxnotebookaddpage}}{No event-free alternatives} +\twocolitem{\helpref{wxNotebook::AdvanceSelection}{wxnotebookadvanceselection}}{No event-free alternatives} +\twocolitem{\helpref{wxNotebook::DeletePage}{wxnotebookdeletepage}}{No event-free alternatives} +\twocolitem{\helpref{wxNotebook::SetSelection}{wxnotebooksetselection}}{Use \helpref{wxNotebook::ChangeSelection}{wxnotebookchangeselection} instead, as \helpref{wxNotebook::SetSelection}{wxnotebooksetselection} is deprecated} +\twocolitem{\helpref{wxTreeCtrl::Delete}{wxtreectrldelete}}{No event-free alternatives} +\twocolitem{\helpref{wxTreeCtrl::DeleteAllItems}{wxtreectrldeleteallitems}}{No event-free alternatives} +\twocolitem{\helpref{wxTreeCtrl::EditLabel}{wxtreectrleditlabel}}{No event-free alternatives} +\twocolitem{All \helpref{wxTextCtrl}{wxtextctrl} methods}{\helpref{wxTextCtrl::ChangeValue}{wxtextctrlchangevalue} can be used instead +of \helpref{wxTextCtrl::SetValue}{wxtextctrlsetvalue} but the other functions, +such as \helpref{Replace}{wxtextctrlreplace} or \helpref{WriteText}{wxtextctrlwritetext} +don't have event-free equivalents} +\end{twocollist} + + % VZ: it doesn't work like this, but just in case we ever reenable this % behaviour, I leave it here % @@ -447,7 +470,7 @@ DEFINE_EVENT_TYPE(wxEVT_MY_EVENT) BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU (wxID_EXIT, MyFrame::OnExit) // .... - EVT_COMMAND (wxEVT_MY_EVENT, ID_MY_WINDOW, MyFrame::OnMyEvent) + EVT_COMMAND (ID_MY_WINDOW, wxEVT_MY_EVENT, MyFrame::OnMyEvent) END_EVENT_TABLE() void MyFrame::OnMyEvent( wxCommandEvent &event )