GdlSwitcher

## GdlSwitcher GdlSwitcher — An improved notebook widget. |

## Stability Level

Unstable, unless otherwise indicated

## Functions

GtkWidget * | gdl_switcher_new ()
gint | gdl_switcher_insert_page ()

## Properties

GdlSwitcherStyle | switcher-style | Read / Write
GtkPositionType | tab-pos | Read / Write
gboolean | tab-reorderable | Read / Write

## Types and Values

struct | GdlSwitcher

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkNotebook
                        ╰── GdlSwitcher

## Implemented Interfaces

GdlSwitcher implements AtkImplementorIface and GtkBuildable.

## Description

A GdlSwitcher widget is an improved version of the GtkNotebook. The tab labels could have different style and could be layouted on several lines.

It is used by the GdlDockNotebook widget to dock other widgets.

## Functions

### gdl_switcher_new ()

    GtkWidget *
    gdl_switcher_new (void);

Creates a new notebook widget with no pages.

#### Returns

The newly created GdlSwitcher

### gdl_switcher_insert_page ()

    gint
    gdl_switcher_insert_page (GdlSwitcher *switcher,
                              GtkWidget *page,
                              GtkWidget *tab_widget,
                              const gchar *label,
                              const gchar *tooltips,
                              const gchar *stock_id,
                              GdkPixbuf *pixbuf_icon,
                              gint position);

Adds a page to a GdlSwitcher. A button is created in the switcher, with its icon taken preferentially from the `stock_id` parameter. If this parameter is `NULL`, then the `pixbuf_icon` parameter is used. Failing that, the `GTK_STOCK_NEW` stock icon is used. The text label for the button is specified using the `label` parameter. If it is `NULL` then a default incrementally numbered label is used instead.

#### Parameters

switcher | The switcher to which a page will be added |
page | The page to add to the switcher |
tab_widget | The to add to the switcher |
label | The label text for the button |
tooltips | The tooltip for the button |
stock_id | The stock ID for the button icon |
pixbuf_icon | The pixbuf to use for the button icon |
position | The position at which to create the page |

#### Returns

The index (starting from 0) of the appended page in the notebook, or -1 if function fails

## Types and Values

### struct GdlSwitcher

    struct GdlSwitcher;

## Property Details

### The `“switcher-style”` property

      “switcher-style”           GdlSwitcherStyle

Switcher buttons style.

Flags: Read / Write

Default value: GDL_SWITCHER_STYLE_BOTH

### The `“tab-pos”` property

      “tab-pos”                  GtkPositionType

Which side of the notebook holds the tabs.

Flags: Read / Write

Default value: GTK_POS_BOTTOM

### The `“tab-reorderable”` property

      “tab-reorderable”          gboolean

Whether the tab is reorderable by user action.

Flags: Read / Write

Default value: FALSE

## See Also

GdlDockNotebook