Trait components::ButtonGroupExt[][src]

pub trait ButtonGroupExt: 'static {
    fn add<P: Is<Button>>(&self, button: &P);
fn foreach<P: FnMut(&Actor)>(&self, callback: P);
fn get_active_button(&self) -> &Option<Button>;
fn get_allow_no_active(&self) -> bool;
fn get_buttons(&self) -> &Vec<Button>;
fn remove<P: Is<Button>>(&self, button: &P);
fn set_active_button<P: Is<Button>>(&self, button: Option<&P>);
fn set_allow_no_active(&self, allow_no_active: bool);
fn connect_property_active_button_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_allow_no_active_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }

Required methods

fn add<P: Is<Button>>(&self, button: &P)[src]

add: @group: A #ButtonGroup @button: A #Button

Add @button to the #ButtonGroup.

fn foreach<P: FnMut(&Actor)>(&self, callback: P)[src]

foreach: @group: A #ButtonGroup @callback: (scope call): A #Callback @userdata: (closure): A #gpointer

Calls @callback for each button in the group.

fn get_active_button(&self) -> &Option<Button>[src]

get_active_button: @group: A #ButtonGroup

Get the current active button

Returns: (transfer none): the currently active button

fn get_allow_no_active(&self) -> bool[src]

get_allow_no_active: @group: A #ButtonGroup

Get the value of the #ButtonGroup:allow-no-active property.

Returns: the value of the “allow-no-active” property.

fn get_buttons(&self) -> &Vec<Button>[src]

get_buttons: @group: A #ButtonGroup

Get a list of the buttons in the button group.

Returns: (element-type .Button): a list of buttons. The list is owned by the #ButtonGroup and should not be modified by the application.

fn remove<P: Is<Button>>(&self, button: &P)[src]

remove: @group: A #ButtonGroup @button: A #Button

Remove @button from the #ButtonGroup

fn set_active_button<P: Is<Button>>(&self, button: Option<&P>)[src]

set_active_button: @group: A #ButtonGroup @button: (allow-none): A #Button

Set the current active button in the group. The previous active button will have #Button:toggled set to #false.

fn set_allow_no_active(&self, allow_no_active: bool)[src]

set_allow_no_active: @group: A #ButtonGroup @allow_no_active: A #gboolean

Set the value of the #ButtonGroup:allow-no-active property.

fn connect_property_active_button_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

fn connect_property_allow_no_active_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

Loading content...

Implementors

impl<O: Is<ButtonGroup>> ButtonGroupExt for O[src]

fn add<P: Is<Button>>(&self, button: &P)[src]

add: @group: A #ButtonGroup @button: A #Button

Add @button to the #ButtonGroup.

fn foreach<P: FnMut(&Actor)>(&self, callback: P)[src]

foreach: @group: A #ButtonGroup @callback: (scope call): A #Callback @userdata: (closure): A #gpointer

Calls @callback for each button in the group.

fn get_active_button(&self) -> &Option<Button>[src]

get_active_button: @group: A #ButtonGroup

Get the current active button

Returns: (transfer none): the currently active button

fn get_allow_no_active(&self) -> bool[src]

get_allow_no_active: @group: A #ButtonGroup

Get the value of the #ButtonGroup:allow-no-active property.

Returns: the value of the “allow-no-active” property.

fn get_buttons(&self) -> &Vec<Button>[src]

get_buttons: @group: A #ButtonGroup

Get a list of the buttons in the button group.

Returns: (element-type .Button): a list of buttons. The list is owned by the #ButtonGroup and should not be modified by the application.

fn remove<P: Is<Button>>(&self, button: &P)[src]

remove: @group: A #ButtonGroup @button: A #Button

Remove @button from the #ButtonGroup

fn set_active_button<P: Is<Button>>(&self, button: Option<&P>)[src]

set_active_button: @group: A #ButtonGroup @button: (allow-none): A #Button

Set the current active button in the group. The previous active button will have #Button:toggled set to #false.

fn set_allow_no_active(&self, allow_no_active: bool)[src]

set_allow_no_active: @group: A #ButtonGroup @allow_no_active: A #gboolean

Set the value of the #ButtonGroup:allow-no-active property.

Loading content...