Gdl.Switcher

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gdl.Switcher Gdl.Switcher Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.Notebook Gtk.Notebook Gtk.Container->Gtk.Notebook Gtk.Notebook->Gdl.Switcher Gtk.Widget->Gtk.Container

Subclasses:

None

Methods

Inherited:

Gtk.Notebook (45), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10)

Structs:

Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)

class

new ()

insert_page (page, tab_widget, label, tooltips, stock_id, pixbuf_icon, position)

Virtual Methods

Inherited:

Gtk.Notebook (10), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)

Properties

Inherited:

Gtk.Notebook (7), Gtk.Container (3), Gtk.Widget (39)

Name

Type

Flags

Short Description

switcher-style

Gdl.SwitcherStyle

r/w

Switcher buttons style

tab-reorderable

bool

r/w

Whether the tab is reorderable by user action

Child Properties

Inherited:

Gtk.Notebook (7)

Style Properties

Inherited:

Gtk.Notebook (9), Gtk.Widget (17)

Signals

Inherited:

Gtk.Notebook (10), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Fields

Inherited:

Gtk.Notebook (10), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Name

Type

Access

Description

parent

Gtk.Notebook

r

Class Details

class Gdl.Switcher(**kwargs)
Bases:

Gtk.Notebook

Abstract:

No

Structure:

Gdl.SwitcherClass

classmethod new()
Returns:

The newly created Gdl.Switcher

Return type:

Gtk.Widget

Creates a new notebook widget with no pages.

insert_page(page, tab_widget, label, tooltips, stock_id, pixbuf_icon, position)
Parameters:
  • page (Gtk.Widget) – The page to add to the switcher

  • tab_widget (Gtk.Widget) – The to add to the switcher

  • label (str) – The label text for the button

  • tooltips (str) – The tooltip for the button

  • stock_id (str) – The stock ID for the button icon

  • pixbuf_icon (GdkPixbuf.Pixbuf) – The pixbuf to use for the button icon

  • position (int) – 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

Return type:

int

Adds a page to a Gdl.Switcher. A button is created in the switcher, with its icon taken preferentially from the stock_id parameter. If this parameter is None, 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 None then a default incrementally numbered label is used instead.

Property Details

Gdl.Switcher.props.switcher_style
Name:

switcher-style

Type:

Gdl.SwitcherStyle

Default Value:

Gdl.SwitcherStyle.BOTH

Flags:

READABLE, WRITABLE

Switcher buttons style

Gdl.Switcher.props.tab_reorderable
Name:

tab-reorderable

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Whether the tab is reorderable by user action