gtk.ToolItemGroup

gtk.ToolItemGroup — a sub container used in a tool palette (new in PyGTK 2.22)

Synopsis

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

Ancestry

+-- GObject
  +-- gtk.Object
    +-- gtk.Widget
      +-- gtk.Container
        +-- gtk.ToolItemGroup

Implemented Interfaces

gtk.ToolItemGroup implements atk.ImplementorIFace, gtk.Buildable, gtk.ToolShell

gtk.ToolItemGroup Properties

gtk.Object Properties

gtk.Widget Properties

gtk.Container Properties

"collapsed"Read-WriteWhether the group has been collapsed and items are hidden. Default value: False. This property is available in GTK+ 2.20 and above.
"ellipsize"Read-WriteEllipsize for item group headers. Default value: pango.ELLIPSIZE_NONE. This property is available in GTK+ 2.20 and above.
"header-relief"Read-WriteRelief of the group header button. Default value: gtk.RELIEF_NORMAL. This property is available in GTK+ 2.20 and above.
"label"Read-WriteThe human-readable title of this item group. Default value: "" This property is available in GTK+ 2.20 and above.
"label-widget"Read-WriteA widget to display in place of the usual label. This property is available in GTK+ 2.20 and above.

gtk.ToolItemGroup Child Properties

"expand"Read-WriteWhether the item should receive extra space when the group grows. Default value: False. This property is available in GTK+ 2.20 and above.
"fill"Read-WriteWhether the item should fill the available space. Default value: True. This property is available in GTK+ 2.20 and above.
"homogeneous"Read-WriteWhether the item should be the same size as other homogeneous items. Default value: True. This property is available in GTK+ 2.20 and above.
"new-row"Read-WriteWhether the item should start a new row. Default value: False This property is available in GTK+ 2.20 and above.
"position"Read-WritePosition of the item within this group. Allowed values: >=0. Default value: 0. This property is available in GTK+ 2.20 and above.

gtk.ToolItemGroup Style Properties

gtk.Widget Style Properties

"expander-size"ReadSize of the expander arrow. Allowed values: >=0. Default value: 16. This property is available in GTK+ 2.20 and above.
"header-spacing"ReadSpacing between expander arrow and caption. Allowed values: >=0. Default value: 2. This property is available in GTK+ 2.20 and above.

gtk.ToolItemGroup Signal Prototypes

gobject.GObject Signal Prototypes

gtk.Object Signal Prototypes

gtk.Widget Signal Prototypes

gtk.Container Signal Prototypes

Description

Note

This widget is available in PyGTK 2.22 and above.

A gtk.ToolItemGroup is used together with gtk.ToolPalette to add gtk.ToolItem objects to a palette like container with different categories and drag and drop support.

Constructor

    gtk.ToolItemGroup(label)

label :

the label of the new group

Returns :

a new gtk.ToolItemGroup.

Note

This constructor is available in PyGTK 2.22 and above.

Creates a new tool item group with label label.

Methods

gtk.ToolItemGroup.set_label

    def set_label(label)

label :

the new human-readable label of of the group

Note

This method is available in PyGTK 2.22 and above.

The set_label() method sets the label of the tool item group. The label is displayed in the header of the group.

gtk.ToolItemGroup.set_label_widget

    def set_label_widget(label_widget)

label_widget :

the widget to be displayed in place of the usual label

Note

This method is available in PyGTK 2.22 and above.

The set_label_widget() method 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.

gtk.ToolItemGroup.set_collapsed

    def set_collapsed(collapsed)

collapsed :

True if group should be collapsed, False otherwise

Note

This method is available in PyGTK 2.22 and above.

Sets whether the group should be collapsed or expanded.

gtk.ToolItemGroup.set_ellipsize

    def set_ellipsize(ellipsize)

ellipsize :

one of the Pango Ellipsize Mode Constants labels in group should use

Note

This method is available in PyGTK 2.22 and above.

The set_ellipsize() method sets the ellipsize mode which should be used by labels in group.

gtk.ToolItemGroup.set_header_relief

    def set_header_relief(style)

style :

one of the GTK Relief Style Constants

Note

This method is available in PyGTK 2.22 and above.

Set the button relief of the group header. See gtk.Button.set_relief for details.

gtk.ToolItemGroup.get_label

    def get_label()

Returns :

the label of group. Note that None is returned if a custom label has been set with gtk.ToolItemGroup.set_label_widget

Note

This method is available in PyGTK 2.22 and above.

Gets the label of group.

gtk.ToolItemGroup.get_label_widget

    def get_label_widget()

Returns :

the label widget of group

Note

This method is available in PyGTK 2.22 and above.

Gets the label widget of group. See gtk.ToolItemGroup.set_label_widget.

gtk.ToolItemGroup.get_collapsed

    def get_collapsed()

Returns :

True if group is collapsed, False if it is expanded

Note

This method is available in PyGTK 2.22 and above.

Gets whether group is collapsed or expanded.

gtk.ToolItemGroup.get_ellipsize

    def get_ellipsize()

Returns :

one of the Pango Ellipsize Mode Constants

Note

This method is available in PyGTK 2.22 and above.

Gets the ellipsization mode of group.

gtk.ToolItemGroup.get_header_relief

    def get_header_relief()

Returns :

one of the GTK Relief Style Constants

Note

This method is available in PyGTK 2.22 and above.

Gets the relief mode of the header button of group.

gtk.ToolItemGroup.insert

    def insert(item, position)

item :

the gtk.ToolItem to insert into group

position :

the position of item in group, starting with 0. The position -1 means end of list.

Note

This method is available in PyGTK 2.22 and above.

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

gtk.ToolItemGroup.set_item_position

    def set_item_position(item, position)

item :

the gtk.ToolItem to move to a new position, should be a child of group.

position :

the new position of item in group, starting with 0. The position -1 means end of list.

Note

This method is available in PyGTK 2.22 and above.

The set_item_position() method sets the position of item in the list of children of group.

gtk.ToolItemGroup.get_item_position

    def get_item_position(item)

item :

a gtk.ToolItem

Returns :

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

Note

This method is available in PyGTK 2.22 and above.

Gets the position of item in group as index.

gtk.ToolItemGroup.get_n_items

    def get_n_items()

Returns :

the number of tool items in group

Note

This method is available in PyGTK 2.22 and above.

Gets the number of tool items in group.

gtk.ToolItemGroup.get_nth_item

    def get_nth_item(index)

index :

the index

Returns :

the gtk.ToolItem at index

Note

This method is available in PyGTK 2.22 and above.

Gets the tool item at index in group.

gtk.ToolItemGroup.get_drop_item

    def get_drop_item(x, y)

x :

the x position

y :

the y position

Returns :

the gtk.ToolItem at position (x, y)

Note

This method is available in PyGTK 2.22 and above.

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