Class: Gtk::RadioMenuItem

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

Instance Method Summary collapse

Instance Method Details

#groupGLib::SList

Returns the group to which the radio menu item belongs, as a #GList of Gtk::RadioMenuItem. The list belongs to GTK+ and should not be freed.

Returns:

  • (GLib::SList)

    the group of radio_menu_item

#group=(group) ⇒ Gtk::RadioMenuItem

The radio menu item whose group this widget belongs to.

Parameters:

Returns:

#join_group(group_source) ⇒ nil

Joins a Gtk::RadioMenuItem object to the group of another #GtkRadioMenuItem object.

This function should be used by language bindings to avoid the memory manangement of the opaque #GSList of gtk_radio_menu_item_get_group() and gtk_radio_menu_item_set_group().

A common way to set up a group of Gtk::RadioMenuItem instances is:

|[

GtkRadioMenuItem *last_item = NULL;

while ( ...more items to add... )
  {
    GtkRadioMenuItem *radio_item;

    radio_item = gtk_radio_menu_item_new (...);

    gtk_radio_menu_item_join_group (radio_item, last_item);
    last_item = radio_item;
  }

]|

Parameters:

  • group_source (Gtk::RadioMenuItem)

    a Gtk::RadioMenuItem whose group we are joining, or nil to remove the radio_menu_item from its current group

Returns:

  • (nil)

#new(group) ⇒ Gtk::Widget

Creates a new Gtk::RadioMenuItem.

Parameters:

  • group (GLib::SList)

    the group to which the radio menu item is to be attached, or nil

Returns:

#new_from_widget(group) ⇒ Gtk::Widget

Creates a new Gtk::RadioMenuItem adding it to the same group as group.

Parameters:

Returns:

#new_with_label(group, label) ⇒ Gtk::Widget

Creates a new Gtk::RadioMenuItem whose child is a simple #GtkLabel.

Parameters:

  • group (GLib::SList)

    group the radio menu item is inside, or nil

  • label (String)

    the text for the label

Returns:

#new_with_label_from_widget(group, label) ⇒ Gtk::Widget

Creates a new GtkRadioMenuItem whose child is a simple GtkLabel. The new Gtk::RadioMenuItem is added to the same group as group.

Parameters:

  • group (Gtk::RadioMenuItem)

    an existing Gtk::RadioMenuItem

  • label (String)

    the text for the label

Returns:

#new_with_mnemonic(group, label) ⇒ Gtk::Widget

Creates a new Gtk::RadioMenuItem 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:

  • group (GLib::SList)

    group the radio menu item is inside, or nil

  • label (String)

    the text of the button, with an underscore in front of the mnemonic character

Returns:

#new_with_mnemonic_from_widget(group, label) ⇒ Gtk::Widget

Creates a new GtkRadioMenuItem 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.

The new Gtk::RadioMenuItem is added to the same group as group.

Parameters:

  • group (Gtk::RadioMenuItem)

    An existing Gtk::RadioMenuItem

  • label (String)

    the text of the button, with an underscore in front of the mnemonic character

Returns: