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 /
226       private)
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)
231           Group for tabs drag and drop
232
233       'group-id' (integer : default -1 : readable / writable / private)
234           Group ID for tabs drag and drop
235
236       'group-name' (string : default undef : readable / writable / private)
237           Group name for tabs drag and drop
238
239       'homogeneous' (boolean : default false : readable / writable / private)
240           Whether tabs should have homogeneous sizes
241
242       'page' (integer : default -1 : readable / writable / private)
243           The index of the current page
244
245       'scrollable' (boolean : default false : readable / writable / private)
246           If TRUE, scroll arrows are added if there are too many tabs to fit
247
248       'show-border' (boolean : default true : readable / writable / private)
249           Whether the border should be shown or not
250
251       'show-tabs' (boolean : default true : readable / writable / private)
252           Whether tabs should be shown or not
253
254       'tab-border' (Glib::UInt : default 2 : writable / private)
255           Width of the border around the tab labels
256
257       'tab-hborder' (Glib::UInt : default 2 : readable / writable / private)
258           Width of the horizontal border of tab labels
259
260       'tab-pos' (Gtk2::PositionType : default "top" : readable / writable /
261       private)
262           Which side of the notebook holds the tabs
263
264       'tab-vborder' (Glib::UInt : default 2 : readable / writable / private)
265           Width of the vertical border of tab labels
266

CHILD PROPERTIES

268       'detachable' (boolean : default false : readable / writable / private)
269           Whether the tab is detachable
270
271       'menu-label' (string : default undef : readable / writable / private)
272           The string displayed in the child's menu entry
273
274       'position' (integer : default 0 : readable / writable / private)
275           The index of the child in the parent
276
277       'reorderable' (boolean : default false : readable / writable / private)
278           Whether the tab is reorderable by user action or not
279
280       'tab-expand' (boolean : default false : readable / writable / private)
281           Whether to expand the child's tab or not
282
283       'tab-fill' (boolean : default true : readable / writable / private)
284           Whether the child's tab should fill the allocated area or not
285
286       'tab-label' (string : default undef : readable / writable / private)
287           The string displayed on the child's tab label
288
289       'tab-pack' (Gtk2::PackType : default "start" : readable / writable /
290       private)
291           A GtkPackType indicating whether the child is packed with reference
292           to the start or end of the parent
293

STYLE PROPERTIES

295       'arrow-spacing' (integer : default 0 : readable / private)
296           Scroll arrow spacing
297
298       'has-backward-stepper' (boolean : default true : readable / private)
299           Display the standard backward arrow button
300
301       'has-forward-stepper' (boolean : default true : readable / private)
302           Display the standard forward arrow button
303
304       'has-secondary-backward-stepper' (boolean : default false : readable /
305       private)
306           Display a second backward arrow button on the opposite end of the
307           tab area
308
309       'has-secondary-forward-stepper' (boolean : default false : readable /
310       private)
311           Display a second forward arrow button on the opposite end of the
312           tab area
313
314       'tab-curvature' (integer : default 1 : readable / private)
315           Size of tab curvature
316
317       'tab-overlap' (integer : default 2 : readable / private)
318           Size of tab overlap area
319

SIGNALS

321       boolean = change-current-page (Gtk2::Notebook, integer)
322       Gtk2::Notebook = create-window (Gtk2::Notebook, Gtk2::Widget, integer,
323       integer)
324       boolean = focus-tab (Gtk2::Notebook, Gtk2::NotebookTab)
325       move-focus-out (Gtk2::Notebook, Gtk2::DirectionType)
326       page-added (Gtk2::Notebook, Gtk2::Widget, Glib::UInt)
327       page-removed (Gtk2::Notebook, Gtk2::Widget, Glib::UInt)
328       page-reordered (Gtk2::Notebook, Gtk2::Widget, Glib::UInt)
329       boolean = reorder-tab (Gtk2::Notebook, Gtk2::DirectionType, boolean)
330       boolean = select-page (Gtk2::Notebook, boolean)
331       switch-page (Gtk2::Notebook, gpointer, Glib::UInt)
332

ENUMS AND FLAGS

334   enum Gtk2::DirectionType
335       ·   'tab-forward' / 'GTK_DIR_TAB_FORWARD'
336
337       ·   'tab-backward' / 'GTK_DIR_TAB_BACKWARD'
338
339       ·   'up' / 'GTK_DIR_UP'
340
341       ·   'down' / 'GTK_DIR_DOWN'
342
343       ·   'left' / 'GTK_DIR_LEFT'
344
345       ·   'right' / 'GTK_DIR_RIGHT'
346
347   enum Gtk2::NotebookTab
348       ·   'first' / 'GTK_NOTEBOOK_TAB_FIRST'
349
350       ·   'last' / 'GTK_NOTEBOOK_TAB_LAST'
351
352   enum Gtk2::PackType
353       ·   'start' / 'GTK_PACK_START'
354
355       ·   'end' / 'GTK_PACK_END'
356
357   enum Gtk2::PositionType
358       ·   'left' / 'GTK_POS_LEFT'
359
360       ·   'right' / 'GTK_POS_RIGHT'
361
362       ·   'top' / 'GTK_POS_TOP'
363
364       ·   'bottom' / 'GTK_POS_BOTTOM'
365

SEE ALSO

367       Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget,
368       Gtk2::Container
369
371       Copyright (C) 2003-2011 by the gtk2-perl team.
372
373       This software is licensed under the LGPL.  See Gtk2 for a full notice.
374
375
376
377perl v5.30.0                      2019-07-26                 Gtk2::Notebook(3)
Impressum