Gtk2::Notebook(3) User Contributed Perl Documentation Gtk2::Notebook(3)

Gtk2::Notebook - wrapper for GtkNotebook

Glib::Object
+----Glib::InitiallyUnowned
     +----Gtk2::Object
          +----Gtk2::Widget
               +----Gtk2::Container
                    +----Gtk2::Notebook

Glib::Object::_Unregistered::AtkImplementorIface
Gtk2::Buildable

widget or undef = $notebook->get_action_widget ($pack_type)

$pack_type (Gtk2::PackType)

Since: gtk+ 2.20

$notebook->set_action_widget ($widget, $pack_type)

  • $widget (Gtk2::Widget)
  • $pack_type (Gtk2::PackType)

Since: gtk+ 2.20

integer = $notebook->append_page ($child, $tab_label=undef)

  • $child (Gtk2::Widget)
  • $tab_label (scalar)

(integer return since Gtk2-Perl 1.080)

integer = $notebook->append_page_menu ($child, $tab_label, $menu_label)

  • $child (Gtk2::Widget)
  • $tab_label (Gtk2::Widget or undef)
  • $menu_label (Gtk2::Widget or undef)

(integer return since Gtk2-Perl 1.080)

integer = $notebook->get_current_page

$notebook->set_current_page ($page_num)

$page_num (integer)

integer = $notebook->get_group_id

Since: gtk+ 2.10

$notebook->set_group_id ($group_id)

$group_id (integer)

Since: gtk+ 2.10

integer = $notebook->insert_page ($child, $tab_label, $position)

  • $child (Gtk2::Widget)
  • $tab_label (scalar)
  • $position (integer)

(integer return since Gtk2-Perl 1.080)

integer = $notebook->insert_page_menu ($child, $tab_label, $menu_label, $position)

  • $child (Gtk2::Widget)
  • $tab_label (Gtk2::Widget or undef)
  • $menu_label (Gtk2::Widget or undef)
  • $position (integer)

(integer return since Gtk2-Perl 1.080)

widget or undef = $notebook->get_menu_label ($child)

$child (Gtk2::Widget)

$notebook->set_menu_label ($child, $menu_label=undef)

  • $child (Gtk2::Widget)
  • $menu_label (Gtk2::Widget or undef)

string = $notebook->get_menu_label_text ($child)

$child (Gtk2::Widget)

$notebook->set_menu_label_text ($child, $menu_text)

  • $child (Gtk2::Widget)
  • $menu_text (string)

integer = $notebook->get_n_pages

widget or undef = $notebook->get_nth_page ($page_num)

$page_num (integer)

integer = $notebook->page_num ($child)

$child (Gtk2::Widget)

integer = $notebook->prepend_page ($child, $tab_label=undef)

  • $child (Gtk2::Widget)
  • $tab_label (scalar)

(integer return since Gtk2-Perl 1.080)

integer = $notebook->prepend_page_menu ($child, $tab_label, $menu_label)

  • $child (Gtk2::Widget)
  • $tab_label (Gtk2::Widget or undef)
  • $menu_label (Gtk2::Widget or undef)

(integer return since Gtk2-Perl 1.080)

$child (Gtk2::Widget)

$notebook->remove_page ($page_num)

$page_num (integer)

$notebook->reorder_child ($child, $position)

  • $child (Gtk2::Widget)
  • $position (integer)

boolean = $notebook->get_scrollable

$notebook->set_scrollable ($scrollable)

$scrollable (boolean)

boolean = $notebook->get_show_border

$notebook->set_show_border ($show_border)

$show_border (boolean)

boolean = $notebook->get_show_tabs

$notebook->set_show_tabs ($show_tabs)

$show_tabs (boolean)

$notebook->set_tab_border ($border_width)

$border_width (integer)

boolean = $notebook->get_tab_detachable ($child)

$child (Gtk2::Widget)

Since: gtk+ 2.10

$notebook->set_tab_detachable ($child, $detachable)

  • $child (Gtk2::Widget)
  • $detachable (boolean)

Since: gtk+ 2.10

unsigned = $notebook->get_tab_hborder

Since: gtk+ 2.22

$notebook->set_tab_hborder ($tab_hborder)

$tab_hborder (integer)

$child (Gtk2::Widget)

$notebook->set_tab_label_packing ($child, $expand, $fill, $pack_type)

  • $child (Gtk2::Widget)
  • $expand (boolean)
  • $fill (boolean)
  • $pack_type (Gtk2::PackType)

$notebook->set_tab_label ($child, $tab_label=undef)

  • $child (Gtk2::Widget)
  • $tab_label (Gtk2::Widget or undef)

string = $notebook->get_tab_label_text ($child)

$child (Gtk2::Widget)

$notebook->set_tab_label_text ($child, $tab_text)

  • $child (Gtk2::Widget)
  • $tab_text (string)

$notebook->set_tab_pos ($pos)

$pos (Gtk2::PositionType)

boolean = $notebook->get_tab_reorderable ($child)

$child (Gtk2::Widget)

Since: gtk+ 2.10

$notebook->set_tab_reorderable ($child, $reorderable)

  • $child (Gtk2::Widget)
  • $reorderable (boolean)

Since: gtk+ 2.10

unsigned = $notebook->get_tab_vborder

Since: gtk+ 2.22

$notebook->set_tab_vborder ($tab_vborder)

$tab_vborder (integer)

Gtk2::Notebook->set_window_creation_hook ($func, $data=undef)

  • $func (scalar)
  • $data (scalar)

Since: gtk+ 2.10

'enable-popup' (boolean : default false : readable / writable / private / static-nick / static-blurb)
If TRUE, pressing the right mouse button on the notebook pops up a menu that you can use to go to a page
'group' (gpointer : default 0 : readable / writable / private / static-nick / static-blurb / deprecated)
Group for tabs drag and drop
'group-id' (integer : default -1 : readable / writable / private / static-nick / static-blurb / deprecated)
Group ID for tabs drag and drop
'group-name' (string : default undef : readable / writable / private / static-nick / static-blurb)
Group name for tabs drag and drop
'homogeneous' (boolean : default false : readable / writable / private / static-nick / static-blurb)
Whether tabs should have homogeneous sizes
'page' (integer : default -1 : readable / writable / private / static-nick / static-blurb)
The index of the current page
'scrollable' (boolean : default false : readable / writable / private / static-nick / static-blurb)
If TRUE, scroll arrows are added if there are too many tabs to fit
'show-border' (boolean : default true : readable / writable / private / static-nick / static-blurb)
Whether the border should be shown or not
'show-tabs' (boolean : default true : readable / writable / private / static-nick / static-blurb)
Whether tabs should be shown or not
'tab-border' (Glib::UInt : default 2 : writable / private / static-nick / static-blurb)
Width of the border around the tab labels
'tab-hborder' (Glib::UInt : default 2 : readable / writable / private / static-nick / static-blurb)
Width of the horizontal border of tab labels
'tab-pos' (Gtk2::PositionType : default "top" : readable / writable / private / static-nick / static-blurb)
Which side of the notebook holds the tabs
'tab-vborder' (Glib::UInt : default 2 : readable / writable / private / static-nick / static-blurb)
Width of the vertical border of tab labels

'detachable' (boolean : default false : readable / writable / private / static-nick / static-blurb)
Whether the tab is detachable
'menu-label' (string : default undef : readable / writable / private / static-nick / static-blurb)
The string displayed in the child's menu entry
'position' (integer : default 0 : readable / writable / private / static-nick / static-blurb)
The index of the child in the parent
'reorderable' (boolean : default false : readable / writable / private / static-nick / static-blurb)
Whether the tab is reorderable by user action or not
'tab-expand' (boolean : default false : readable / writable / private / static-nick / static-blurb)
Whether to expand the child's tab or not
'tab-fill' (boolean : default true : readable / writable / private / static-nick / static-blurb)
Whether the child's tab should fill the allocated area or not
'tab-label' (string : default undef : readable / writable / private / static-nick / static-blurb)
The string displayed on the child's tab label
'tab-pack' (Gtk2::PackType : default "start" : readable / writable / private / static-nick / static-blurb)
A GtkPackType indicating whether the child is packed with reference to the start or end of the parent

'arrow-spacing' (integer : default 0 : readable / private / static-nick / static-blurb)
Scroll arrow spacing
'has-backward-stepper' (boolean : default true : readable / private / static-nick / static-blurb)
Display the standard backward arrow button
'has-forward-stepper' (boolean : default true : readable / private / static-nick / static-blurb)
Display the standard forward arrow button
'has-secondary-backward-stepper' (boolean : default false : readable / private / static-nick / static-blurb)
Display a second backward arrow button on the opposite end of the tab area
'has-secondary-forward-stepper' (boolean : default false : readable / private / static-nick / static-blurb)
Display a second forward arrow button on the opposite end of the tab area
'tab-curvature' (integer : default 1 : readable / private / static-nick / static-blurb)
Size of tab curvature
'tab-overlap' (integer : default 2 : readable / private / static-nick / static-blurb)
Size of tab overlap area

  • 'tab-forward' / 'GTK_DIR_TAB_FORWARD'
  • 'tab-backward' / 'GTK_DIR_TAB_BACKWARD'
  • 'up' / 'GTK_DIR_UP'
  • 'down' / 'GTK_DIR_DOWN'
  • 'left' / 'GTK_DIR_LEFT'
  • 'right' / 'GTK_DIR_RIGHT'

  • 'first' / 'GTK_NOTEBOOK_TAB_FIRST'
  • 'last' / 'GTK_NOTEBOOK_TAB_LAST'

  • 'start' / 'GTK_PACK_START'
  • 'end' / 'GTK_PACK_END'

  • 'left' / 'GTK_POS_LEFT'
  • 'right' / 'GTK_POS_RIGHT'
  • 'top' / 'GTK_POS_TOP'
  • 'bottom' / 'GTK_POS_BOTTOM'

Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container

Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL. See Gtk2 for a full notice.

2023-07-25 perl v5.38.0