FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    SplitButton

    struct · ferroui-controls · v0.5.0

    struct SplitButton
    

    A button with primary and secondary parts that can each be pressed separately. The primary part behaves like a Button and the secondary part opens a flyout.

    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<SplitButton>
    

    Returns a strong reference to this object.

    Source

    internal_is_checked

    fn internal_is_checked(self: &Self) -> bool
    

    A value indicating whether the button is currently checked.

    This member exists only for the derived toggle split button and is unused (false) within the split button. Doing this allows the two controls to share a default style.

    Source

    on_click_primary

    fn on_click_primary(self: &Self, e: Option<&RoutedEventArgs>)
    

    Invokes the Click event when the primary button part is clicked. e are the event args from the internal click event.

    Source

    on_click_secondary

    fn on_click_secondary(self: &Self, e: Option<&RoutedEventArgs>)
    

    Invoked when the secondary button part is clicked. e are the event args from the internal click event.

    Source

    on_flyout_opened

    fn on_flyout_opened(self: &Self)
    

    Invoked when the split button's flyout is opened.

    Source

    on_flyout_closed

    fn on_flyout_closed(self: &Self)
    

    Invoked when the split button's flyout is closed.

    Source

    TEMPLATE_PARTS

    const TEMPLATE_PARTS: &'static [TemplatePartAttribute]
    

    The named parts expected in the control template, in addition to those of the base class.

    Source

    PSEUDO_CLASSES

    const PSEUDO_CLASSES: PseudoClassesAttribute
    

    The pseudoclasses set by the class.

    Source

    click_event

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

    Defines the Click event.

    Source

    command_property

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

    Defines the Command property.

    Source

    command_parameter_property

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

    Defines the CommandParameter property.

    Source

    flyout_property

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

    Defines the Flyout property.

    Source

    hot_key_property

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

    Defines the HotKey property.

    Source

    construct

    fn construct() -> Self
    

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

    Source

    new

    fn new() -> Ref<Self>
    

    Creates a split button.

    Source

    click

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

    Raised when the user presses the primary part of the split button.

    Source

    command

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

    The command invoked when the primary part is pressed.

    Source

    set_command

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

    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

    flyout

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

    The flyout that will be shown when the secondary part is pressed.

    Source

    set_flyout

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

    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

    update_pseudo_classes

    fn update_pseudo_classes(self: &Self)
    

    Updates the visual state of the control by applying the latest pseudoclasses.

    Source

    open_flyout

    fn open_flyout(self: &Self)
    

    Opens the secondary button's flyout.

    Source

    close_flyout

    fn close_flyout(self: &Self)
    

    Closes the secondary button's flyout.

    Source

    Trait implementations

    Availability

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