Trait gtk::prelude::CheckMenuItemExt[][src]

pub trait CheckMenuItemExt: 'static {
    fn is_active(&self) -> bool;
fn draws_as_radio(&self) -> bool;
fn is_inconsistent(&self) -> bool;
fn set_active(&self, is_active: bool);
fn set_draw_as_radio(&self, draw_as_radio: bool);
fn set_inconsistent(&self, setting: bool);
fn toggled(&self);
fn connect_toggled<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_active_notify<F: Fn(&Self) + 'static>(
        f: F
    ) -> SignalHandlerId;
fn connect_draw_as_radio_notify<F: Fn(&Self) + 'static>(
        f: F
    ) -> SignalHandlerId;
fn connect_inconsistent_notify<F: Fn(&Self) + 'static>(
        f: F
    ) -> SignalHandlerId; }
Expand description

Trait containing all CheckMenuItem methods.


CheckMenuItem, RadioMenuItem

Required methods

Returns whether the check menu item is active. See gtk_check_menu_item_set_active ().


true if the menu item is checked.

Returns whether self looks like a RadioMenuItem


Whether self looks like a RadioMenuItem

Retrieves the value set by set_inconsistent().


true if inconsistent

Sets the active state of the menu item’s check box.


boolean value indicating whether the check box is active.

Sets whether self is drawn like a RadioMenuItem


whether self is drawn like a RadioMenuItem

If the user has selected a range of elements (such as some text or spreadsheet cells) that are affected by a boolean setting, and the current values in that range are inconsistent, you may want to display the check in an “in between” state. This function turns on “in between” display. Normally you would turn off the inconsistent state again if the user explicitly selects a setting. This has to be done manually, set_inconsistent() only affects visual appearance, it doesn’t affect the semantics of the widget.


true to display an “inconsistent” third state check

Emits the signal::CheckMenuItem::toggled signal.

This signal is emitted when the state of the check box is changed.

A signal handler can use is_active() to discover the new state.