.TH wxBookCtrlEvent 3erl "wx 2.2.2.1" "wxWidgets team." "Erlang Module Definition" .SH NAME wxBookCtrlEvent \- Functions for wxBookCtrlEvent class .SH DESCRIPTION .LP This class represents the events generated by book controls (\fIwxNotebook\fR\&, \fIwxListbook\fR\&, \fIwxChoicebook\fR\&, \fIwxTreebook\fR\&, \fIwxAuiNotebook\fR\&)\&. .LP The PAGE_CHANGING events are sent before the current page is changed\&. It allows the program to examine the current page (which can be retrieved with \fIgetOldSelection/1\fR\&) and to veto the page change by calling \fIwxNotifyEvent:veto/1\fR\& if, for example, the current values in the controls of the old page are invalid\&. .LP The PAGE_CHANGED events are sent after the page has been changed and the program cannot veto it any more, it just informs it about the page change\&. .LP To summarize, if the program is interested in validating the page values before allowing the user to change it, it should process the PAGE_CHANGING event, otherwise PAGE_CHANGED is probably enough\&. In any case, it is probably unnecessary to process both events at once\&. .LP See: \fIwxNotebook\fR\&, \fIwxListbook\fR\&, \fIwxChoicebook\fR\&, \fIwxTreebook\fR\&, \fIwxToolbook\fR\&, \fIwxAuiNotebook\fR\& .LP This class is derived (and can use functions) from: \fIwxNotifyEvent\fR\& \fIwxCommandEvent\fR\& \fIwxEvent\fR\& .LP wxWidgets docs: wxBookCtrlEvent .SH DATA TYPES .nf \fBwxBookCtrlEvent()\fR\& = wx:wx_object() .br .fi .nf \fBwxBookCtrl()\fR\& = .br #wxBookCtrl{type = wxBookCtrlEvent:wxBookCtrlEventType(), .br nSel = integer(), .br nOldSel = integer()} .br .fi .nf \fBwxBookCtrlEventType()\fR\& = .br command_notebook_page_changed | .br command_notebook_page_changing | choicebook_page_changed | .br choicebook_page_changing | treebook_page_changed | .br treebook_page_changing | toolbook_page_changed | .br toolbook_page_changing | listbook_page_changed | .br listbook_page_changing .br .fi .SH EXPORTS .LP .nf .B getOldSelection(This) -> integer() .br .fi .br .RS .LP Types: .RS 3 This = wxBookCtrlEvent() .br .RE .RE .RS .LP Returns the page that was selected before the change, \fIwxNOT_FOUND\fR\& if none was selected\&. .RE .LP .nf .B getSelection(This) -> integer() .br .fi .br .RS .LP Types: .RS 3 This = wxBookCtrlEvent() .br .RE .RE .RS .LP Returns the currently selected page, or \fIwxNOT_FOUND\fR\& if none was selected\&. .LP Note: under Windows, \fIgetSelection/1\fR\& will return the same value as \fIgetOldSelection/1\fR\& when called from the \fIEVT_BOOKCTRL_PAGE_CHANGING\fR\& handler and not the page which is going to be selected\&. .RE .LP .nf .B setOldSelection(This, Page) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxBookCtrlEvent() .br Page = integer() .br .RE .RE .RS .LP Sets the id of the page selected before the change\&. .RE .LP .nf .B setSelection(This, Page) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxBookCtrlEvent() .br Page = integer() .br .RE .RE .RS .LP Sets the selection member variable\&. .RE