Class: GOffice::OptionMenu

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeGtk::Widget

Class Method Details

.build(first_entry, array) ⇒ Gtk::Widget

This function takes a nil-terminated list of string-integer pairs and fills in a menu with the given texts. Each menu entry will have a data property "value" sets to the given value. The menu is then placed inside a new GOOption::Menu which is then returned.

Parameters:

  • first_entry (String)

    text for first entry

  • array (Array)

    further values and text

Returns:

  • (Gtk::Widget)

    a new GOOption::Menu with a filled-in menu.

Instance Method Details

#historyGtk::Widget

Retrieves the currently selected menu item.

Returns:

  • (Gtk::Widget)

    the selected menu_item

#history=(selection) ⇒ nil

Selects an item. The last number in the list is the rank of the item to select in its menu and the previous ones are the ranks of the submenus containing the item to select.

Parameters:

  • selection (GLib::SList<Gtk::MenuItem>)

    a list of indices giving the menu to select.

Returns:

  • (nil)

#labelGtk::Widget

Returns The Gtk::Label used for the button text.

Returns:

  • (Gtk::Widget)

    The Gtk::Label used for the button text.

Returns menu.

Returns:

  • (Gtk::Menu)

    menu

Parameters:

  • menu (Gtk::Menu)

Returns:

  • (Gtk::Menu)

    menu

  • (Gtk::Menu)

    menu

#select_item(item) ⇒ nil

Parameters:

  • item (Gtk::MenuItem)

Returns:

  • (nil)