Class: Gtk::ToolPalette

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#add_drag_dest(widget, flags, targets, actions) ⇒ nil

Sets palette as drag source (see gtk_tool_palette_set_drag_source()) and sets widget as a drag destination for drags from palette. See gtk_drag_dest_set().

Parameters:

  • widget (Gtk::Widget)

    a Gtk::Widget which should be a drag destination for palette

  • flags (Gtk::DestDefaults)

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

  • targets (Gtk::ToolPaletteDragTargets)

    the Gtk::ToolPaletteDragTargets which the widget should support

  • actions (Gdk::DragAction)

    the Gdk::DragActions which the widget should suppport

Returns:

  • (nil)

#drag_source=(targets) ⇒ nil

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_drag_source_set().

Parameters:

Returns:

  • (nil)

#get_drag_item(selection) ⇒ Gtk::Widget

Get the dragged item from the selection. This could be a Gtk::ToolItem or a #GtkToolItemGroup.

Parameters:

  • selection (Gtk::SelectionData)

    a Gtk::SelectionData

Returns:

#get_drop_group(x, y) ⇒ Gtk::ToolItemGroup

Gets the group at position (x, y). or nil if there is no such group

Parameters:

  • x (Integer)

    the x position

  • y (Integer)

    the y position

Returns:

#get_drop_item(x, y) ⇒ Gtk::ToolItem

Gets the item at position (x, y). See gtk_tool_palette_get_drop_group().

Parameters:

  • x (Integer)

    the x position

  • y (Integer)

    the y position

Returns:

  • (Gtk::ToolItem)

    the Gtk::ToolItem at position or nil if there is no such item

#get_exclusive(group) ⇒ TrueClass

Gets whether group is exclusive or not. See gtk_tool_palette_set_exclusive().

Parameters:

Returns:

  • (TrueClass)

    true if group is exclusive

#get_expand(group) ⇒ TrueClass

Gets whether group should be given extra space. See gtk_tool_palette_set_expand().

Parameters:

Returns:

  • (TrueClass)

    true if group should be given extra space, false otherwise

#get_group_position(group) ⇒ Integer

Gets the position of group in palette as index. See gtk_tool_palette_set_group_position().

Parameters:

Returns:

  • (Integer)

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

#hadjustmentGtk::Adjustment

Gets the horizontal adjustment of the tool palette.

Returns:

#icon_sizeGtk::IconSize

The size of the icons in a tool palette. When this property is set, it overrides the default setting.

This should only be used for special-purpose tool palettes, normal application tool palettes should respect the user preferences for the size of icons.

Returns:

#icon_size=(icon_size) ⇒ Gtk::IconSize

The size of the icons in a tool palette. When this property is set, it overrides the default setting.

This should only be used for special-purpose tool palettes, normal application tool palettes should respect the user preferences for the size of icons.

Parameters:

Returns:

#icon_size_set=(icon_size_set) ⇒ TrueClass

Is true if the Gtk::ToolPalette:icon-size property has been set.

Parameters:

  • icon_size_set (TrueClass)

Returns:

  • (TrueClass)

    icon-size-set

  • (TrueClass)

    icon-size-set

#icon_size_set?TrueClass

Is true if the Gtk::ToolPalette:icon-size property has been set.

Returns:

  • (TrueClass)

    icon-size-set

#newGtk::Widget

Creates a new tool palette.

Returns:

#set_exclusive(group, exclusive) ⇒ nil

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

Parameters:

  • group (Gtk::ToolItemGroup)

    a Gtk::ToolItemGroup which is a child of palette

  • exclusive (TrueClass)

    whether the group should be exclusive or not

Returns:

  • (nil)

#set_expand(group, expand) ⇒ nil

Sets whether the group should be given extra space.

Parameters:

  • group (Gtk::ToolItemGroup)

    a Gtk::ToolItemGroup which is a child of palette

  • expand (TrueClass)

    whether the group should be given extra space

Returns:

  • (nil)

#set_group_position(group, position) ⇒ nil

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.

Parameters:

  • group (Gtk::ToolItemGroup)

    a Gtk::ToolItemGroup which is a child of palette

  • position (Integer)

    a new index for group

Returns:

  • (nil)

#styleGtk::ToolbarStyle

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

Returns:

#style=(style) ⇒ nil

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

Parameters:

  • style (Gtk::ToolbarStyle)

    the Gtk::ToolbarStyle that items in the tool palette shall have

Returns:

  • (nil)

#toolbar_styleGtk::ToolbarStyle

The style of items in the tool palette.

Returns:

#toolbar_style=(toolbar_style) ⇒ Gtk::ToolbarStyle

The style of items in the tool palette.

Parameters:

Returns:

#unset_icon_sizenil

Unsets the tool palette icon size set with gtk_tool_palette_set_icon_size(), so that user preferences will be used to determine the icon size.

Returns:

  • (nil)

#unset_stylenil

Unsets a toolbar style set with gtk_tool_palette_set_style(), so that user preferences will be used to determine the toolbar style.

Returns:

  • (nil)

#vadjustmentGtk::Adjustment

Gets the vertical adjustment of the tool palette.

Returns: