1wxListbook(3) Erlang Module Definition wxListbook(3)
2
3
4
6 wxListbook - Functions for wxListbook class
7
9 wxListbook is a class similar to wxNotebook but which uses a wxListCtrl
10 to show the labels instead of the tabs.
11
12 The underlying wxListCtrl displays page labels in a one-column report
13 view by default. Calling wxBookCtrl::SetImageList will implicitly
14 switch the control to use an icon view.
15
16 For usage documentation of this class, please refer to the base ab‐
17 stract class wxBookCtrl. You can also use the page_samples_notebook to
18 see wxListbook in action.
19
20 Styles
21
22 This class supports the following styles:
23
24 See: ?wxBookCtrl, wxNotebook, Examples
25
26 This class is derived (and can use functions) from: wxBookCtrlBase wx‐
27 Control wxWindow wxEvtHandler
28
29 wxWidgets docs: wxListbook
30
32 Event types emitted from this class: listbook_page_changed, list‐
33 book_page_changing
34
36 wxListbook() = wx:wx_object()
37
39 new() -> wxListbook()
40
41 Default ctor.
42
43 new(Parent, Id) -> wxListbook()
44
45 Types:
46
47 Parent = wxWindow:wxWindow()
48 Id = integer()
49
50 new(Parent, Id, Options :: [Option]) -> wxListbook()
51
52 Types:
53
54 Parent = wxWindow:wxWindow()
55 Id = integer()
56 Option =
57 {pos, {X :: integer(), Y :: integer()}} |
58 {size, {W :: integer(), H :: integer()}} |
59 {style, integer()}
60
61 Constructs a listbook control.
62
63 addPage(This, Page, Text) -> boolean()
64
65 Types:
66
67 This = wxListbook()
68 Page = wxWindow:wxWindow()
69 Text = unicode:chardata()
70
71 addPage(This, Page, Text, Options :: [Option]) -> boolean()
72
73 Types:
74
75 This = wxListbook()
76 Page = wxWindow:wxWindow()
77 Text = unicode:chardata()
78 Option = {bSelect, boolean()} | {imageId, integer()}
79
80 Adds a new page.
81
82 The page must have the book control itself as the parent and
83 must not have been added to this control previously.
84
85 The call to this function will generate the page changing and
86 page changed events if select is true, but not when inserting
87 the very first page (as there is no previous page selection to
88 switch from in this case and so it wouldn't make sense to e.g.
89 veto such event).
90
91 Return: true if successful, false otherwise.
92
93 Remark: Do not delete the page, it will be deleted by the book
94 control.
95
96 See: insertPage/5
97
98 advanceSelection(This) -> ok
99
100 Types:
101
102 This = wxListbook()
103
104 advanceSelection(This, Options :: [Option]) -> ok
105
106 Types:
107
108 This = wxListbook()
109 Option = {forward, boolean()}
110
111 Cycles through the tabs.
112
113 The call to this function generates the page changing events.
114
115 assignImageList(This, ImageList) -> ok
116
117 Types:
118
119 This = wxListbook()
120 ImageList = wxImageList:wxImageList()
121
122 Sets the image list for the page control and takes ownership of
123 the list.
124
125 See: wxImageList, setImageList/2
126
127 create(This, Parent, Id) -> boolean()
128
129 Types:
130
131 This = wxListbook()
132 Parent = wxWindow:wxWindow()
133 Id = integer()
134
135 create(This, Parent, Id, Options :: [Option]) -> boolean()
136
137 Types:
138
139 This = wxListbook()
140 Parent = wxWindow:wxWindow()
141 Id = integer()
142 Option =
143 {pos, {X :: integer(), Y :: integer()}} |
144 {size, {W :: integer(), H :: integer()}} |
145 {style, integer()}
146
147 Create the list book control that has already been constructed
148 with the default constructor.
149
150 deleteAllPages(This) -> boolean()
151
152 Types:
153
154 This = wxListbook()
155
156 Deletes all pages.
157
158 getCurrentPage(This) -> wxWindow:wxWindow()
159
160 Types:
161
162 This = wxListbook()
163
164 Returns the currently selected page or NULL.
165
166 getImageList(This) -> wxImageList:wxImageList()
167
168 Types:
169
170 This = wxListbook()
171
172 Returns the associated image list, may be NULL.
173
174 See: wxImageList, setImageList/2
175
176 getPage(This, Page) -> wxWindow:wxWindow()
177
178 Types:
179
180 This = wxListbook()
181 Page = integer()
182
183 Returns the window at the given page position.
184
185 getPageCount(This) -> integer()
186
187 Types:
188
189 This = wxListbook()
190
191 Returns the number of pages in the control.
192
193 getPageImage(This, NPage) -> integer()
194
195 Types:
196
197 This = wxListbook()
198 NPage = integer()
199
200 Returns the image index for the given page.
201
202 getPageText(This, NPage) -> unicode:charlist()
203
204 Types:
205
206 This = wxListbook()
207 NPage = integer()
208
209 Returns the string for the given page.
210
211 getSelection(This) -> integer()
212
213 Types:
214
215 This = wxListbook()
216
217 Returns the currently selected page, or wxNOT_FOUND if none was
218 selected.
219
220 Note that this method may return either the previously or newly
221 selected page when called from the EVT_BOOKCTRL_PAGE_CHANGED
222 handler depending on the platform and so wxBookCtrlEvent:getSe‐
223 lection/1 should be used instead in this case.
224
225 hitTest(This, Pt) -> Result
226
227 Types:
228
229 Result = {Res :: integer(), Flags :: integer()}
230 This = wxListbook()
231 Pt = {X :: integer(), Y :: integer()}
232
233 Returns the index of the tab at the specified position or
234 wxNOT_FOUND if none.
235
236 If flags parameter is non-NULL, the position of the point inside
237 the tab is returned as well.
238
239 Return: Returns the zero-based tab index or wxNOT_FOUND if there
240 is no tab at the specified position.
241
242 insertPage(This, Index, Page, Text) -> boolean()
243
244 Types:
245
246 This = wxListbook()
247 Index = integer()
248 Page = wxWindow:wxWindow()
249 Text = unicode:chardata()
250
251 insertPage(This, Index, Page, Text, Options :: [Option]) ->
252 boolean()
253
254 Types:
255
256 This = wxListbook()
257 Index = integer()
258 Page = wxWindow:wxWindow()
259 Text = unicode:chardata()
260 Option = {bSelect, boolean()} | {imageId, integer()}
261
262 Inserts a new page at the specified position.
263
264 Return: true if successful, false otherwise.
265
266 Remark: Do not delete the page, it will be deleted by the book
267 control.
268
269 See: addPage/4
270
271 setImageList(This, ImageList) -> ok
272
273 Types:
274
275 This = wxListbook()
276 ImageList = wxImageList:wxImageList()
277
278 Sets the image list to use.
279
280 It does not take ownership of the image list, you must delete it
281 yourself.
282
283 See: wxImageList, assignImageList/2
284
285 setPageSize(This, Size) -> ok
286
287 Types:
288
289 This = wxListbook()
290 Size = {W :: integer(), H :: integer()}
291
292 Sets the width and height of the pages.
293
294 Note: This method is currently not implemented for wxGTK.
295
296 setPageImage(This, Page, Image) -> boolean()
297
298 Types:
299
300 This = wxListbook()
301 Page = Image = integer()
302
303 Sets the image index for the given page.
304
305 image is an index into the image list which was set with setIm‐
306 ageList/2.
307
308 setPageText(This, Page, Text) -> boolean()
309
310 Types:
311
312 This = wxListbook()
313 Page = integer()
314 Text = unicode:chardata()
315
316 Sets the text for the given page.
317
318 setSelection(This, Page) -> integer()
319
320 Types:
321
322 This = wxListbook()
323 Page = integer()
324
325 Sets the selection to the given page, returning the previous se‐
326 lection.
327
328 Notice that the call to this function generates the page chang‐
329 ing events, use the changeSelection/2 function if you don't want
330 these events to be generated.
331
332 See: getSelection/1
333
334 changeSelection(This, Page) -> integer()
335
336 Types:
337
338 This = wxListbook()
339 Page = integer()
340
341 Changes the selection to the given page, returning the previous
342 selection.
343
344 This function behaves as setSelection/2 but does not generate
345 the page changing events.
346
347 See overview_events_prog for more information.
348
349 destroy(This :: wxListbook()) -> ok
350
351 Destroys the object.
352
353
354
355wxWidgets team. wx 2.1 wxListbook(3)