FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    Button

    struct · ferroui-controls · v0.5.0

    struct Button
    

    A standard button control.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<Button>
    

    Returns a strong reference to this object.

    Source

    on_click

    fn on_click(self: &Self)
    

    Invokes the Click event.

    Source

    open_flyout

    fn open_flyout(self: &Self)
    

    Opens the button's flyout.

    Source

    close_flyout

    fn close_flyout(self: &Self)
    

    Closes the button's flyout.

    Source

    on_flyout_opened

    fn on_flyout_opened(self: &Self)
    

    Invoked when the button's flyout is opened.

    Source

    on_flyout_closed

    fn on_flyout_closed(self: &Self)
    

    Invoked when the button's flyout is closed.

    Source

    PSEUDO_CLASSES

    const PSEUDO_CLASSES: PseudoClassesAttribute
    

    The pseudoclasses set by the class.

    Source

    click_mode_property

    fn click_mode_property() -> &'static StyledProperty<ClickMode>
    

    Defines the ClickMode property.

    Source

    command_property

    fn command_property() -> &'static StyledProperty<Option<Rc<dyn ICommand>>>
    

    Defines the Command property.

    Source

    hot_key_property

    fn hot_key_property() -> &'static StyledProperty<Option<KeyGesture>>
    

    Defines the HotKey property.

    Source

    command_parameter_property

    fn command_parameter_property() -> &'static StyledProperty<Option<BoxedValue>>
    

    Defines the CommandParameter property.

    Source

    is_default_property

    fn is_default_property() -> &'static StyledProperty<bool>
    

    Defines the IsDefault property.

    Source

    is_cancel_property

    fn is_cancel_property() -> &'static StyledProperty<bool>
    

    Defines the IsCancel property.

    Source

    click_event

    fn click_event() -> &'static RoutedEvent<RoutedEventArgs>
    

    Defines the Click event.

    Source

    is_pressed_property

    fn is_pressed_property() -> &'static DirectProperty<Button, bool>
    

    Defines the IsPressed property.

    Source

    flyout_property

    fn flyout_property() -> &'static StyledProperty<Option<Ref<FlyoutBase>>>
    

    Defines the Flyout property.

    Source

    construct

    fn construct() -> Self
    

    Creates the class data; see ferroui_base::FerroObject::construct.

    Source

    new

    fn new() -> Ref<Self>
    

    Creates a button.

    Source

    click

    fn click(self: &Self, handler: impl Fn(&Interactive, &RoutedEventArgs) -> () + 'static) -> RoutedEventHandlerToken
    

    Raised when the user clicks the button.

    Source

    click_mode

    fn click_mode(self: &Self) -> ClickMode
    

    A value indicating how the button should react to clicks.

    Source

    set_click_mode

    fn set_click_mode(self: &Self, value: ClickMode)
    

    Source

    command

    fn command(self: &Self) -> Option<Rc<dyn ICommand>>
    

    A command to be invoked when the button is clicked.

    Source

    set_command

    fn set_command(self: &Self, value: Option<Rc<dyn ICommand>>)
    

    Source

    hot_key

    fn hot_key(self: &Self) -> Option<KeyGesture>
    

    A key gesture associated with this control.

    Source

    set_hot_key

    fn set_hot_key(self: &Self, value: Option<KeyGesture>)
    

    Source

    command_parameter

    fn command_parameter(self: &Self) -> Option<BoxedValue>
    

    A parameter to be passed to the Command.

    Source

    set_command_parameter

    fn set_command_parameter(self: &Self, value: Option<BoxedValue>)
    

    Source

    is_default

    fn is_default(self: &Self) -> bool
    

    A value indicating whether the button is the default button for the root it is attached to.

    Source

    set_is_default

    fn set_is_default(self: &Self, value: bool)
    

    Source

    is_cancel

    fn is_cancel(self: &Self) -> bool
    

    A value indicating whether the button is the Cancel button for the root it is attached to.

    Source

    set_is_cancel

    fn set_is_cancel(self: &Self, value: bool)
    

    Source

    is_pressed

    fn is_pressed(self: &Self) -> bool
    

    A value indicating whether the button is currently pressed.

    Source

    flyout

    fn flyout(self: &Self) -> Option<Ref<FlyoutBase>>
    

    The flyout that should be shown with this button.

    Source

    set_flyout

    fn set_flyout(self: &Self, value: impl Into<Nullable<FlyoutBase>>)
    

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.