Class: Gtk::ToolItem

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

Instance Method Summary collapse

Instance Method Details

#ellipsize_modePango::EllipsizeMode

Returns the ellipsize mode used for tool_item. Custom subclasses of Gtk::ToolItem should call this function to find out how text should be ellipsized. should be ellipsized.

Returns:

#expandTrueClass

Returns whether tool_item is allocated extra space. See gtk_tool_item_set_expand().

Returns:

  • (TrueClass)

    true if tool_item is allocated extra space.

#expand=(expand) ⇒ nil

Sets whether tool_item is allocated extra space when there is more room on the toolbar then needed for the items. The effect is that the item gets bigger when the toolbar gets bigger and smaller when the toolbar gets smaller.

Parameters:

  • expand (TrueClass)

    Whether tool_item is allocated extra space

Returns:

  • (nil)

#get_proxy_menu_item(menu_item_id) ⇒ Gtk::Widget

If menu_item_id matches the string passed to gtk_tool_item_set_proxy_menu_item() return the corresponding Gtk::MenuItem.

Custom subclasses of Gtk::ToolItem should use this function to update their menu item when the Gtk::ToolItem changes. That the menu_item_ids must match ensures that a Gtk::ToolItem will not inadvertently change a menu item that they did not create.

Parameters:

  • menu_item_id (String)

    a string used to identify the menu item

Returns:

  • (Gtk::Widget)

    The Gtk::MenuItem passed to gtk_tool_item_set_proxy_menu_item(), if the menu_item_ids match.

#homogeneousTrueClass

Returns whether tool_item is the same size as other homogeneous items. See gtk_tool_item_set_homogeneous(). items.

Returns:

  • (TrueClass)

    true if the item is the same size as other homogeneous

#homogeneous=(homogeneous) ⇒ nil

Sets whether tool_item is to be allocated the same size as other homogeneous items. The effect is that all homogeneous items will have the same width as the widest of the items.

Parameters:

  • homogeneous (TrueClass)

    whether tool_item is the same size as other homogeneous items

Returns:

  • (nil)

#icon_sizeInteger

Returns the icon size used for tool_item. Custom subclasses of Gtk::ToolItem should call this function to find out what size icons they should use. used for tool_item

Returns:

  • (Integer)

    a Gtk::IconSize indicating the icon size

#is_importantTrueClass

Returns whether tool_item is considered important. See gtk_tool_item_set_is_important()

Returns:

  • (TrueClass)

    true if tool_item is considered important.

#is_important=(is_important) ⇒ TrueClass

Parameters:

  • is_important (TrueClass)

Returns:

  • (TrueClass)

    is-important

  • (TrueClass)

    is-important

#is_important?TrueClass

Returns is-important.

Returns:

  • (TrueClass)

    is-important

#newGtk::ToolItem

Creates a new Gtk::ToolItem

Returns:

#orientationGtk::Orientation

Returns the orientation used for tool_item. Custom subclasses of Gtk::ToolItem should call this function to find out what size icons they should use. used for tool_item

Returns:

#rebuild_menunil

Calling this function signals to the toolbar that the overflow menu item for tool_item has changed. If the overflow menu is visible when this function it called, the menu will be rebuilt.

The function must be called when the tool item changes what it will do in response to the Gtk::ToolItem::create-menu-proxy signal.

Returns:

  • (nil)

#relief_styleGtk::ReliefStyle

Returns the relief style of tool_item. See gtk_button_set_relief(). Custom subclasses of Gtk::ToolItem should call this function in the handler of the Gtk::ToolItem::toolbar_reconfigured signal to find out the relief style of buttons. for tool_item.

Returns:

#retrieve_proxy_menu_itemGtk::Widget

Returns the Gtk::MenuItem that was last set by gtk_tool_item_set_proxy_menu_item(), ie. the Gtk::MenuItem that is going to appear in the overflow menu. overflow menu for tool_item.

Returns:

  • (Gtk::Widget)

    The Gtk::MenuItem that is going to appear in the

#set_proxy_menu_item(menu_item_id, menu_item) ⇒ nil

Sets the Gtk::MenuItem used in the toolbar overflow menu. The menu_item_id is used to identify the caller of this function and should also be used with gtk_tool_item_get_proxy_menu_item().

See also Gtk::ToolItem::create-menu-proxy.

Parameters:

  • menu_item_id (String)

    a string used to identify menu_item

  • menu_item (Gtk::Widget)

    a Gtk::MenuItem to use in the overflow menu, or nil

Returns:

  • (nil)

#text_alignmentGtk::gfloat

Returns the text alignment used for tool_item. Custom subclasses of Gtk::ToolItem should call this function to find out how text should be aligned. used for tool_item

Returns:

  • (Gtk::gfloat)

    a #gfloat indicating the horizontal text alignment

#text_orientationGtk::Orientation

Returns the text orientation used for tool_item. Custom subclasses of Gtk::ToolItem should call this function to find out how text should be orientated. used for tool_item

Returns:

#text_size_groupGtk::SizeGroup

Returns the size group used for labels in tool_item. Custom subclasses of Gtk::ToolItem should call this function and use the size group for labels.

Returns:

#toolbar_reconfigurednil

Emits the signal Gtk::ToolItem::toolbar_reconfigured on tool_item. Gtk::Toolbar and other #GtkToolShell implementations use this function to notify children, when some aspect of their configuration changes.

Returns:

  • (nil)

#toolbar_styleGtk::ToolbarStyle

Returns the toolbar style used for tool_item. Custom subclasses of Gtk::ToolItem should call this function in the handler of the GtkToolItem::toolbar_reconfigured signal to find out in what style the toolbar is displayed and change themselves accordingly

Possibilities are:

  • %GTK_TOOLBAR_BOTH, meaning the tool item should show both an icon and a label, stacked vertically

  • %GTK_TOOLBAR_ICONS, meaning the toolbar shows only icons

  • %GTK_TOOLBAR_TEXT, meaning the tool item should only show text

  • %GTK_TOOLBAR_BOTH_HORIZ, meaning the tool item should show both an icon and a label, arranged horizontally

for tool_item.

Returns:

#tooltip_markup=(markup) ⇒ nil

Sets the markup text to be displayed as tooltip on the item. See gtk_widget_set_tooltip_markup().

Parameters:

  • markup (String)

    markup text to be used as tooltip for tool_item

Returns:

  • (nil)

#tooltip_text=(text) ⇒ nil

Sets the text to be displayed as tooltip on the item. See gtk_widget_set_tooltip_text().

Parameters:

  • text (String)

    text to be used as tooltip for tool_item

Returns:

  • (nil)

#use_drag_windowTrueClass

Returns whether tool_item has a drag window. See gtk_tool_item_set_use_drag_window().

Returns:

  • (TrueClass)

    true if tool_item uses a drag window.

#use_drag_window=(use_drag_window) ⇒ nil

Sets whether tool_item has a drag window. When true the toolitem can be used as a drag source through gtk_drag_source_set(). When tool_item has a drag window it will intercept all events, even those that would otherwise be sent to a child of tool_item.

Parameters:

  • use_drag_window (TrueClass)

    Whether tool_item has a drag window.

Returns:

  • (nil)

#visible_horizontalTrueClass

Returns whether the tool_item is visible on toolbars that are docked horizontally. docked horizontally.

Returns:

  • (TrueClass)

    true if tool_item is visible on toolbars that are

#visible_horizontal=(visible_horizontal) ⇒ TrueClass

Parameters:

  • visible_horizontal (TrueClass)

Returns:

  • (TrueClass)

    visible-horizontal

  • (TrueClass)

    visible-horizontal

#visible_horizontal?TrueClass

Returns visible-horizontal.

Returns:

  • (TrueClass)

    visible-horizontal

#visible_verticalTrueClass

Returns whether tool_item is visible when the toolbar is docked vertically. See gtk_tool_item_set_visible_vertical().

Returns:

  • (TrueClass)

    Whether tool_item is visible when the toolbar is docked vertically

#visible_vertical=(visible_vertical) ⇒ TrueClass

Parameters:

  • visible_vertical (TrueClass)

Returns:

  • (TrueClass)

    visible-vertical

  • (TrueClass)

    visible-vertical

#visible_vertical?TrueClass

Returns visible-vertical.

Returns:

  • (TrueClass)

    visible-vertical