Trait ux::ButtonExt[][src]

pub trait ButtonExt: 'static {
Show methods pub fn get_action(&self) -> Option<PushAction>;
pub fn get_icon_name(&self) -> Option<String>;
pub fn get_icon_position(&self) -> Position;
pub fn get_icon_size(&self) -> u32;
pub fn get_icon_visible(&self) -> bool;
pub fn get_is_toggle(&self) -> bool;
pub fn get_label(&self) -> Option<String>;
pub fn get_label_visible(&self) -> bool;
pub fn get_toggled(&self) -> bool;
pub fn set_action<P>(&self, action: &P)
    where
        P: Is<PushAction>
;
pub fn set_icon_name(&self, icon_name: Option<String>);
pub fn set_icon_position(&self, position: Position);
pub fn set_icon_size(&self, icon_size: u32);
pub fn set_icon_visible(&self, visible: bool);
pub fn set_is_toggle(&self, toggle: bool);
pub fn set_label(&self, text: Option<String>);
pub fn set_label_visible(&self, visible: bool);
pub fn set_toggled(&self, toggled: bool);
pub fn connect_clicked<F>(&self, f: F) -> SignalHandlerId
    where
        F: 'static + Fn(&Self)
;
pub fn connect_property_action_notify<F>(&self, f: F) -> SignalHandlerId
    where
        F: 'static + Fn(&Self)
;
pub fn connect_property_icon_name_notify<F>(&self, f: F) -> SignalHandlerId
    where
        F: 'static + Fn(&Self)
;
pub fn connect_property_icon_position_notify<F>(
        &self,
        f: F
    ) -> SignalHandlerId
    where
        F: 'static + Fn(&Self)
;
pub fn connect_property_icon_size_notify<F>(&self, f: F) -> SignalHandlerId
    where
        F: 'static + Fn(&Self)
;
pub fn connect_property_icon_visible_notify<F>(
        &self,
        f: F
    ) -> SignalHandlerId
    where
        F: 'static + Fn(&Self)
;
pub fn connect_property_is_toggle_notify<F>(&self, f: F) -> SignalHandlerId
    where
        F: 'static + Fn(&Self)
;
pub fn connect_property_label_notify<F>(&self, f: F) -> SignalHandlerId
    where
        F: 'static + Fn(&Self)
;
pub fn connect_property_label_visible_notify<F>(
        &self,
        f: F
    ) -> SignalHandlerId
    where
        F: 'static + Fn(&Self)
;
pub fn connect_property_toggled_notify<F>(&self, f: F) -> SignalHandlerId
    where
        F: 'static + Fn(&Self)
;
}

Required methods

pub fn get_action(&self) -> Option<PushAction>[src]

get_action: @button: A #Button

Retrieves the #PushAction associated with @button.

Returns: (transfer none): A #PushAction

pub fn get_icon_name(&self) -> Option<String>[src]

get_icon_name: @button: a #Button

Get the icon-name being used on the button.

Returns: the icon-name. This must not be freed by the application. %None if no icon has been set

pub fn get_icon_position(&self) -> Position[src]

get_icon_position: @button: A #Button

Retrieves the icon’s relative position to the text.

Returns: A #Position

pub fn get_icon_size(&self) -> u32[src]

get_icon_size: @button: a #Button

Retrieves the icon-size being used for the displayed icon inside the button.

Returns: The icon-size being used for the button icon, in pixels

pub fn get_icon_visible(&self) -> bool[src]

get_icon_visible: @button: A #Button

Retrieves the visibility of the icon associated with the button’s action.

Returns: %true if the icon is visible, %false otherwise

pub fn get_is_toggle(&self) -> bool[src]

get_is_toggle: @button: a #Button

Get the toggle mode status of the button.

Returns: #true if toggle mode is set, otherwise #false

pub fn get_label(&self) -> Option<String>[src]

get_label: @button: a #Button

Get the text displayed on the button

Returns: the text for the button. This must not be freed by the application

pub fn get_label_visible(&self) -> bool[src]

get_label_visible: @button: A #Button

Retrieves the visibility of the text associated with the button’s action.

Returns: %true if the text is visible, %false otherwise

pub fn get_toggled(&self) -> bool[src]

get_toggled: @button: a #Button

Get the state of the button that is in toggle mode.

Returns: #true if the button is toggled, or #false if not

pub fn set_action<P>(&self, action: &P) where
    P: Is<PushAction>, 
[src]

set_action: @button: A #Button @action: A #PushAction

Sets @action as the action for @button. @Button will take its label and icon from @action.

pub fn set_icon_name(&self, icon_name: Option<String>)[src]

set_icon_name: @button: a #Button @icon_name: (allow-none): icon-name to use on the button

Sets the icon-name used to display an icon on the button. Setting %None will remove the icon name, or resort to the icon-name set in the current style. Setting an icon name overrides any icon set in the style.

pub fn set_icon_position(&self, position: Position)[src]

set_icon_position: @button: A #Button @position: A #Position

Sets the icon position, relative to the text on the button.

pub fn set_icon_size(&self, icon_size: u32)[src]

set_icon_size: @button: a #Button

Sets the icon-size to use for the icon displayed inside the button. This will override the icon-size set in the style. Setting a value of %0 resets to the size from the style.

pub fn set_icon_visible(&self, visible: bool)[src]

set_icon_visible: @button: A #Button @visible: %true if the icon should be visible

Sets the visibility of the icon associated with the button’s action.

pub fn set_is_toggle(&self, toggle: bool)[src]

set_is_toggle: @button: a #Button @toggle: #true or #false

Enables or disables toggle mode for the button. In toggle mode, the active state will be “toggled” when the user clicks the button.

pub fn set_label(&self, text: Option<String>)[src]

set_label: @button: a #Button @text: text to set the label to

Sets the text displayed on the button

pub fn set_label_visible(&self, visible: bool)[src]

set_label_visible: @button: A #Button @visible: %true if the text should be visible

Sets the visibility of the text associated with the button’s action.

pub fn set_toggled(&self, toggled: bool)[src]

set_toggled: @button: a #Button @toggled: #true or #false

Sets the toggled state of the button. This is only really useful if the button has #toggle-mode mode set to #true.

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

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

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

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

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

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

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

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

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

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

Loading content...

Implementors

impl<O> ButtonExt for O where
    O: Is<Button>, 
[src]

pub fn get_action(&self) -> Option<PushAction>[src]

get_action: @button: A #Button

Retrieves the #PushAction associated with @button.

Returns: (transfer none): A #PushAction

pub fn get_icon_name(&self) -> Option<String>[src]

get_icon_name: @button: a #Button

Get the icon-name being used on the button.

Returns: the icon-name. This must not be freed by the application. %None if no icon has been set

pub fn get_icon_position(&self) -> Position[src]

get_icon_position: @button: A #Button

Retrieves the icon’s relative position to the text.

Returns: A #Position

pub fn get_icon_size(&self) -> u32[src]

get_icon_size: @button: a #Button

Retrieves the icon-size being used for the displayed icon inside the button.

Returns: The icon-size being used for the button icon, in pixels

pub fn get_icon_visible(&self) -> bool[src]

get_icon_visible: @button: A #Button

Retrieves the visibility of the icon associated with the button’s action.

Returns: %true if the icon is visible, %false otherwise

pub fn get_is_toggle(&self) -> bool[src]

get_is_toggle: @button: a #Button

Get the toggle mode status of the button.

Returns: #true if toggle mode is set, otherwise #false

pub fn get_label(&self) -> Option<String>[src]

get_label: @button: a #Button

Get the text displayed on the button

Returns: the text for the button. This must not be freed by the application

pub fn get_label_visible(&self) -> bool[src]

get_label_visible: @button: A #Button

Retrieves the visibility of the text associated with the button’s action.

Returns: %true if the text is visible, %false otherwise

pub fn get_toggled(&self) -> bool[src]

get_toggled: @button: a #Button

Get the state of the button that is in toggle mode.

Returns: #true if the button is toggled, or #false if not

pub fn set_action<P>(&self, action: &P) where
    P: Is<PushAction>, 
[src]

set_action: @button: A #Button @action: A #PushAction

Sets @action as the action for @button. @Button will take its label and icon from @action.

pub fn set_icon_name(&self, icon_name: Option<String>)[src]

set_icon_name: @button: a #Button @icon_name: (allow-none): icon-name to use on the button

Sets the icon-name used to display an icon on the button. Setting %None will remove the icon name, or resort to the icon-name set in the current style. Setting an icon name overrides any icon set in the style.

pub fn set_icon_position(&self, position: Position)[src]

set_icon_position: @button: A #Button @position: A #Position

Sets the icon position, relative to the text on the button.

pub fn set_icon_size(&self, icon_size: u32)[src]

set_icon_size: @button: a #Button

Sets the icon-size to use for the icon displayed inside the button. This will override the icon-size set in the style. Setting a value of %0 resets to the size from the style.

pub fn set_icon_visible(&self, visible: bool)[src]

set_icon_visible: @button: A #Button @visible: %true if the icon should be visible

Sets the visibility of the icon associated with the button’s action.

pub fn set_is_toggle(&self, toggle: bool)[src]

set_is_toggle: @button: a #Button @toggle: #true or #false

Enables or disables toggle mode for the button. In toggle mode, the active state will be “toggled” when the user clicks the button.

pub fn set_label(&self, text: Option<String>)[src]

set_label: @button: a #Button @text: text to set the label to

Sets the text displayed on the button

pub fn set_label_visible(&self, visible: bool)[src]

set_label_visible: @button: A #Button @visible: %true if the text should be visible

Sets the visibility of the text associated with the button’s action.

pub fn set_toggled(&self, toggled: bool)[src]

set_toggled: @button: a #Button @toggled: #true or #false

Sets the toggled state of the button. This is only really useful if the button has #toggle-mode mode set to #true.

Loading content...