Gtk.ToolItemGroup - Classes - Gtk 3.0 (original) (raw)

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 Gtk.ToolShell Gtk.ToolShell GObject.GInterface->Gtk.ToolShell GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.ToolItemGroup Gtk.ToolItemGroup Gtk.Container->Gtk.ToolItemGroup Gtk.ToolShell->Gtk.ToolItemGroup Gtk.Widget->Gtk.Container

Subclasses:

None

Methods

Inherited:

Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.ToolShell (9)

Structs:

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

class new (label)
get_collapsed ()
get_drop_item (x, y)
get_ellipsize ()
get_header_relief ()
get_item_position (item)
get_label ()
get_label_widget ()
get_n_items ()
get_nth_item (index)
insert (item, position)
set_collapsed (collapsed)
set_ellipsize (ellipsize)
set_header_relief (style)
set_item_position (item, position)
set_label (label)
set_label_widget (label_widget)

Virtual Methods

Inherited:

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

Properties

Inherited:

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

Name Type Flags Short Description
collapsed bool r/w/en Whether the group has been collapsed and items are hidden
ellipsize Pango.EllipsizeMode r/w/en Ellipsize for item group headers
header-relief Gtk.ReliefStyle r/w/en Relief of the group header button
label str r/w The human-readable title of this item group
label-widget Gtk.Widget r/w A widget to display in place of the usual label

Child Properties

Name Type Default Flags Short Description
expand bool False r/w Whether the item should receive extra space when the group grows
fill bool True r/w Whether the item should fill the available space
homogeneous bool True r/w Whether the item should be the same size as other homogeneous items
new-row bool False r/w Whether the item should start a new row
position int 0 r/w Position of the item within this group

Style Properties

Inherited:

Gtk.Widget (17)

Name Type Default Flags Short Description
expander-size int 16 r Size of the expander arrow
header-spacing int 2 r Spacing between expander arrow and caption

Signals

Inherited:

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

Fields

Inherited:

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

Name Type Access Description
parent_instance Gtk.Container r

Class Details

class Gtk.ToolItemGroup(**kwargs)

Bases:

Gtk.Container, Gtk.ToolShell

Abstract:

No

Structure:

Gtk.ToolItemGroupClass

A Gtk.ToolItemGroup is used together with Gtk.ToolPalette to addGtk.ToolItems to a palette like container with different categories and drag and drop support.

CSS nodes

Gtk.ToolItemGroup has a single CSS node named toolitemgroup.

New in version 2.20.

classmethod new(label)[source]

Parameters:

label (str) – the label of the new group

Returns:

a new Gtk.ToolItemGroup.

Return type:

Gtk.Widget

Creates a new tool item group with label label.

New in version 2.20.

get_collapsed()[source]

Returns:

True if self is collapsed, False if it is expanded

Return type:

bool

Gets whether self is collapsed or expanded.

New in version 2.20.

get_drop_item(x, y)[source]

Parameters:

Returns:

the Gtk.ToolItem at position (x, y)

Return type:

Gtk.ToolItem

Gets the tool item at position (x, y).

New in version 2.20.

get_ellipsize()[source]

Returns:

the Pango.EllipsizeMode of self

Return type:

Pango.EllipsizeMode

Gets the ellipsization mode of self.

New in version 2.20.

Returns:

the Gtk.ReliefStyle

Return type:

Gtk.ReliefStyle

Gets the relief mode of the header button of self.

New in version 2.20.

get_item_position(item)[source]

Parameters:

item (Gtk.ToolItem) – a Gtk.ToolItem

Returns:

the index of item in self or -1 if item is no child of self

Return type:

int

Gets the position of item in self as index.

New in version 2.20.

get_label()[source]

Returns:

the label of self. The label is an internal string of selfand must not be modified. Note that None is returned if a custom label has been set with Gtk.ToolItemGroup.set_label_widget()

Return type:

str

Gets the label of self.

New in version 2.20.

get_label_widget()[source]

Returns:

the label widget of self

Return type:

Gtk.Widget

Gets the label widget of self. See Gtk.ToolItemGroup.set_label_widget().

New in version 2.20.

get_n_items()[source]

Returns:

the number of tool items in self

Return type:

int

Gets the number of tool items in self.

New in version 2.20.

get_nth_item(index)[source]

Parameters:

index (int) – the index

Returns:

the Gtk.ToolItem at index

Return type:

Gtk.ToolItem

Gets the tool item at index in group.

New in version 2.20.

insert(item, position)[source]

Parameters:

Inserts item at position in the list of children of self.

New in version 2.20.

set_collapsed(collapsed)[source]

Parameters:

collapsed (bool) – whether the self should be collapsed or expanded

Sets whether the self should be collapsed or expanded.

New in version 2.20.

set_ellipsize(ellipsize)[source]

Parameters:

ellipsize (Pango.EllipsizeMode) – the Pango.EllipsizeMode labels in self should use

Sets the ellipsization mode which should be used by labels in self.

New in version 2.20.

Parameters:

style (Gtk.ReliefStyle) – the Gtk.ReliefStyle

Set the button relief of the group header. See Gtk.Button.set_relief() for details.

New in version 2.20.

set_item_position(item, position)[source]

Parameters:

Sets the position of item in the list of children of self.

New in version 2.20.

set_label(label)[source]

Parameters:

label (str) – the new human-readable label of of the group

Sets the label of the tool item group. The label is displayed in the header of the group.

New in version 2.20.

set_label_widget(label_widget)[source]

Parameters:

label_widget (Gtk.Widget) – the widget to be displayed in place of the usual label

Sets the label of the tool item group. The label widget is displayed in the header of the group, in place of the usual label.

New in version 2.20.

Property Details

Gtk.ToolItemGroup.props.collapsed

Name:

collapsed

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether the group has been collapsed and items are hidden

Gtk.ToolItemGroup.props.ellipsize

Name:

ellipsize

Type:

Pango.EllipsizeMode

Default Value:

Pango.EllipsizeMode.NONE

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Ellipsize for item group headers

Name:

header-relief

Type:

Gtk.ReliefStyle

Default Value:

Gtk.ReliefStyle.NORMAL

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Relief of the group header button

Gtk.ToolItemGroup.props.label

Name:

label

Type:

str

Default Value:

''

Flags:

READABLE, WRITABLE

The human-readable title of this item group

Gtk.ToolItemGroup.props.label_widget

Name:

label-widget

Type:

Gtk.Widget

Default Value:

None

Flags:

READABLE, WRITABLE

A widget to display in place of the usual label