---
name: "Gtk2::Notebook"
section: "3pm"
platform: "linux"
package: "libgtk2-perl-doc"
version: "2:1.24992-1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/Gtk2::Notebook"
---

# Gtk2::Notebook(3pm)

wrapper for GtkNotebook

## NAME

Gtk2::Notebook - wrapper for GtkNotebook

## HIERARCHY

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

## INTERFACES

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

## METHODS

### widget = Gtk2::Notebook-\>new

### 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

### $notebook-\>next\_page

### widget or undef = $notebook-\>get\_nth\_page ($page\_num)

- •

  `$page_num` (integer)

### integer = $notebook-\>page\_num ($child)

- •

  `$child` (Gtk2::Widget)

### $notebook-\>popup\_disable

### $notebook-\>popup\_enable

### 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)

### $notebook-\>prev\_page

### list = $notebook-\>query\_tab\_label\_packing ($child)

- •

  `$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)

### widget = $notebook-\>get\_tab\_label ($child)

- •

  `$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)

### positiontype = $notebook-\>get\_tab\_pos

### $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

## PROPERTIES

- 'enable-popup' (boolean : default false : readable / writable / private)

  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)

  Group for tabs drag and drop

- 'group-id' (integer : default -1 : readable / writable / private)

  Group ID for tabs drag and drop

- 'group-name' (string : default undef : readable / writable / private)

  Group name for tabs drag and drop

- 'homogeneous' (boolean : default false : readable / writable / private)

  Whether tabs should have homogeneous sizes

- 'page' (integer : default -1 : readable / writable / private)

  The index of the current page

- 'scrollable' (boolean : default false : readable / writable / private)

  If TRUE, scroll arrows are added if there are too many tabs to fit

- 'show-border' (boolean : default true : readable / writable / private)

  Whether the border should be shown or not

- 'show-tabs' (boolean : default true : readable / writable / private)

  Whether tabs should be shown or not

- 'tab-border' (Glib::UInt : default 2 : writable / private)

  Width of the border around the tab labels

- 'tab-hborder' (Glib::UInt : default 2 : readable / writable / private)

  Width of the horizontal border of tab labels

- 'tab-pos' (Gtk2::PositionType : default "top" : readable / writable / private)

  Which side of the notebook holds the tabs

- 'tab-vborder' (Glib::UInt : default 2 : readable / writable / private)

  Width of the vertical border of tab labels

## CHILD PROPERTIES

- 'detachable' (boolean : default false : readable / writable / private)

  Whether the tab is detachable

- 'menu-label' (string : default undef : readable / writable / private)

  The string displayed in the child's menu entry

- 'position' (integer : default 0 : readable / writable / private)

  The index of the child in the parent

- 'reorderable' (boolean : default false : readable / writable / private)

  Whether the tab is reorderable by user action or not

- 'tab-expand' (boolean : default false : readable / writable / private)

  Whether to expand the child's tab or not

- 'tab-fill' (boolean : default true : readable / writable / private)

  Whether the child's tab should fill the allocated area or not

- 'tab-label' (string : default undef : readable / writable / private)

  The string displayed on the child's tab label

- 'tab-pack' (Gtk2::PackType : default "start" : readable / writable / private)

  A GtkPackType indicating whether the child is packed with reference to the start or end of the parent

## STYLE PROPERTIES

- 'arrow-spacing' (integer : default 0 : readable / private)

  Scroll arrow spacing

- 'has-backward-stepper' (boolean : default true : readable / private)

  Display the standard backward arrow button

- 'has-forward-stepper' (boolean : default true : readable / private)

  Display the standard forward arrow button

- 'has-secondary-backward-stepper' (boolean : default false : readable / private)

  Display a second backward arrow button on the opposite end of the tab area

- 'has-secondary-forward-stepper' (boolean : default false : readable / private)

  Display a second forward arrow button on the opposite end of the tab area

- 'tab-curvature' (integer : default 1 : readable / private)

  Size of tab curvature

- 'tab-overlap' (integer : default 2 : readable / private)

  Size of tab overlap area

## SIGNALS

- boolean = **change-current-page** (Gtk2::Notebook, integer)

  - Gtk2::Notebook = **create-window** (Gtk2::Notebook, Gtk2::Widget, integer, integer)

  - boolean = **focus-tab** (Gtk2::Notebook, Gtk2::NotebookTab)

  - **move-focus-out** (Gtk2::Notebook, Gtk2::DirectionType)

  - **page-added** (Gtk2::Notebook, Gtk2::Widget, Glib::UInt)

  - **page-removed** (Gtk2::Notebook, Gtk2::Widget, Glib::UInt)

  - **page-reordered** (Gtk2::Notebook, Gtk2::Widget, Glib::UInt)

  - boolean = **reorder-tab** (Gtk2::Notebook, Gtk2::DirectionType, boolean)

  - boolean = **select-page** (Gtk2::Notebook, boolean)

  - **switch-page** (Gtk2::Notebook, gpointer, Glib::UInt)

  ## ENUMS AND FLAGS

### enum Gtk2::DirectionType

- •

  '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'

### enum Gtk2::NotebookTab

- •

  'first' / 'GTK\_NOTEBOOK\_TAB\_FIRST'

- •

  'last' / 'GTK\_NOTEBOOK\_TAB\_LAST'

### enum Gtk2::PackType

- •

  'start' / 'GTK\_PACK\_START'

- •

  'end' / 'GTK\_PACK\_END'

### enum Gtk2::PositionType

- •

  'left' / 'GTK\_POS\_LEFT'

- •

  'right' / 'GTK\_POS\_RIGHT'

- •

  'top' / 'GTK\_POS\_TOP'

- •

  'bottom' / 'GTK\_POS\_BOTTOM'

## SEE ALSO

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

## COPYRIGHT

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

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