Class: Gtk::RadioButton

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

Instance Method Summary collapse

Instance Method Details

#groupGLib::SList

Retrieves the group assigned to a radio button. containing all the radio buttons in the same group as radio_button. The returned list is owned by the radio button and must not be modified or freed.

Returns:

  • (GLib::SList)

    a linked list

#group=(group) ⇒ Gtk::RadioButton

Sets a new group for a radio button.

Parameters:

Returns:

#join_group(group_source) ⇒ nil

Joins a Gtk::RadioButton object to the group of another #GtkRadioButton object

Use this in language bindings instead of the gtk_radio_button_get_group() and gtk_radio_button_set_group() methods

A common way to set up a group of radio buttons is the following:

GtkRadioButton *radio_button;
GtkRadioButton *last_button;

while (some_condition)
  {
     radio_button = gtk_radio_button_new (NULL);

     gtk_radio_button_join_group (radio_button, last_button);
     last_button = radio_button;
  }

Parameters:

  • group_source (Gtk::RadioButton)

    a radio button object whos group we are joining, or nil to remove the radio button from its group

Returns:

  • (nil)

#new(group) ⇒ Gtk::Widget

Creates a new Gtk::RadioButton. To be of any practical value, a widget should then be packed into the radio button.

Parameters:

  • group (GLib::SList)

    an existing radio button group, or nil if you are creating a new group.

Returns:

#new_from_widget(radio_group_member) ⇒ Gtk::Widget

Creates a new Gtk::RadioButton, adding it to the same group as radio_group_member. As with gtk_radio_button_new(), a widget should be packed into the radio button.

Parameters:

Returns:

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

Creates a new Gtk::RadioButton with a text label.

Parameters:

  • group (GLib::SList)

    an existing radio button group, or nil if you are creating a new group.

  • label (String)

    the text label to display next to the radio button.

Returns:

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

Creates a new Gtk::RadioButton with a text label, adding it to the same group as radio_group_member.

Parameters:

  • radio_group_member (Gtk::RadioButton)

    widget to get radio group from or nil

  • label (String)

    a text string to display next to the radio button.

Returns:

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

Creates a new Gtk::RadioButton containing a label, adding it to the same group as group. The label will be created using gtk_label_new_with_mnemonic(), so underscores in label indicate the mnemonic for the button.

Parameters:

  • group (GLib::SList)

    the radio button group, or nil

  • label (String)

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

Returns:

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

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

Parameters:

  • radio_group_member (Gtk::RadioButton)

    widget to get radio group from or nil

  • label (String)

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

Returns: