Class: Gtk::ImageMenuItem

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

Instance Method Summary collapse

Instance Method Details

#accel_group=(accel_group) ⇒ Gtk::AccelGroup

The Accel Group to use for stock accelerator keys

Parameters:

Returns:

#always_show_imageTrueClass

Returns whether the menu item will ignore the Gtk::Settings:gtk-menu-images setting and always show the image, if available.

Returns:

  • (TrueClass)

    true if the menu item will always show the image

#always_show_image=(always_show_image) ⇒ TrueClass

If true, the menu item will always show the image, if available.

Use this property only if the menuitem would be useless or hard to use without the image.

Parameters:

  • always_show_image (TrueClass)

Returns:

  • (TrueClass)

    always-show-image

  • (TrueClass)

    always-show-image

#always_show_image?TrueClass

If true, the menu item will always show the image, if available.

Use this property only if the menuitem would be useless or hard to use without the image.

Returns:

  • (TrueClass)

    always-show-image

#imageGtk::Widget

Child widget to appear next to the menu text.

Returns:

#image=(image) ⇒ Gtk::Widget

Child widget to appear next to the menu text.

Parameters:

Returns:

#newGtk::Widget

Creates a new Gtk::ImageMenuItem with an empty label.

Returns:

#new_from_stock(stock_id, accel_group) ⇒ Gtk::Widget

Creates a new Gtk::ImageMenuItem containing the image and text from a stock item. Some stock ids have preprocessor macros like #GTK_STOCK_OK and #GTK_STOCK_APPLY.

If you want this menu item to have changeable accelerators, then pass in nil for accel_group. Next call gtk_menu_item_set_accel_path() with an appropriate path for the menu item, use gtk_stock_lookup() to look up the standard accelerator for the stock item, and if one is found, call gtk_accel_map_add_entry() to register it.

Parameters:

  • stock_id (String)

    the name of the stock item.

  • accel_group (Gtk::AccelGroup)

    the Gtk::AccelGroup to add the menu items accelerator to, or nil.

Returns:

#new_with_label(label) ⇒ Gtk::Widget

Creates a new Gtk::ImageMenuItem containing a label.

Parameters:

  • label (String)

    the text of the menu item.

Returns:

#new_with_mnemonic(label) ⇒ Gtk::Widget

Creates a new Gtk::ImageMenuItem containing a label. The label will be created using gtk_label_new_with_mnemonic(), so underscores in label indicate the mnemonic for the menu item.

Parameters:

  • label (String)

    the text of the menu item, with an underscore in front of the mnemonic character

Returns:

#use_stockTrueClass

Checks whether the label set in the menuitem is used as a stock id to select the stock item for the item.

Returns:

  • (TrueClass)

    true if the label set in the menuitem is used as a stock id to select the stock item for the item

#use_stock=(use_stock) ⇒ TrueClass

If true, the label set in the menuitem is used as a stock id to select the stock item for the item.

Parameters:

  • use_stock (TrueClass)

Returns:

  • (TrueClass)

    use-stock

  • (TrueClass)

    use-stock

#use_stock?TrueClass

If true, the label set in the menuitem is used as a stock id to select the stock item for the item.

Returns:

  • (TrueClass)

    use-stock