]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/noteevt.tex
ugh. Nesting the (per class) plugin sentries can require them to
[wxWidgets.git] / docs / latex / wx / noteevt.tex
... / ...
CommitLineData
1\section{\class{wxNotebookEvent}}\label{wxnotebookevent}
2
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.
18
19\wxheading{Derived from}
20
21\helpref{wxNotifyEvent}{wxnotifyevent}\\
22\helpref{wxCommandEvent}{wxcommandevent}\\
23\helpref{wxEvent}{wxevent}\\
24\helpref{wxEvtHandler}{wxevthandler}\\
25\helpref{wxObject}{wxobject}
26
27\wxheading{Include files}
28
29<wx/notebook.h>
30
31\input noteevt.inc
32
33\wxheading{See also}
34
35\helpref{wxNotebook}{wxnotebook}, \helpref{wxTabCtrl}{wxtabctrl}, \helpref{wxTabEvent}{wxtabevent}
36
37\latexignore{\rtfignore{\wxheading{Members}}}
38
39\membersection{wxNotebookEvent::wxNotebookEvent}\label{wxnotebookeventconstr}
40
41\func{}{wxNotebookEvent}{\param{wxEventType}{ eventType = wxEVT\_NULL},
42 \param{int}{ id = 0}, \param{int}{ sel = $-1$}, \param{int}{ oldSel = $-1$}}
43
44Constructor (used internally by wxWindows only).
45
46\membersection{wxNotebookEvent::GetOldSelection}\label{wxnotebookeventgetoldselection}
47
48\constfunc{int}{GetOldSelection}{\void}
49
50Returns the page that was selected before the change, $-1$ if none was selected.
51
52\membersection{wxNotebookEvent::GetSelection}\label{wxnotebookeventgetselection}
53
54\constfunc{int}{GetSelection}{\void}
55
56Returns the currently selected page, or $-1$ if none was selected.
57
58{\bf NB:} under Windows, GetSelection() will return the same value as\rtfsp
59\helpref{GetOldSelection()}{wxnotebookeventgetoldselection} when called from
60{\tt EVT\_NOTEBOOK\_PAGE\_CHANGING} handler and not the page which is going to
61be selected.
62
63\membersection{wxNotebookEvent::SetOldSelection}\label{wxnotebookeventsetoldselection}
64
65\func{void}{SetOldSelection}{\param{int}{ page}}
66
67Sets the id of the page selected before the change.
68
69\membersection{wxNotebookEvent::SetSelection}\label{wxnotebookeventsetselection}
70
71\func{void}{SetSelection}{\param{int}{ page}}
72
73Sets the selection member variable.
74
75\wxheading{See also}
76
77\helpref{wxNotebookEvent::GetSelection}{wxnotebookeventgetselection}
78
79