1wxBookCtrlEvent(3) Erlang Module Definition wxBookCtrlEvent(3)
2
3
4
6 wxBookCtrlEvent - Functions for wxBookCtrlEvent class
7
9 This class represents the events generated by book controls (wxNote‐
10 book, wxListbook, wxChoicebook, wxTreebook, wxAuiNotebook).
11
12 The PAGE_CHANGING events are sent before the current page is changed.
13 It allows the program to examine the current page (which can be re‐
14 trieved with getOldSelection/1) and to veto the page change by calling
15 wxNotifyEvent:veto/1 if, for example, the current values in the con‐
16 trols of the old page are invalid.
17
18 The PAGE_CHANGED events are sent after the page has been changed and
19 the program cannot veto it any more, it just informs it about the page
20 change.
21
22 To summarize, if the program is interested in validating the page val‐
23 ues before allowing the user to change it, it should process the
24 PAGE_CHANGING event, otherwise PAGE_CHANGED is probably enough. In any
25 case, it is probably unnecessary to process both events at once.
26
27 See: wxNotebook, wxListbook, wxChoicebook, wxTreebook, wxToolbook, wx‐
28 AuiNotebook
29
30 This class is derived (and can use functions) from: wxNotifyEvent wx‐
31 CommandEvent wxEvent
32
33 wxWidgets docs: wxBookCtrlEvent
34
36 wxBookCtrlEvent() = wx:wx_object()
37
38 wxBookCtrl() =
39 #wxBookCtrl{type = wxBookCtrlEvent:wxBookCtrlEventType(),
40 nSel = integer(),
41 nOldSel = integer()}
42
43 wxBookCtrlEventType() =
44 command_notebook_page_changed |
45 command_notebook_page_changing | choicebook_page_changed |
46 choicebook_page_changing | treebook_page_changed |
47 treebook_page_changing | toolbook_page_changed |
48 toolbook_page_changing | listbook_page_changed |
49 listbook_page_changing
50
52 getOldSelection(This) -> integer()
53
54 Types:
55
56 This = wxBookCtrlEvent()
57
58 Returns the page that was selected before the change,
59 wxNOT_FOUND if none was selected.
60
61 getSelection(This) -> integer()
62
63 Types:
64
65 This = wxBookCtrlEvent()
66
67 Returns the currently selected page, or wxNOT_FOUND if none was
68 selected.
69
70 Note: under Windows, getSelection/1 will return the same value
71 as getOldSelection/1 when called from the EVT_BOOKC‐
72 TRL_PAGE_CHANGING handler and not the page which is going to be
73 selected.
74
75 setOldSelection(This, Page) -> ok
76
77 Types:
78
79 This = wxBookCtrlEvent()
80 Page = integer()
81
82 Sets the id of the page selected before the change.
83
84 setSelection(This, Page) -> ok
85
86 Types:
87
88 This = wxBookCtrlEvent()
89 Page = integer()
90
91 Sets the selection member variable.
92
93
94
95wxWidgets team. wx 2.2.2 wxBookCtrlEvent(3)