1wxAuiNotebook(3) Erlang Module Definition wxAuiNotebook(3)
2
3
4
6 wxAuiNotebook - Functions for wxAuiNotebook class
7
9 wxAuiNotebook is part of the wxAUI class framework, which represents a
10 notebook control, managing multiple windows with associated tabs.
11
12 See also overview_aui.
13
14 wxAuiNotebook is a notebook control which implements many features com‐
15 mon in applications with dockable panes. Specifically, wxAuiNotebook
16 implements functionality which allows the user to rearrange tab order
17 via drag-and-drop, split the tab window into many different splitter
18 configurations, and toggle through different themes to customize the
19 control's look and feel.
20
21 The default theme that is used is wxAuiDefaultTabArt (not implemented
22 in wx), which provides a modern, glossy look and feel. The theme can be
23 changed by calling setArtProvider/2.
24
25 Styles
26
27 This class supports the following styles:
28
29 This class is derived (and can use functions) from: wxControl wxWindow
30 wxEvtHandler
31
32 wxWidgets docs: wxAuiNotebook
33
35 Event types emitted from this class: command_auinotebook_page_close,
36 command_auinotebook_page_closed, command_auinotebook_page_changed, com‐
37 mand_auinotebook_page_changing, command_auinotebook_button, com‐
38 mand_auinotebook_begin_drag, command_auinotebook_end_drag, com‐
39 mand_auinotebook_drag_motion, command_auinotebook_allow_dnd, com‐
40 mand_auinotebook_drag_done, command_auinotebook_tab_middle_down, com‐
41 mand_auinotebook_tab_middle_up, command_auinotebook_tab_right_down,
42 command_auinotebook_tab_right_up, command_auinotebook_bg_dclick
43
45 wxAuiNotebook() = wx:wx_object()
46
48 new() -> wxAuiNotebook()
49
50 Default ctor.
51
52 new(Parent) -> wxAuiNotebook()
53
54 Types:
55
56 Parent = wxWindow:wxWindow()
57
58 new(Parent, Options :: [Option]) -> wxAuiNotebook()
59
60 Types:
61
62 Parent = wxWindow:wxWindow()
63 Option =
64 {id, integer()} |
65 {pos, {X :: integer(), Y :: integer()}} |
66 {size, {W :: integer(), H :: integer()}} |
67 {style, integer()}
68
69 Constructor.
70
71 Creates a wxAuiNotebok control.
72
73 addPage(This, Page, Caption) -> boolean()
74
75 Types:
76
77 This = wxAuiNotebook()
78 Page = wxWindow:wxWindow()
79 Caption = unicode:chardata()
80
81 addPage(This, Page, Caption, Options :: [Option]) -> boolean()
82
83 Types:
84
85 This = wxAuiNotebook()
86 Page = wxWindow:wxWindow()
87 Caption = unicode:chardata()
88 Option = {select, boolean()} | {bitmap, wxBitmap:wxBitmap()}
89
90 Adds a page.
91
92 If the select parameter is true, calling this will generate a
93 page change event.
94
95 addPage(This, Page, Text, Select, ImageId) -> boolean()
96
97 Types:
98
99 This = wxAuiNotebook()
100 Page = wxWindow:wxWindow()
101 Text = unicode:chardata()
102 Select = boolean()
103 ImageId = integer()
104
105 Adds a new page.
106
107 The page must have the book control itself as the parent and
108 must not have been added to this control previously.
109
110 The call to this function may generate the page changing events.
111
112 Return: true if successful, false otherwise.
113
114 Remark: Do not delete the page, it will be deleted by the book
115 control.
116
117 See: insertPage/6
118
119 Since: 2.9.3
120
121 create(This, Parent) -> boolean()
122
123 Types:
124
125 This = wxAuiNotebook()
126 Parent = wxWindow:wxWindow()
127
128 create(This, Parent, Winid) -> boolean()
129
130 create(This, Parent, Winid :: [Option]) -> boolean()
131
132 Types:
133
134 This = wxAuiNotebook()
135 Parent = wxWindow:wxWindow()
136 Option =
137 {id, integer()} |
138 {pos, {X :: integer(), Y :: integer()}} |
139 {size, {W :: integer(), H :: integer()}} |
140 {style, integer()}
141
142 Creates the notebook window.
143
144 create(This, Parent, Winid, Options :: [Option]) -> boolean()
145
146 Types:
147
148 This = wxAuiNotebook()
149 Parent = wxWindow:wxWindow()
150 Winid = integer()
151 Option =
152 {pos, {X :: integer(), Y :: integer()}} |
153 {size, {W :: integer(), H :: integer()}} |
154 {style, integer()}
155
156 Constructs the book control with the given parameters.
157
158 deletePage(This, Page) -> boolean()
159
160 Types:
161
162 This = wxAuiNotebook()
163 Page = integer()
164
165 Deletes a page at the given index.
166
167 Calling this method will generate a page change event.
168
169 getArtProvider(This) -> wxAuiTabArt:wxAuiTabArt()
170
171 Types:
172
173 This = wxAuiNotebook()
174
175 Returns the associated art provider.
176
177 getPage(This, Page_idx) -> wxWindow:wxWindow()
178
179 Types:
180
181 This = wxAuiNotebook()
182 Page_idx = integer()
183
184 Returns the page specified by the given index.
185
186 getPageBitmap(This, Page) -> wxBitmap:wxBitmap()
187
188 Types:
189
190 This = wxAuiNotebook()
191 Page = integer()
192
193 Returns the tab bitmap for the page.
194
195 getPageCount(This) -> integer()
196
197 Types:
198
199 This = wxAuiNotebook()
200
201 Returns the number of pages in the notebook.
202
203 getPageIndex(This, Page_wnd) -> integer()
204
205 Types:
206
207 This = wxAuiNotebook()
208 Page_wnd = wxWindow:wxWindow()
209
210 Returns the page index for the specified window.
211
212 If the window is not found in the notebook, wxNOT_FOUND is re‐
213 turned.
214
215 getPageText(This, Page) -> unicode:charlist()
216
217 Types:
218
219 This = wxAuiNotebook()
220 Page = integer()
221
222 Returns the tab label for the page.
223
224 getSelection(This) -> integer()
225
226 Types:
227
228 This = wxAuiNotebook()
229
230 Returns the currently selected page.
231
232 insertPage(This, Page_idx, Page, Caption) -> boolean()
233
234 Types:
235
236 This = wxAuiNotebook()
237 Page_idx = integer()
238 Page = wxWindow:wxWindow()
239 Caption = unicode:chardata()
240
241 insertPage(This, Page_idx, Page, Caption, Options :: [Option]) ->
242 boolean()
243
244 Types:
245
246 This = wxAuiNotebook()
247 Page_idx = integer()
248 Page = wxWindow:wxWindow()
249 Caption = unicode:chardata()
250 Option = {select, boolean()} | {bitmap, wxBitmap:wxBitmap()}
251
252 insertPage/6 is similar to AddPage, but allows the ability to
253 specify the insert location.
254
255 If the select parameter is true, calling this will generate a
256 page change event.
257
258 insertPage(This, Index, Page, Text, Select, ImageId) -> boolean()
259
260 Types:
261
262 This = wxAuiNotebook()
263 Index = integer()
264 Page = wxWindow:wxWindow()
265 Text = unicode:chardata()
266 Select = boolean()
267 ImageId = integer()
268
269 Inserts a new page at the specified position.
270
271 Return: true if successful, false otherwise.
272
273 Remark: Do not delete the page, it will be deleted by the book
274 control.
275
276 See: addPage/5
277
278 Since: 2.9.3
279
280 removePage(This, Page) -> boolean()
281
282 Types:
283
284 This = wxAuiNotebook()
285 Page = integer()
286
287 Removes a page, without deleting the window pointer.
288
289 setArtProvider(This, Art) -> ok
290
291 Types:
292
293 This = wxAuiNotebook()
294 Art = wxAuiTabArt:wxAuiTabArt()
295
296 Sets the art provider to be used by the notebook.
297
298 setFont(This, Font) -> boolean()
299
300 Types:
301
302 This = wxAuiNotebook()
303 Font = wxFont:wxFont()
304
305 Sets the font for drawing the tab labels, using a bold version
306 of the font for selected tab labels.
307
308 setPageBitmap(This, Page, Bitmap) -> boolean()
309
310 Types:
311
312 This = wxAuiNotebook()
313 Page = integer()
314 Bitmap = wxBitmap:wxBitmap()
315
316 Sets the bitmap for the page.
317
318 To remove a bitmap from the tab caption, pass wxNullBitmap.
319
320 setPageText(This, Page, Text) -> boolean()
321
322 Types:
323
324 This = wxAuiNotebook()
325 Page = integer()
326 Text = unicode:chardata()
327
328 Sets the tab label for the page.
329
330 setSelection(This, New_page) -> integer()
331
332 Types:
333
334 This = wxAuiNotebook()
335 New_page = integer()
336
337 Sets the page selection.
338
339 Calling this method will generate a page change event.
340
341 setTabCtrlHeight(This, Height) -> ok
342
343 Types:
344
345 This = wxAuiNotebook()
346 Height = integer()
347
348 Sets the tab height.
349
350 By default, the tab control height is calculated by measuring
351 the text height and bitmap sizes on the tab captions. Calling
352 this method will override that calculation and set the tab con‐
353 trol to the specified height parameter. A call to this method
354 will override any call to setUniformBitmapSize/2.
355
356 Specifying -1 as the height will return the control to its de‐
357 fault auto-sizing behaviour.
358
359 setUniformBitmapSize(This, Size) -> ok
360
361 Types:
362
363 This = wxAuiNotebook()
364 Size = {W :: integer(), H :: integer()}
365
366 Ensure that all tabs have the same height, even if some of them
367 don't have bitmaps.
368
369 Passing ?wxDefaultSize as size undoes the effect of a previous
370 call to this function and instructs the control to use dynamic
371 tab height.
372
373 destroy(This :: wxAuiNotebook()) -> ok
374
375 Destroys the object.
376
377
378
379wxWidgets team. wx 2.1 wxAuiNotebook(3)