]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/noteevt.tex
1. wxHtmlHelpController and related classes
[wxWidgets.git] / docs / latex / wx / noteevt.tex
CommitLineData
3972fb49
JS
1\section{\class{wxNotebookEvent}}\label{wxnotebookevent}
2
4d0f3cd6
VZ
3This class represents the events generated by a notebook control: currently,
4there are two of them. The PAGE\_CHANGING event is sent before the current
5page is changed. It allows to the program to examine the current page (which
6can be retrieved with
7\helpref{GetOldSelection()}wxnotebookeventgetoldselection}) and to veto the page
8change by calling \helpref{Veto()}{wxnotifyeventveto} if, for example, the
9current values in the controls of the old page are invalid.
10
11The second event - PAGE\_CHANGED - is sent after the page has been changed and
12the program cannot veto it any more, it just informs it about the page change.
13
14To summarize, if the program is interested in validating the page values
15before allowing the user to change it, it should process the PAGE\_CHANGING
16event, otherwise PAGE\_CHANGED is probably enough. In any case, it is probably
17unnecessary to process both events at once.
3972fb49
JS
18
19\wxheading{Derived from}
20
4d0f3cd6 21\helpref{wxNotifyEvent}{wxnotifyevent}\\
3972fb49
JS
22\helpref{wxCommandEvent}{wxcommandevent}\\
23\helpref{wxEvent}{wxevent}\\
24\helpref{wxEvtHandler}{wxevthandler}\\
25\helpref{wxObject}{wxobject}
26
954b8ae6
JS
27\wxheading{Include files}
28
29<wx/notebook.h>
30
3972fb49
JS
31\wxheading{Event table macros}
32
33To process a notebook event, use these event handler macros to direct input to member
34functions that take a wxNotebookEvent argument.
35
36\twocolwidtha{7cm}
37\begin{twocollist}\itemsep=0pt
2432b92d 38\twocolitem{{\bf EVT\_NOTEBOOK\_PAGE\_CHANGED(id, func)}}{The page selection was changed. Processes a
3972fb49 39wxEVT\_COMMAND\_NOTEBOOK\_PAGE\_CHANGED event.}
2432b92d 40\twocolitem{{\bf EVT\_NOTEBOOK\_PAGE\_CHANGING(id, func)}}{The page selection is about to be changed.
fd128b0c 41Processes a wxEVT\_COMMAND\_NOTEBOOK\_PAGE\_CHANGING event. This event can be \helpref{vetoed}{wxnotifyeventveto}.}
3972fb49
JS
42\end{twocollist}%
43
44\wxheading{See also}
45
46\helpref{wxNotebook}{wxnotebook}, \helpref{wxTabCtrl}{wxtabctrl}, \helpref{wxTabEvent}{wxtabevent}
47
48\latexignore{\rtfignore{\wxheading{Members}}}
49
50\membersection{wxNotebookEvent::wxNotebookEvent}\label{wxnotebookeventconstr}
51
52\func{}{wxNotebookEvent}{\param{wxEventType}{ eventType = wxEVT\_NULL},
53 \param{int}{ id = 0}, \param{int}{ sel = -1}, \param{int}{ oldSel = -1}}
54
4d0f3cd6 55Constructor (used internally by wxWindows only).
3972fb49
JS
56
57\membersection{wxNotebookEvent::GetOldSelection}\label{wxnotebookeventgetoldselection}
58
59\constfunc{int}{GetOldSelection}{\void}
60
61Returns the page that was selected before the change, -1 if none was selected.
62
63\membersection{wxNotebookEvent::GetSelection}\label{wxnotebookeventgetselection}
64
65\constfunc{int}{GetSelection}{\void}
66
67Returns the currently selected page, or -1 if none was selected.
68
69\membersection{wxNotebookEvent::SetOldSelection}\label{wxnotebookeventsetoldselection}
70
71\func{void}{SetOldSelection}{\param{int}{ page}}
72
73Sets the id of the page selected before the change.
74
75\membersection{wxNotebookEvent::SetSelection}\label{wxnotebookeventsetselection}
76
77\func{void}{SetSelection}{\param{int}{ page}}
78
79Sets the selection member variable.
80
81\wxheading{See also}
82
83\helpref{wxNotebookEvent::GetSelection}{wxnotebookeventgetselection}
84
85