1wxTreebook(3)              Erlang Module Definition              wxTreebook(3)
2
3
4

NAME

6       wxTreebook - Functions for wxTreebook class
7

DESCRIPTION

9       This  class  is an extension of the wxNotebook class that allows a tree
10       structured set of pages to be shown in a control. A classic example  is
11       a  netscape preferences dialog that shows a tree of preference sections
12       on the left and select section page on the right.
13
14       To use the class simply create it and populate with pages using insert‐
15       Page/5,  insertSubPage/5,  addPage/4,  AddSubPage() (not implemented in
16       wx).
17
18       If your tree is no more than 1 level in depth then you could simply use
19       addPage/4 and AddSubPage() (not implemented in wx) to sequentially pop‐
20       ulate your tree by adding at every step a page or a subpage to the  end
21       of the tree.
22
23       See: ?wxBookCtrl, wxBookCtrlEvent, wxNotebook, wxTreeCtrl, wxImageList,
24       Overview bookctrl, Examples
25
26       This class is derived (and can use functions) from: wxBookCtrlBase  wx‐
27       Control wxWindow wxEvtHandler
28
29       wxWidgets docs: wxTreebook
30

EVENTS

32       Event  types  emitted  from  this  class:  treebook_page_changed, tree‐
33       book_page_changing
34

DATA TYPES

36       wxTreebook() = wx:wx_object()
37

EXPORTS

39       new() -> wxTreebook()
40
41              Default constructor.
42
43       new(Parent, Id) -> wxTreebook()
44
45              Types:
46
47                 Parent = wxWindow:wxWindow()
48                 Id = integer()
49
50       new(Parent, Id, Options :: [Option]) -> wxTreebook()
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              Creates an empty wxTreebook.
62
63       destroy(This :: wxTreebook()) -> ok
64
65              Destroys the wxTreebook object.
66
67              Also deletes all the pages owned by the control (inserted previ‐
68              ously into it).
69
70       addPage(This, Page, Text) -> boolean()
71
72              Types:
73
74                 This = wxTreebook()
75                 Page = wxWindow:wxWindow()
76                 Text = unicode:chardata()
77
78       addPage(This, Page, Text, Options :: [Option]) -> boolean()
79
80              Types:
81
82                 This = wxTreebook()
83                 Page = wxWindow:wxWindow()
84                 Text = unicode:chardata()
85                 Option = {bSelect, boolean()} | {imageId, integer()}
86
87              Adds a new page.
88
89              The  page  is placed at the topmost level after all other pages.
90              NULL could be specified for page to create an empty page.
91
92       advanceSelection(This) -> ok
93
94              Types:
95
96                 This = wxTreebook()
97
98       advanceSelection(This, Options :: [Option]) -> ok
99
100              Types:
101
102                 This = wxTreebook()
103                 Option = {forward, boolean()}
104
105              Cycles through the tabs.
106
107              The call to this function generates the page changing events.
108
109       assignImageList(This, ImageList) -> ok
110
111              Types:
112
113                 This = wxTreebook()
114                 ImageList = wxImageList:wxImageList()
115
116              Sets the image list for the page control and takes ownership  of
117              the list.
118
119              See: wxImageList, setImageList/2
120
121       create(This, Parent, Id) -> boolean()
122
123              Types:
124
125                 This = wxTreebook()
126                 Parent = wxWindow:wxWindow()
127                 Id = integer()
128
129       create(This, Parent, Id, Options :: [Option]) -> boolean()
130
131              Types:
132
133                 This = wxTreebook()
134                 Parent = wxWindow:wxWindow()
135                 Id = integer()
136                 Option =
137                     {pos, {X :: integer(), Y :: integer()}} |
138                     {size, {W :: integer(), H :: integer()}} |
139                     {style, integer()}
140
141              Creates a treebook control.
142
143              See new/3 for the description of the parameters.
144
145       deleteAllPages(This) -> boolean()
146
147              Types:
148
149                 This = wxTreebook()
150
151              Deletes all pages.
152
153       getCurrentPage(This) -> wxWindow:wxWindow()
154
155              Types:
156
157                 This = wxTreebook()
158
159              Returns the currently selected page or NULL.
160
161       getImageList(This) -> wxImageList:wxImageList()
162
163              Types:
164
165                 This = wxTreebook()
166
167              Returns the associated image list, may be NULL.
168
169              See: wxImageList, setImageList/2
170
171       getPage(This, Page) -> wxWindow:wxWindow()
172
173              Types:
174
175                 This = wxTreebook()
176                 Page = integer()
177
178              Returns the window at the given page position.
179
180       getPageCount(This) -> integer()
181
182              Types:
183
184                 This = wxTreebook()
185
186              Returns the number of pages in the control.
187
188       getPageImage(This, NPage) -> integer()
189
190              Types:
191
192                 This = wxTreebook()
193                 NPage = integer()
194
195              Returns the image index for the given page.
196
197       getPageText(This, NPage) -> unicode:charlist()
198
199              Types:
200
201                 This = wxTreebook()
202                 NPage = integer()
203
204              Returns the string for the given page.
205
206       getSelection(This) -> integer()
207
208              Types:
209
210                 This = wxTreebook()
211
212              Returns  the currently selected page, or wxNOT_FOUND if none was
213              selected.
214
215              Note: This method may return either the previously or newly  se‐
216              lected  page  when  called  from the EVT_TREEBOOK_PAGE_CHANGED()
217              handler depending on the platform and so  wxBookCtrlEvent:getSe‐
218              lection/1 should be used instead in this case.
219
220       expandNode(This, PageId) -> boolean()
221
222              Types:
223
224                 This = wxTreebook()
225                 PageId = integer()
226
227       expandNode(This, PageId, Options :: [Option]) -> boolean()
228
229              Types:
230
231                 This = wxTreebook()
232                 PageId = integer()
233                 Option = {expand, boolean()}
234
235              Expands (collapses) the pageId node.
236
237              Returns  the  previous  state. May generate page changing events
238              (if selected page is under the collapsed branch, then its parent
239              is autoselected).
240
241       isNodeExpanded(This, PageId) -> boolean()
242
243              Types:
244
245                 This = wxTreebook()
246                 PageId = integer()
247
248              Returns true if the page represented by pageId is expanded.
249
250       hitTest(This, Pt) -> Result
251
252              Types:
253
254                 Result = {Res :: integer(), Flags :: integer()}
255                 This = wxTreebook()
256                 Pt = {X :: integer(), Y :: integer()}
257
258              Returns  the  index  of  the  tab  at  the specified position or
259              wxNOT_FOUND if none.
260
261              If flags parameter is non-NULL, the position of the point inside
262              the tab is returned as well.
263
264              Return: Returns the zero-based tab index or wxNOT_FOUND if there
265              is no tab at the specified position.
266
267       insertPage(This, PagePos, Page, Text) -> boolean()
268
269              Types:
270
271                 This = wxTreebook()
272                 PagePos = integer()
273                 Page = wxWindow:wxWindow()
274                 Text = unicode:chardata()
275
276       insertPage(This, PagePos, Page, Text, Options :: [Option]) ->
277                     boolean()
278
279              Types:
280
281                 This = wxTreebook()
282                 PagePos = integer()
283                 Page = wxWindow:wxWindow()
284                 Text = unicode:chardata()
285                 Option = {bSelect, boolean()} | {imageId, integer()}
286
287              Inserts a new page just before the page indicated by pagePos.
288
289              The new page is placed before  pagePos  page  and  on  the  same
290              level. NULL could be specified for page to create an empty page.
291
292       insertSubPage(This, PagePos, Page, Text) -> boolean()
293
294              Types:
295
296                 This = wxTreebook()
297                 PagePos = integer()
298                 Page = wxWindow:wxWindow()
299                 Text = unicode:chardata()
300
301       insertSubPage(This, PagePos, Page, Text, Options :: [Option]) ->
302                        boolean()
303
304              Types:
305
306                 This = wxTreebook()
307                 PagePos = integer()
308                 Page = wxWindow:wxWindow()
309                 Text = unicode:chardata()
310                 Option = {bSelect, boolean()} | {imageId, integer()}
311
312              Inserts a sub page under the specified page.
313
314              NULL could be specified for page to create an empty page.
315
316       setImageList(This, ImageList) -> ok
317
318              Types:
319
320                 This = wxTreebook()
321                 ImageList = wxImageList:wxImageList()
322
323              Sets the image list to use.
324
325              It does not take ownership of the image list, you must delete it
326              yourself.
327
328              See: wxImageList, assignImageList/2
329
330       setPageSize(This, Size) -> ok
331
332              Types:
333
334                 This = wxTreebook()
335                 Size = {W :: integer(), H :: integer()}
336
337              Sets the width and height of the pages.
338
339              Note: This method is currently not implemented for wxGTK.
340
341       setPageImage(This, Page, Image) -> boolean()
342
343              Types:
344
345                 This = wxTreebook()
346                 Page = Image = integer()
347
348              Sets the image index for the given page.
349
350              image is an index into the image list which was set with  setIm‐
351              ageList/2.
352
353       setPageText(This, Page, Text) -> boolean()
354
355              Types:
356
357                 This = wxTreebook()
358                 Page = integer()
359                 Text = unicode:chardata()
360
361              Sets the text for the given page.
362
363       setSelection(This, Page) -> integer()
364
365              Types:
366
367                 This = wxTreebook()
368                 Page = integer()
369
370              Sets the selection to the given page, returning the previous se‐
371              lection.
372
373              Notice that the call to this function generates the page  chang‐
374              ing events, use the changeSelection/2 function if you don't want
375              these events to be generated.
376
377              See: wxBookCtrlBase:getSelection/1
378
379       changeSelection(This, Page) -> integer()
380
381              Types:
382
383                 This = wxTreebook()
384                 Page = integer()
385
386              Changes the selection to the given page, returning the  previous
387              selection.
388
389              This  function  behaves  as setSelection/2 but does not generate
390              the page changing events.
391
392              See overview_events_prog for more information.
393
394
395
396wxWidgets team.                    wx 2.3.1                      wxTreebook(3)
Impressum