Struct ux::native::Button [−][src]
pub struct Button { /* fields omitted */ }
Implementations
impl Button
[src]
Trait Implementations
impl AsRef<Actor> for Button
[src]
impl AsRef<Button> for Button
[src]
impl AsRef<Widget> for Button
[src]
impl Clone for Button
[src]
impl Debug for Button
[src]
impl Default for Button
[src]
impl Display for Button
[src]
impl Is<Actor> for Button
[src]
impl Is<Button> for Button
[src]
impl Is<Widget> for Button
[src]
impl Object for Button
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Button
impl !Send for Button
impl !Sync for Button
impl Unpin for Button
impl UnwindSafe for Button
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<O> ButtonExt for O where
O: Is<Button>,
[src]
O: Is<Button>,
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]
P: Is<PushAction>,
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(&O),
[src]
F: 'static + Fn(&O),
pub fn connect_property_action_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),
pub fn connect_property_icon_name_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),
pub fn connect_property_icon_position_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),
pub fn connect_property_icon_size_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),
pub fn connect_property_icon_visible_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),
pub fn connect_property_is_toggle_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),
pub fn connect_property_label_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),
pub fn connect_property_label_visible_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),
pub fn connect_property_toggled_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<O> WidgetExt for O where
O: Is<Widget>,
[src]
O: Is<Widget>,
pub fn apply_style<P>(&self, style: &P) where
P: Is<Style>,
[src]
P: Is<Style>,
widget_apply_style: @widget: A #Widget @style: A #Style
Used to implement how a new style instance should be applied in the widget. For instance, setting style instance on stylable internal children.
pub fn get_available_area(&self, allocation: &ActorBox, area: &mut ActorBox)
[src]
get_available_area: @widget: A #Widget @allocation: A #ActorBox @area: A #ActorBox
Copies @allocation into @area and accounts for the padding values. This gives the area that is available in which to allocate children with respect to padding.
pub fn get_background_color(&self) -> Option<Color>
[src]
get_background_color: @actor: A #Widget
Get the color used as the background. This is set using the “background-color” CSS property. This function should normally only be used by subclasses.
Returns: (transfer none): a #Color
pub fn get_background_texture(&self) -> Option<Handle>
[src]
pub fn get_disabled(&self) -> bool
[src]
get_disabled: @widget: an #Widget
Get the value of the “disabled” property.
pub fn get_padding(&self) -> Padding
[src]
get_padding: @widget: A #Widget @padding: (out): A pointer to an #Padding to fill
Gets the padding of the widget, set using the “padding” CSS property. This function should normally only be used by subclasses.
pub fn long_press_cancel(&self)
[src]
long_press_cancel: @widget: An Widget
Cancel a long-press timeout if one is running and emit the signal to notify that the long-press has been cancelled.
pub fn long_press_query(&self, event: &mut Event)
[src]
long_press_query: @widget: An Widget @event: the event used to determine whether to run a long-press
Emit the long-press query signal and start a long-press timeout if required.
pub fn set_disabled(&self, disabled: bool)
[src]
widget_set_disabled: @widget: an #Widget @disabled: value to set
Set the disabled property. Disabled widgets have a “disabled” pseudo-class until disabled is set to #false.
pub fn connect_property_disabled_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),
pub fn connect_property_menu_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),
pub fn connect_property_tooltip_delay_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),
pub fn connect_property_tooltip_text_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),