gtk.ToolPalette

gtk.ToolPalette

Synopsis

class gtk.ToolPalette(gtk.Container):
    gtk.ToolPalette()
def set_group_position(group, position)
def set_exclusive(group, exclusive)
def set_expand(group, expand)
def get_group_position(group)
def get_exclusive(group)
def get_expand(group)
def set_icon_size(icon_size)
def unset_icon_size()
def set_style(style)
def unset_style()
def get_icon_size()
def get_style()
def get_drop_item(x, y)
def get_drop_group(x, y)
def get_drag_item(selection)
def set_drag_source(targets)
def add_drag_dest(widget, flags, targets, actions)
def get_hadjustment()
def get_vadjustment()

Ancestry

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

Constructor

          gtk.ToolPalette()
    

Returns :

a new gtk.ToolPalette

Note

This constructor is available in PyGTK 2.20 and above.

Creates a new tool palette.

Methods

gtk.ToolPalette.set_group_position

            def set_group_position(group, position)
      

group :

a gtk.ToolItemGroup which is a child of palette

position :

a new index for group

Note

This method is available in PyGTK 2.20 and above.

The set_group_position() method sets the position of the group as an index of the tool palette. If position is 0 the group will become the first child, if position is -1 it will become the last child.

gtk.ToolPalette.set_exclusive

            def set_exclusive(group, exclusive)
      

group :

a gtk.ToolItemGroup which is a child of palette

exclusive :

whether the group should be exclusive or not

Note

This method is available in PyGTK 2.20 and above.

Sets whether the group should be exclusive or not. If an exclusive group is expanded all other groups are collapsed.

gtk.ToolPalette.set_expand

            def set_expand(group, expand)
      

group :

a gtk.ToolItemGroup which is a child of palette

expand :

whether the group should be given extra space

Note

This method is available in PyGTK 2.20 and above.

Sets whether the group should be given extra space.

gtk.ToolPalette.get_group_position

            def get_group_position(group)
      

group :

a gtk.ToolItemGroup

Returns :

the index of group or -1 if group is not a child of palette

Note

This method is available in PyGTK 2.20 and above.

Gets the position of group in palette as index. See gtk.ToolPalette.set_group_position.

gtk.ToolPalette.get_exclusive

            def get_exclusive(group)
      

group :

a gtk.ToolItemGroup which is a child of palette

Returns :

TRUE if group is exclusive

Note

This method is available in PyGTK 2.20 and above.

Gets whether group is exclusive or not. See gtk.ToolPalette.set_exclusive.

gtk.ToolPalette.get_expand

            def get_expand(group)
      

group :

a gtk.ToolItemGroup which is a child of palette

Returns :

TRUE if group should be given extra space, FALSE otherwise

Note

This method is available in PyGTK 2.20 and above.

Gets whether group should be given extra space. See gtk.ToolPalette.set_expand.

gtk.ToolPalette.set_icon_size

            def set_icon_size(icon_size)
      

icon_size :

the GtkIconSize that icons in the tool palette shall have

Note

This method is available in PyGTK 2.20 and above.

The set_icon_size() method sets the size of icons in the tool palette.

gtk.ToolPalette.unset_icon_size

            def unset_icon_size()
      

Note

This method is available in PyGTK 2.20 and above.

Unsets the tool palette icon size set with gtk.ToolPalette.set_icon_size, so that user preferences will be used to determine the icon size.

gtk.ToolPalette.set_style

            def set_style(style)
      

style :

the GtkToolbarStyle that items in the tool palette shall have

Note

This method is available in PyGTK 2.20 and above.

The set_style() method sets the style (text, icons or both) of items in the tool palette.

gtk.ToolPalette.unset_style

            def unset_style()
      

Note

This method is available in PyGTK 2.20 and above.

Unsets a toolbar style set with gtk.ToolPalette.set_style, so that user preferences will be used to determine the toolbar style.

gtk.ToolPalette.get_icon_size

            def get_icon_size()
      

Returns :

the GtkIconSize of icons in the tool palette

Note

This method is available in PyGTK 2.20 and above.

Gets the size of icons in the tool palette. See gtk.ToolPalette.set_icon_size.

gtk.ToolPalette.get_style

            def get_style()
      

Returns :

the GtkToolbarStyle of items in the tool palette.

Note

This method is available in PyGTK 2.20 and above.

Gets the style (icons, text or both) of items in the tool palette.

gtk.ToolPalette.get_drop_item

            def get_drop_item(x, y)
      

x :

the x position

y :

the y position

Returns :

the gtk.ToolItem at position or NULL if there is no such item

Note

This method is available in PyGTK 2.20 and above.

Gets the item at position (x, y). See gtk.ToolPalette.get_drop_group.

gtk.ToolPalette.get_drop_group

            def get_drop_group(x, y)
      

x :

the x position

y :

the y position

Returns :

the gtk.ToolItemGroup at position or NULL if there is no such group

Note

This method is available in PyGTK 2.20 and above.

Gets the group at position (x, y).

gtk.ToolPalette.get_drag_item

            def get_drag_item(selection)
      

selection :

a gtk.SelectionData

Returns :

the dragged item in selection

Note

This method is available in PyGTK 2.20 and above.

Get the dragged item from the selection. This could be a gtk.ToolItem or a gtk.ToolItemGroup.

gtk.ToolPalette.set_drag_source

            def set_drag_source(targets)
      

targets :

the GtkToolPaletteDragTargets which the widget should support

Note

This method is available in PyGTK 2.20 and above.

The set_drag_source() method sets the tool palette as a drag source. Enables all groups and items in the tool palette as drag sources on button 1 and button 3 press with copy and move actions. See gtk.Widget.drag_source_set.

gtk.ToolPalette.add_drag_dest

            def add_drag_dest(widget, flags, targets, actions)
      

widget :

a gtk.Widget which should be a drag destination for palette

flags :

the flags that specify what actions GTK+ should take for drops on that widget

targets :

the GtkToolPaletteDragTargets which the widget should support

actions :

the GdkDragActions which the widget should suppport

Note

This method is available in PyGTK 2.20 and above.

Sets palette as drag source (see gtk.ToolPalette.set_drag_source) and sets widget as a drag destination for drags from palette. See gtk.Widget.drag_dest_set.

gtk.ToolPalette.get_hadjustment

            def get_hadjustment()
      

Returns :

the horizontal adjustment of palette

Note

This method is available in PyGTK 2.20 and above.

Gets the horizontal adjustment of the tool palette.

gtk.ToolPalette.get_vadjustment

            def get_vadjustment()
      

Returns :

the vertical adjustment of palette

Note

This method is available in PyGTK 2.20 and above.

Gets the vertical adjustment of the tool palette.