[][src]Trait gtk::RadioMenuItemExt

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

Trait containing all RadioMenuItem methods.

Implementors

RadioMenuItem

Required methods

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

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

Returns

the group of self

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

Joins a RadioMenuItem object to the group of another RadioMenuItem object.

This function should be used by language bindings to avoid the memory manangement of the opaque glib::SList of RadioMenuItemExt::get_group and RadioMenuItem::set_group.

A common way to set up a group of 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;
    }

Feature: v3_18

group_source

a RadioMenuItem whose group we are joining, or None to remove the self from its current group

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

Loading content...

Implementors

impl<O: IsA<RadioMenuItem>> RadioMenuItemExt for O[src]

Loading content...