1wxBookCtrlBase(3) Erlang Module Definition wxBookCtrlBase(3)
2
3
4
6 wxBookCtrlBase - Functions for wxBookCtrlBase class
7
9 A book control is a convenient way of displaying multiple pages of in‐
10 formation, displayed one page at a time. wxWidgets has five variants of
11 this control:
12
13 This abstract class is the parent of all these book controls, and pro‐
14 vides their basic interface. This is a pure virtual class so you cannot
15 allocate it directly.
16
17 See: Overview bookctrl
18
19 This class is derived (and can use functions) from: wxControl wxWindow
20 wxEvtHandler
21
22 wxWidgets docs: wxBookCtrlBase
23
25 wxBookCtrlBase() = wx:wx_object()
26
28 addPage(This, Page, Text) -> boolean()
29
30 Types:
31
32 This = wxBookCtrlBase()
33 Page = wxWindow:wxWindow()
34 Text = unicode:chardata()
35
36 addPage(This, Page, Text, Options :: [Option]) -> boolean()
37
38 Types:
39
40 This = wxBookCtrlBase()
41 Page = wxWindow:wxWindow()
42 Text = unicode:chardata()
43 Option = {bSelect, boolean()} | {imageId, integer()}
44
45 Adds a new page.
46
47 The page must have the book control itself as the parent and
48 must not have been added to this control previously.
49
50 The call to this function will generate the page changing and
51 page changed events if select is true, but not when inserting
52 the very first page (as there is no previous page selection to
53 switch from in this case and so it wouldn't make sense to e.g.
54 veto such event).
55
56 Return: true if successful, false otherwise.
57
58 Remark: Do not delete the page, it will be deleted by the book
59 control.
60
61 See: insertPage/5
62
63 insertPage(This, Index, Page, Text) -> boolean()
64
65 Types:
66
67 This = wxBookCtrlBase()
68 Index = integer()
69 Page = wxWindow:wxWindow()
70 Text = unicode:chardata()
71
72 insertPage(This, Index, Page, Text, Options :: [Option]) ->
73 boolean()
74
75 Types:
76
77 This = wxBookCtrlBase()
78 Index = integer()
79 Page = wxWindow:wxWindow()
80 Text = unicode:chardata()
81 Option = {bSelect, boolean()} | {imageId, integer()}
82
83 Inserts a new page at the specified position.
84
85 Return: true if successful, false otherwise.
86
87 Remark: Do not delete the page, it will be deleted by the book
88 control.
89
90 See: addPage/4
91
92 deletePage(This, Page) -> boolean()
93
94 Types:
95
96 This = wxBookCtrlBase()
97 Page = integer()
98
99 Deletes the specified page, and the associated window.
100
101 The call to this function generates the page changing events
102 when deleting the currently selected page or a page preceding it
103 in the index order, but it does not send any events when delet‐
104 ing the last page: while in this case the selection also
105 changes, it becomes invalid and for compatibility reasons the
106 control never generates events with the invalid selection index.
107
108 removePage(This, Page) -> boolean()
109
110 Types:
111
112 This = wxBookCtrlBase()
113 Page = integer()
114
115 Deletes the specified page, without deleting the associated win‐
116 dow.
117
118 See deletePage/2 for a note about the events generated by this
119 function.
120
121 deleteAllPages(This) -> boolean()
122
123 Types:
124
125 This = wxBookCtrlBase()
126
127 Deletes all pages.
128
129 getPage(This, Page) -> wxWindow:wxWindow()
130
131 Types:
132
133 This = wxBookCtrlBase()
134 Page = integer()
135
136 Returns the window at the given page position.
137
138 getPageCount(This) -> integer()
139
140 Types:
141
142 This = wxBookCtrlBase()
143
144 Returns the number of pages in the control.
145
146 getCurrentPage(This) -> wxWindow:wxWindow()
147
148 Types:
149
150 This = wxBookCtrlBase()
151
152 Returns the currently selected page or NULL.
153
154 advanceSelection(This) -> ok
155
156 Types:
157
158 This = wxBookCtrlBase()
159
160 advanceSelection(This, Options :: [Option]) -> ok
161
162 Types:
163
164 This = wxBookCtrlBase()
165 Option = {forward, boolean()}
166
167 Cycles through the tabs.
168
169 The call to this function generates the page changing events.
170
171 setSelection(This, Page) -> integer()
172
173 Types:
174
175 This = wxBookCtrlBase()
176 Page = integer()
177
178 Sets the selection to the given page, returning the previous se‐
179 lection.
180
181 Notice that the call to this function generates the page chang‐
182 ing events, use the changeSelection/2 function if you don't want
183 these events to be generated.
184
185 See: getSelection/1
186
187 getSelection(This) -> integer()
188
189 Types:
190
191 This = wxBookCtrlBase()
192
193 Returns the currently selected page, or wxNOT_FOUND if none was
194 selected.
195
196 Note that this method may return either the previously or newly
197 selected page when called from the EVT_BOOKCTRL_PAGE_CHANGED
198 handler depending on the platform and so wxBookCtrlEvent:getSe‐
199 lection/1 should be used instead in this case.
200
201 changeSelection(This, Page) -> integer()
202
203 Types:
204
205 This = wxBookCtrlBase()
206 Page = integer()
207
208 Changes the selection to the given page, returning the previous
209 selection.
210
211 This function behaves as setSelection/2 but does not generate
212 the page changing events.
213
214 See overview_events_prog for more information.
215
216 hitTest(This, Pt) -> Result
217
218 Types:
219
220 Result = {Res :: integer(), Flags :: integer()}
221 This = wxBookCtrlBase()
222 Pt = {X :: integer(), Y :: integer()}
223
224 Returns the index of the tab at the specified position or
225 wxNOT_FOUND if none.
226
227 If flags parameter is non-NULL, the position of the point inside
228 the tab is returned as well.
229
230 Return: Returns the zero-based tab index or wxNOT_FOUND if there
231 is no tab at the specified position.
232
233 getPageText(This, NPage) -> unicode:charlist()
234
235 Types:
236
237 This = wxBookCtrlBase()
238 NPage = integer()
239
240 Returns the string for the given page.
241
242 setPageText(This, Page, Text) -> boolean()
243
244 Types:
245
246 This = wxBookCtrlBase()
247 Page = integer()
248 Text = unicode:chardata()
249
250 Sets the text for the given page.
251
252
253
254wxWidgets team. wx 2.2.2 wxBookCtrlBase(3)