X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b656febdf03cfa90ed14151cdf3d56a685f8af74..a84ece11fffdde5d1bbd254ba58ac3cee79c2e77:/docs/latex/wx/notebook.tex diff --git a/docs/latex/wx/notebook.tex b/docs/latex/wx/notebook.tex index e25921c0c5..a35d4dd3f6 100644 --- a/docs/latex/wx/notebook.tex +++ b/docs/latex/wx/notebook.tex @@ -33,18 +33,7 @@ managed by wxNotebook. See also \helpref{window styles overview}{windowstyles}. - -\wxheading{Event handling} - -To process input from a notebook control, use the following event handler macros to direct input to member -functions that take a \helpref{wxNotebookEvent}{wxnotebookevent} argument. - -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_NOTEBOOK\_PAGE\_CHANGED(id, func)}}{The page selection was changed.} -\twocolitem{{\bf EVT\_NOTEBOOK\_PAGE\_CHANGING(id, func)}}{The page selection is about to be changed. -This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.} -\end{twocollist}% +\input noteevt.inc \wxheading{See also} @@ -60,7 +49,7 @@ This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.} Default constructor. \func{}{wxNotebook}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id}, \param{const wxPoint\&}{ pos = wxDefaultPosition}, - \param{const wxSize\&}{ size}, \param{long}{ style = 0}, \param{const wxString\& }{name = "notebook"}} + \param{const wxSize\&}{ size = wxDefaultSize}, \param{long}{ style = 0}, \param{const wxString\& }{name = "notebook"}} Constructs a notebook control. @@ -199,7 +188,13 @@ Returns the number of rows in the notebook control. \constfunc{int}{GetSelection}{\void} -Returns the currently selected page, or -1 if none was selected. +Returns the currently selected page, or $-1$ if none was selected. + +Note that this method may return either the previously or newly selected page +when called from the {\tt EVT\_NOTEBOOK\_PAGE\_CHANGED} handler depending on +the platform and so\rtfsp +\helpref{wxNotebookEvent::GetSelection}{wxnotebookeventgetselection} should be +used instead in this case. \membersection{wxNotebook::InsertPage}\label{wxnotebookinsertpage}