[][src]Trait gtk::RadioButtonExt

pub trait RadioButtonExt: 'static {
    fn get_group(&self) -> Vec<RadioButton>;
fn join_group<P: IsA<RadioButton>>(&self, group_source: Option<&P>);
fn connect_group_changed<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }

Trait containing all RadioButton methods.

Implementors

RadioButton

Required methods

fn get_group(&self) -> Vec<RadioButton>

Retrieves the group assigned to a radio button.

Returns

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

fn join_group<P: IsA<RadioButton>>(&self, group_source: Option<&P>)

Joins a RadioButton object to the group of another RadioButton object

Use this in language bindings instead of the RadioButtonExt::get_group and RadioButton::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;
    }

group_source

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

fn connect_group_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Emitted when the group of radio buttons that a radio button belongs to changes. This is emitted when a radio button switches from being alone to being part of a group of 2 or more buttons, or vice-versa, and when a button is moved from one group of 2 or more buttons to a different one, but not when the composition of the group that a button belongs to changes.

Loading content...

Implementors

impl<O: IsA<RadioButton>> RadioButtonExt for O[src]

Loading content...