GdlSwitcher

GdlSwitcher — An improved notebook widget.

Stability Level

Unstable, unless otherwise indicated

Synopsis

struct              GdlSwitcher;
GtkWidget *         gdl_switcher_new                    (void);
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);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkWidget
               +----GtkContainer
                     +----GtkNotebook
                           +----GdlSwitcher

Implemented Interfaces

GdlSwitcher implements AtkImplementorIface and GtkBuildable.

Properties

  "switcher-style"           GdlSwitcherStyle      : Read / Write

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.

Details

struct GdlSwitcher

struct GdlSwitcher;


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.

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

Property Details

The "switcher-style" property

  "switcher-style"           GdlSwitcherStyle      : Read / Write

Switcher buttons style.

Default value: GDL_SWITCHER_STYLE_BOTH

See Also

GdlDockNotebook