[]Struct gtk::RadioMenuItem

pub struct RadioMenuItem(_, _);

A radio menu item is a check menu item that belongs to a group. At each instant exactly one of the radio menu items from a group is selected.

The group list does not need to be freed, as each RadioMenuItem will remove itself and its list item when it is destroyed.

The correct way to create a group of radio menu items is approximatively this:

How to create a group of radio menu items.

GSList *group = NULL;
GtkWidget *item;
gint i;

for (i = 0; i < 5; i++)
{
  item = gtk_radio_menu_item_new_with_label (group, "This is an example");
  group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (item));
  if (i == 1)
    gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item), TRUE);
}

CSS nodes

menuitem
├── radio.left
╰── <child>

RadioMenuItem has a main CSS node with name menuitem, and a subnode with name radio, which gets the .left or .right style class.

Implements

RadioMenuItemExt, CheckMenuItemExt, GtkMenuItemExt, BinExt, ContainerExt, WidgetExt, glib::object::ObjectExt, BuildableExt, ActionableExt, WidgetExtManual, BuildableExtManual

Implementations

impl RadioMenuItem[src]

pub fn from_widget<P: IsA<RadioMenuItem>>(group: &P) -> RadioMenuItem[src]

pub fn with_label_from_widget<P: IsA<RadioMenuItem>>(
    group: &P,
    label: Option<&str>
) -> RadioMenuItem
[src]

pub fn with_mnemonic_from_widget<P: IsA<RadioMenuItem>>(
    group: &P,
    label: Option<&str>
) -> RadioMenuItem
[src]

impl RadioMenuItem[src]

pub fn new() -> RadioMenuItem[src]

Creates a new RadioMenuItem.

group

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

Returns

a new RadioMenuItem

pub fn with_label(label: &str) -> RadioMenuItem[src]

pub fn with_mnemonic(label: &str) -> RadioMenuItem[src]

Trait Implementations

impl Clone for RadioMenuItem

impl Debug for RadioMenuItem

impl Display for RadioMenuItem[src]

impl Eq for RadioMenuItem

impl Hash for RadioMenuItem

impl IsA<Actionable> for RadioMenuItem

impl IsA<Bin> for RadioMenuItem

impl IsA<Buildable> for RadioMenuItem

impl IsA<CheckMenuItem> for RadioMenuItem

impl IsA<Container> for RadioMenuItem

impl IsA<MenuItem> for RadioMenuItem

impl IsA<Widget> for RadioMenuItem

impl Ord for RadioMenuItem

impl<T: ObjectType> PartialEq<T> for RadioMenuItem

impl<T: ObjectType> PartialOrd<T> for RadioMenuItem

impl StaticType for RadioMenuItem

Auto Trait Implementations

impl RefUnwindSafe for RadioMenuItem

impl !Send for RadioMenuItem

impl !Sync for RadioMenuItem

impl Unpin for RadioMenuItem

impl UnwindSafe for RadioMenuItem

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Super, Sub> CanDowncast<Sub> for Super where
    Sub: IsA<Super>,
    Super: IsA<Super>, 

impl<T> Cast for T where
    T: ObjectType, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ObjectExt for T where
    T: ObjectType, 

impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *const GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<Array>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.