Class: Gtk::MenuItem

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

Instance Method Summary collapse

Instance Method Details

#accel_pathString

Sets the accelerator path of the menu item, through which runtime changes of the menu item’s accelerator caused by the user can be identified and saved to persistant storage.

Returns:

  • (String)

    accel-path

#accel_path=(accel_path) ⇒ String

Sets the accelerator path of the menu item, through which runtime changes of the menu item’s accelerator caused by the user can be identified and saved to persistant storage.

Parameters:

  • accel_path (String)

Returns:

  • (String)

    accel-path

  • (String)

    accel-path

#activatenil

Emits the Gtk::MenuItem::activate signal on the given item

Returns:

  • (nil)

#deselectnil

Emits the Gtk::MenuItem::deselect signal on the given item.

Returns:

  • (nil)

#labelString

The text for the child label.

Returns:

  • (String)

    label

#label=(label) ⇒ String

The text for the child label.

Parameters:

  • label (String)

Returns:

  • (String)

    label

  • (String)

    label

#newGtk::Widget

Creates a new Gtk::MenuItem.

Returns:

#new_with_label(label) ⇒ Gtk::Widget

Creates a new Gtk::MenuItem whose child is a #GtkLabel.

Parameters:

  • label (String)

    the text for the label

Returns:

#new_with_mnemonic(label) ⇒ Gtk::Widget

Creates a new Gtk::MenuItem 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 button, with an underscore in front of the mnemonic character

Returns:

#reserve_indicatorTrueClass

Returns whether the menu_item reserves space for the submenu indicator, regardless if it has a submenu or not.

Returns:

  • (TrueClass)

    true if menu_item always reserves space for the submenu indicator

#reserve_indicator=(reserve) ⇒ nil

Sets whether the menu_item should reserve space for the submenu indicator, regardless if it actually has a submenu or not.

There should be little need for applications to call this functions.

Parameters:

  • reserve (TrueClass)

    the new value

Returns:

  • (nil)

#right_justifiedTrueClass

Gets whether the menu item appears justified at the right side of the menu bar.

Returns:

  • (TrueClass)

    true if the menu item will appear at the far right if added to a menu bar.

#right_justified=(right_justified) ⇒ TrueClass

Sets whether the menu item appears justified at the right side of a menu bar.

Parameters:

  • right_justified (TrueClass)

Returns:

  • (TrueClass)

    right-justified

  • (TrueClass)

    right-justified

#right_justified?TrueClass

Sets whether the menu item appears justified at the right side of a menu bar.

Returns:

  • (TrueClass)

    right-justified

#selectnil

Emits the Gtk::MenuItem::select signal on the given item.

Returns:

  • (nil)

The submenu attached to the menu item, or nil if it has none.

Returns:

The submenu attached to the menu item, or nil if it has none.

Parameters:

Returns:

#toggle_size_allocate(allocation) ⇒ nil

Emits the Gtk::MenuItem::toggle-size-allocate signal on the given item.

Parameters:

  • allocation (Integer)

    the allocation to use as signal data.

Returns:

  • (nil)

#toggle_size_request(requisition) ⇒ nil

Emits the Gtk::MenuItem::toggle-size-request signal on the given item.

Parameters:

  • requisition (Integer)

    the requisition to use as signal data.

Returns:

  • (nil)

#use_underlineTrueClass

Checks if an underline in the text indicates the next character should be used for the mnemonic accelerator key.

Returns:

  • (TrueClass)

    true if an embedded underline in the label indicates the mnemonic accelerator key.

#use_underline=(use_underline) ⇒ TrueClass

true if underlines in the text indicate mnemonics.

Parameters:

  • use_underline (TrueClass)

Returns:

  • (TrueClass)

    use-underline

  • (TrueClass)

    use-underline

#use_underline?TrueClass

true if underlines in the text indicate mnemonics.

Returns:

  • (TrueClass)

    use-underline