Trait components::ButtonExt [−][src]
pub trait ButtonExt: 'static {}Show methods
fn get_action(&self) -> Option<PushAction>; fn get_icon_name(&self) -> Option<String>; fn get_icon_position(&self) -> Position; fn get_icon_size(&self) -> u32; fn get_icon_visible(&self) -> bool; fn get_is_toggle(&self) -> bool; fn get_label(&self) -> Option<String>; fn get_label_visible(&self) -> bool; fn get_toggled(&self) -> bool; fn set_action<P: Is<PushAction>>(&self, action: &P); fn set_icon_name(&self, icon_name: Option<String>); fn set_icon_position(&self, position: Position); fn set_icon_size(&self, icon_size: u32); fn set_icon_visible(&self, visible: bool); fn set_is_toggle(&self, toggle: bool); fn set_label(&self, text: Option<String>); fn set_label_visible(&self, visible: bool); fn set_toggled(&self, toggled: bool); fn connect_clicked<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; fn connect_property_action_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_property_icon_name_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_property_icon_position_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_property_icon_size_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_property_icon_visible_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_property_is_toggle_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_property_label_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_property_label_visible_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_property_toggled_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
Required methods
fn get_action(&self) -> Option<PushAction>
[src]
get_action: @button: A #Button
Retrieves the #PushAction associated with @button.
Returns: (transfer none): A #PushAction
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
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
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
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
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
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
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
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
fn set_action<P: Is<PushAction>>(&self, action: &P)
[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.
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.
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.
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.
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.
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.
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
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.
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.
fn connect_clicked<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
[src]
fn connect_property_action_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_icon_name_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_icon_position_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_icon_size_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_icon_visible_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_is_toggle_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_label_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_label_visible_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_toggled_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: Is<Button>> ButtonExt for O
[src]
fn get_action(&self) -> Option<PushAction>
[src]
get_action: @button: A #Button
Retrieves the #PushAction associated with @button.
Returns: (transfer none): A #PushAction
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
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
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
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
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
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
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
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
fn set_action<P: Is<PushAction>>(&self, action: &P)
[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.
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.
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.
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.
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.
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.
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
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.
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.
fn connect_clicked<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
[src]
fn connect_property_action_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_icon_name_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_icon_position_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_icon_size_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_icon_visible_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_is_toggle_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_label_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_label_visible_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_toggled_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId