1Gtk2::Notebook(3)     User Contributed Perl Documentation    Gtk2::Notebook(3)
2
3
4

NAME

6       Gtk2::Notebook - wrapper for GtkNotebook
7

HIERARCHY

9         Glib::Object
10         +----Glib::InitiallyUnowned
11              +----Gtk2::Object
12                   +----Gtk2::Widget
13                        +----Gtk2::Container
14                             +----Gtk2::Notebook
15

INTERFACES

17         Glib::Object::_Unregistered::AtkImplementorIface
18         Gtk2::Buildable
19

METHODS

21   widget = Gtk2::Notebook->new
22   widget or undef = $notebook->get_action_widget ($pack_type)
23       •   $pack_type (Gtk2::PackType)
24
25       Since: gtk+ 2.20
26
27   $notebook->set_action_widget ($widget, $pack_type)
28       •   $widget (Gtk2::Widget)
29
30       •   $pack_type (Gtk2::PackType)
31
32       Since: gtk+ 2.20
33
34   integer = $notebook->append_page ($child, $tab_label=undef)
35       •   $child (Gtk2::Widget)
36
37       •   $tab_label (scalar)
38
39       (integer return since Gtk2-Perl 1.080)
40
41   integer = $notebook->append_page_menu ($child, $tab_label, $menu_label)
42       •   $child (Gtk2::Widget)
43
44       •   $tab_label (Gtk2::Widget or undef)
45
46       •   $menu_label (Gtk2::Widget or undef)
47
48       (integer return since Gtk2-Perl 1.080)
49
50   integer = $notebook->get_current_page
51   $notebook->set_current_page ($page_num)
52       •   $page_num (integer)
53
54   integer = $notebook->get_group_id
55       Since: gtk+ 2.10
56
57   $notebook->set_group_id ($group_id)
58       •   $group_id (integer)
59
60       Since: gtk+ 2.10
61
62   integer = $notebook->insert_page ($child, $tab_label, $position)
63       •   $child (Gtk2::Widget)
64
65       •   $tab_label (scalar)
66
67       •   $position (integer)
68
69       (integer return since Gtk2-Perl 1.080)
70
71   integer = $notebook->insert_page_menu ($child, $tab_label, $menu_label,
72       $position)
73       •   $child (Gtk2::Widget)
74
75       •   $tab_label (Gtk2::Widget or undef)
76
77       •   $menu_label (Gtk2::Widget or undef)
78
79       •   $position (integer)
80
81       (integer return since Gtk2-Perl 1.080)
82
83   widget or undef = $notebook->get_menu_label ($child)
84       •   $child (Gtk2::Widget)
85
86   $notebook->set_menu_label ($child, $menu_label=undef)
87       •   $child (Gtk2::Widget)
88
89       •   $menu_label (Gtk2::Widget or undef)
90
91   string = $notebook->get_menu_label_text ($child)
92       •   $child (Gtk2::Widget)
93
94   $notebook->set_menu_label_text ($child, $menu_text)
95       •   $child (Gtk2::Widget)
96
97       •   $menu_text (string)
98
99   integer = $notebook->get_n_pages
100   $notebook->next_page
101   widget or undef = $notebook->get_nth_page ($page_num)
102       •   $page_num (integer)
103
104   integer = $notebook->page_num ($child)
105       •   $child (Gtk2::Widget)
106
107   $notebook->popup_disable
108   $notebook->popup_enable
109   integer = $notebook->prepend_page ($child, $tab_label=undef)
110       •   $child (Gtk2::Widget)
111
112       •   $tab_label (scalar)
113
114       (integer return since Gtk2-Perl 1.080)
115
116   integer = $notebook->prepend_page_menu ($child, $tab_label, $menu_label)
117       •   $child (Gtk2::Widget)
118
119       •   $tab_label (Gtk2::Widget or undef)
120
121       •   $menu_label (Gtk2::Widget or undef)
122
123       (integer return since Gtk2-Perl 1.080)
124
125   $notebook->prev_page
126   list = $notebook->query_tab_label_packing ($child)
127       •   $child (Gtk2::Widget)
128
129   $notebook->remove_page ($page_num)
130       •   $page_num (integer)
131
132   $notebook->reorder_child ($child, $position)
133       •   $child (Gtk2::Widget)
134
135       •   $position (integer)
136
137   boolean = $notebook->get_scrollable
138   $notebook->set_scrollable ($scrollable)
139       •   $scrollable (boolean)
140
141   boolean = $notebook->get_show_border
142   $notebook->set_show_border ($show_border)
143       •   $show_border (boolean)
144
145   boolean = $notebook->get_show_tabs
146   $notebook->set_show_tabs ($show_tabs)
147       •   $show_tabs (boolean)
148
149   $notebook->set_tab_border ($border_width)
150       •   $border_width (integer)
151
152   boolean = $notebook->get_tab_detachable ($child)
153       •   $child (Gtk2::Widget)
154
155       Since: gtk+ 2.10
156
157   $notebook->set_tab_detachable ($child, $detachable)
158       •   $child (Gtk2::Widget)
159
160       •   $detachable (boolean)
161
162       Since: gtk+ 2.10
163
164   unsigned = $notebook->get_tab_hborder
165       Since: gtk+ 2.22
166
167   $notebook->set_tab_hborder ($tab_hborder)
168       •   $tab_hborder (integer)
169
170   widget = $notebook->get_tab_label ($child)
171       •   $child (Gtk2::Widget)
172
173   $notebook->set_tab_label_packing ($child, $expand, $fill, $pack_type)
174       •   $child (Gtk2::Widget)
175
176       •   $expand (boolean)
177
178       •   $fill (boolean)
179
180       •   $pack_type (Gtk2::PackType)
181
182   $notebook->set_tab_label ($child, $tab_label=undef)
183       •   $child (Gtk2::Widget)
184
185       •   $tab_label (Gtk2::Widget or undef)
186
187   string = $notebook->get_tab_label_text ($child)
188       •   $child (Gtk2::Widget)
189
190   $notebook->set_tab_label_text ($child, $tab_text)
191       •   $child (Gtk2::Widget)
192
193       •   $tab_text (string)
194
195   positiontype = $notebook->get_tab_pos
196   $notebook->set_tab_pos ($pos)
197       •   $pos (Gtk2::PositionType)
198
199   boolean = $notebook->get_tab_reorderable ($child)
200       •   $child (Gtk2::Widget)
201
202       Since: gtk+ 2.10
203
204   $notebook->set_tab_reorderable ($child, $reorderable)
205       •   $child (Gtk2::Widget)
206
207       •   $reorderable (boolean)
208
209       Since: gtk+ 2.10
210
211   unsigned = $notebook->get_tab_vborder
212       Since: gtk+ 2.22
213
214   $notebook->set_tab_vborder ($tab_vborder)
215       •   $tab_vborder (integer)
216
217   Gtk2::Notebook->set_window_creation_hook ($func, $data=undef)
218       •   $func (scalar)
219
220       •   $data (scalar)
221
222       Since: gtk+ 2.10
223

PROPERTIES

225       'enable-popup' (boolean : default false : readable / writable / private
226       / static-nick / static-blurb)
227           If TRUE, pressing the right mouse button on the notebook pops up a
228           menu that you can use to go to a page
229
230       'group' (gpointer : default 0 : readable / writable / private / static-
231       nick / static-blurb / deprecated)
232           Group for tabs drag and drop
233
234       'group-id' (integer : default -1 : readable / writable / private /
235       static-nick / static-blurb / deprecated)
236           Group ID for tabs drag and drop
237
238       'group-name' (string : default undef : readable / writable / private /
239       static-nick / static-blurb)
240           Group name for tabs drag and drop
241
242       'homogeneous' (boolean : default false : readable / writable / private
243       / static-nick / static-blurb)
244           Whether tabs should have homogeneous sizes
245
246       'page' (integer : default -1 : readable / writable / private / static-
247       nick / static-blurb)
248           The index of the current page
249
250       'scrollable' (boolean : default false : readable / writable / private /
251       static-nick / static-blurb)
252           If TRUE, scroll arrows are added if there are too many tabs to fit
253
254       'show-border' (boolean : default true : readable / writable / private /
255       static-nick / static-blurb)
256           Whether the border should be shown or not
257
258       'show-tabs' (boolean : default true : readable / writable / private /
259       static-nick / static-blurb)
260           Whether tabs should be shown or not
261
262       'tab-border' (Glib::UInt : default 2 : writable / private / static-nick
263       / static-blurb)
264           Width of the border around the tab labels
265
266       'tab-hborder' (Glib::UInt : default 2 : readable / writable / private /
267       static-nick / static-blurb)
268           Width of the horizontal border of tab labels
269
270       'tab-pos' (Gtk2::PositionType : default "top" : readable / writable /
271       private / static-nick / static-blurb)
272           Which side of the notebook holds the tabs
273
274       'tab-vborder' (Glib::UInt : default 2 : readable / writable / private /
275       static-nick / static-blurb)
276           Width of the vertical border of tab labels
277

CHILD PROPERTIES

279       'detachable' (boolean : default false : readable / writable / private /
280       static-nick / static-blurb)
281           Whether the tab is detachable
282
283       'menu-label' (string : default undef : readable / writable / private /
284       static-nick / static-blurb)
285           The string displayed in the child's menu entry
286
287       'position' (integer : default 0 : readable / writable / private /
288       static-nick / static-blurb)
289           The index of the child in the parent
290
291       'reorderable' (boolean : default false : readable / writable / private
292       / static-nick / static-blurb)
293           Whether the tab is reorderable by user action or not
294
295       'tab-expand' (boolean : default false : readable / writable / private /
296       static-nick / static-blurb)
297           Whether to expand the child's tab or not
298
299       'tab-fill' (boolean : default true : readable / writable / private /
300       static-nick / static-blurb)
301           Whether the child's tab should fill the allocated area or not
302
303       'tab-label' (string : default undef : readable / writable / private /
304       static-nick / static-blurb)
305           The string displayed on the child's tab label
306
307       'tab-pack' (Gtk2::PackType : default "start" : readable / writable /
308       private / static-nick / static-blurb)
309           A GtkPackType indicating whether the child is packed with reference
310           to the start or end of the parent
311

STYLE PROPERTIES

313       'arrow-spacing' (integer : default 0 : readable / private / static-nick
314       / static-blurb)
315           Scroll arrow spacing
316
317       'has-backward-stepper' (boolean : default true : readable / private /
318       static-nick / static-blurb)
319           Display the standard backward arrow button
320
321       'has-forward-stepper' (boolean : default true : readable / private /
322       static-nick / static-blurb)
323           Display the standard forward arrow button
324
325       'has-secondary-backward-stepper' (boolean : default false : readable /
326       private / static-nick / static-blurb)
327           Display a second backward arrow button on the opposite end of the
328           tab area
329
330       'has-secondary-forward-stepper' (boolean : default false : readable /
331       private / static-nick / static-blurb)
332           Display a second forward arrow button on the opposite end of the
333           tab area
334
335       'tab-curvature' (integer : default 1 : readable / private / static-nick
336       / static-blurb)
337           Size of tab curvature
338
339       'tab-overlap' (integer : default 2 : readable / private / static-nick /
340       static-blurb)
341           Size of tab overlap area
342

SIGNALS

344       boolean = change-current-page (Gtk2::Notebook, integer)
345       Gtk2::Notebook = create-window (Gtk2::Notebook, Gtk2::Widget, integer,
346       integer)
347       boolean = focus-tab (Gtk2::Notebook, Gtk2::NotebookTab)
348       move-focus-out (Gtk2::Notebook, Gtk2::DirectionType)
349       page-added (Gtk2::Notebook, Gtk2::Widget, Glib::UInt)
350       page-removed (Gtk2::Notebook, Gtk2::Widget, Glib::UInt)
351       page-reordered (Gtk2::Notebook, Gtk2::Widget, Glib::UInt)
352       boolean = reorder-tab (Gtk2::Notebook, Gtk2::DirectionType, boolean)
353       boolean = select-page (Gtk2::Notebook, boolean)
354       switch-page (Gtk2::Notebook, gpointer, Glib::UInt)
355

ENUMS AND FLAGS

357   enum Gtk2::DirectionType
358       •   'tab-forward' / 'GTK_DIR_TAB_FORWARD'
359
360       •   'tab-backward' / 'GTK_DIR_TAB_BACKWARD'
361
362       •   'up' / 'GTK_DIR_UP'
363
364       •   'down' / 'GTK_DIR_DOWN'
365
366       •   'left' / 'GTK_DIR_LEFT'
367
368       •   'right' / 'GTK_DIR_RIGHT'
369
370   enum Gtk2::NotebookTab
371       •   'first' / 'GTK_NOTEBOOK_TAB_FIRST'
372
373       •   'last' / 'GTK_NOTEBOOK_TAB_LAST'
374
375   enum Gtk2::PackType
376       •   'start' / 'GTK_PACK_START'
377
378       •   'end' / 'GTK_PACK_END'
379
380   enum Gtk2::PositionType
381       •   'left' / 'GTK_POS_LEFT'
382
383       •   'right' / 'GTK_POS_RIGHT'
384
385       •   'top' / 'GTK_POS_TOP'
386
387       •   'bottom' / 'GTK_POS_BOTTOM'
388

SEE ALSO

390       Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget,
391       Gtk2::Container
392
394       Copyright (C) 2003-2011 by the gtk2-perl team.
395
396       This software is licensed under the LGPL.  See Gtk2 for a full notice.
397
398
399
400perl v5.36.0                      2022-07-22                 Gtk2::Notebook(3)
Impressum