FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    CommandBarButton

    struct · ferroui-controls · v0.5.0

    struct CommandBarButton
    

    A button for use in a CommandBar.

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

    Returns a strong reference to this object.

    Source

    label_property

    fn label_property() -> &'static StyledProperty<Option<String>>
    

    Defines the Label property.

    Source

    icon_property

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

    Defines the Icon property.

    Source

    is_compact_property

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

    Defines the IsCompact property.

    Source

    dynamic_overflow_order_property

    fn dynamic_overflow_order_property() -> &'static StyledProperty<i32>
    

    Defines the DynamicOverflowOrder property.

    Source

    label_position_property

    fn label_position_property() -> &'static StyledProperty<CommandBarDefaultLabelPosition>
    

    Defines the LabelPosition property.

    Source

    is_in_overflow_property

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

    Defines the IsInOverflow property.

    Source

    construct

    fn construct() -> Self
    

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

    Source

    new

    fn new() -> Ref<Self>
    

    Creates the button.

    Source

    as_command_bar_element

    fn as_command_bar_element(self: &Self) -> Rc<dyn ICommandBarElement>
    

    The button as a command bar element.

    Source

    label

    fn label(self: &Self) -> Option<String>
    

    Gets the text label for the button.

    Source

    set_label

    fn set_label(self: &Self, value: Option<&str>)
    

    Sets the text label for the button.

    Source

    icon

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

    Gets the icon content for the button.

    Source

    set_icon

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

    Sets the icon content for the button.

    Source

    is_compact

    fn is_compact(self: &Self) -> bool
    

    Gets whether the button is in compact mode (icon only, label hidden).

    Source

    set_is_compact

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

    Sets whether the button is in compact mode (icon only, label hidden).

    Source

    dynamic_overflow_order

    fn dynamic_overflow_order(self: &Self) -> i32
    

    Gets the order in which this button moves to the overflow menu when space is limited. Lower values have higher priority (stay visible longer).

    Source

    set_dynamic_overflow_order

    fn set_dynamic_overflow_order(self: &Self, value: i32)
    

    Sets the order in which this button moves to the overflow menu when space is limited.

    Source

    label_position

    fn label_position(self: &Self) -> CommandBarDefaultLabelPosition
    

    Gets the label position. This is set automatically by the parent command bar.

    Source

    set_label_position

    fn set_label_position(self: &Self, value: CommandBarDefaultLabelPosition)
    

    Sets the label position. This is set automatically by the parent command bar.

    Source

    is_in_overflow

    fn is_in_overflow(self: &Self) -> bool
    

    Gets whether this button is displayed inside the overflow popup.

    Source

    set_is_in_overflow

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

    Sets whether this button is displayed inside the overflow popup. Set automatically by the command bar when moving items between primary and overflow.

    Source

    Trait implementations

    Availability

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