CommandBar
struct · ferroui-controls · v0.5.0
struct CommandBar
A command bar that provides primary commands displayed inline and secondary commands accessible via an overflow menu.
Members
TYPEto_refprimary_commands_propertysecondary_commands_propertycontent_propertydefault_label_position_propertyis_dynamic_overflow_enabled_propertyoverflow_button_visibility_propertyis_open_propertyis_sticky_propertyitem_width_bottom_propertyitem_width_right_propertyitem_width_collapsed_propertyhas_secondary_commands_propertyis_overflow_button_visible_propertyopening_eventopened_eventclosing_eventclosed_eventconstructnewvisible_primary_commandsoverflow_itemsprimary_commandsset_primary_commandssecondary_commandsset_secondary_commandscontentset_contentdefault_label_positionset_default_label_positionis_dynamic_overflow_enabledset_is_dynamic_overflow_enabledoverflow_button_visibilityset_overflow_button_visibilityis_openset_is_openis_stickyset_is_stickyitem_width_bottomset_item_width_bottomitem_width_rightset_item_width_rightitem_width_collapsedset_item_width_collapsedhas_secondary_commandsis_overflow_button_visibleopeningopenedclosingclosed
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<CommandBar>
Returns a strong reference to this object.
primary_commands_property
fn primary_commands_property() -> &'static StyledProperty<Option<CommandBarElementList>>
Defines the PrimaryCommands property.
secondary_commands_property
fn secondary_commands_property() -> &'static StyledProperty<Option<CommandBarElementList>>
Defines the SecondaryCommands property.
content_property
fn content_property() -> &'static StyledProperty<Option<BoxedValue>>
Defines the Content property.
default_label_position_property
fn default_label_position_property() -> &'static StyledProperty<CommandBarDefaultLabelPosition>
Defines the DefaultLabelPosition property.
is_dynamic_overflow_enabled_property
fn is_dynamic_overflow_enabled_property() -> &'static StyledProperty<bool>
Defines the IsDynamicOverflowEnabled property.
overflow_button_visibility_property
fn overflow_button_visibility_property() -> &'static StyledProperty<CommandBarOverflowButtonVisibility>
Defines the OverflowButtonVisibility property.
is_open_property
fn is_open_property() -> &'static StyledProperty<bool>
Defines the IsOpen property.
is_sticky_property
fn is_sticky_property() -> &'static StyledProperty<bool>
Defines the IsSticky property.
item_width_bottom_property
fn item_width_bottom_property() -> &'static StyledProperty<f64>
Defines the ItemWidthBottom property.
item_width_right_property
fn item_width_right_property() -> &'static StyledProperty<f64>
Defines the ItemWidthRight property.
item_width_collapsed_property
fn item_width_collapsed_property() -> &'static StyledProperty<f64>
Defines the ItemWidthCollapsed property.
has_secondary_commands_property
fn has_secondary_commands_property() -> &'static DirectProperty<CommandBar, bool>
Defines the HasSecondaryCommands property.
is_overflow_button_visible_property
fn is_overflow_button_visible_property() -> &'static DirectProperty<CommandBar, bool>
Defines the IsOverflowButtonVisible property.
opening_event
fn opening_event() -> &'static RoutedEvent<RoutedEventArgs>
Defines the Opening routed event.
opened_event
fn opened_event() -> &'static RoutedEvent<RoutedEventArgs>
Defines the Opened routed event.
closing_event
fn closing_event() -> &'static RoutedEvent<RoutedEventArgs>
Defines the Closing routed event.
closed_event
fn closed_event() -> &'static RoutedEvent<RoutedEventArgs>
Defines the Closed routed event.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new() -> Ref<Self>
Creates a command bar.
visible_primary_commands
fn visible_primary_commands(self: &Self) -> CommandBarElementCollection
Gets the read-only collection of primary commands currently visible in the bar (may be a subset when dynamic overflow is active).
overflow_items
fn overflow_items(self: &Self) -> CommandBarElementCollection
Gets the read-only collection of items shown in the overflow popup (secondary commands plus any primary commands moved to overflow by dynamic overflow).
primary_commands
fn primary_commands(self: &Self) -> CommandBarElementList
Gets the collection of primary commands displayed in the bar. A bar without a collection is given a new one.
set_primary_commands
fn set_primary_commands(self: &Self, value: Option<CommandBarElementList>)
Sets the collection of primary commands displayed in the bar.
secondary_commands
fn secondary_commands(self: &Self) -> CommandBarElementList
Gets the collection of secondary commands shown in the overflow menu. A bar without a collection is given a new one.
set_secondary_commands
fn set_secondary_commands(self: &Self, value: Option<CommandBarElementList>)
Sets the collection of secondary commands shown in the overflow menu.
content
fn content(self: &Self) -> Option<BoxedValue>
Gets the custom content displayed at the start (left) of the bar.
set_content
fn set_content(self: &Self, value: Option<BoxedValue>)
Sets the custom content displayed at the start (left) of the bar.
default_label_position
fn default_label_position(self: &Self) -> CommandBarDefaultLabelPosition
Gets how labels are positioned on command buttons.
set_default_label_position
fn set_default_label_position(self: &Self, value: CommandBarDefaultLabelPosition)
Sets how labels are positioned on command buttons.
is_dynamic_overflow_enabled
fn is_dynamic_overflow_enabled(self: &Self) -> bool
Gets whether primary commands are automatically moved to the overflow menu when there is not enough space to display them.
set_is_dynamic_overflow_enabled
fn set_is_dynamic_overflow_enabled(self: &Self, value: bool)
Sets whether primary commands are automatically moved to the overflow menu when there is not enough space to display them.
overflow_button_visibility
fn overflow_button_visibility(self: &Self) -> CommandBarOverflowButtonVisibility
Gets the visibility of the overflow button.
set_overflow_button_visibility
fn set_overflow_button_visibility(self: &Self, value: CommandBarOverflowButtonVisibility)
Sets the visibility of the overflow button.
is_open
fn is_open(self: &Self) -> bool
Gets whether the overflow menu is open.
set_is_open
fn set_is_open(self: &Self, value: bool)
Sets whether the overflow menu is open.
is_sticky
fn is_sticky(self: &Self) -> bool
Gets whether the overflow menu stays open after a command is invoked (disables light-dismiss behavior).
set_is_sticky
fn set_is_sticky(self: &Self, value: bool)
Sets whether the overflow menu stays open after a command is invoked (disables light-dismiss behavior).
item_width_bottom
fn item_width_bottom(self: &Self) -> f64
Gets the estimated item width used in dynamic-overflow calculations
when the default label position is
CommandBarDefaultLabelPosition::Bottom.
set_item_width_bottom
fn set_item_width_bottom(self: &Self, value: f64)
Sets the estimated item width used when the labels are at the bottom.
item_width_right
fn item_width_right(self: &Self) -> f64
Gets the estimated item width used in dynamic-overflow calculations
when the default label position is
CommandBarDefaultLabelPosition::Right.
set_item_width_right
fn set_item_width_right(self: &Self, value: f64)
Sets the estimated item width used when the labels are on the right.
item_width_collapsed
fn item_width_collapsed(self: &Self) -> f64
Gets the estimated item width used in dynamic-overflow calculations
when the default label position is
CommandBarDefaultLabelPosition::Collapsed.
set_item_width_collapsed
fn set_item_width_collapsed(self: &Self, value: f64)
Sets the estimated item width used when the labels are collapsed.
has_secondary_commands
fn has_secondary_commands(self: &Self) -> bool
Gets whether there are any commands (secondary or overflowed primary) in the overflow menu.
is_overflow_button_visible
fn is_overflow_button_visible(self: &Self) -> bool
Gets whether the overflow button is currently visible.
opening
fn opening(self: &Self, handler: impl Fn(&Interactive, &RoutedEventArgs) -> () + 'static) -> RoutedEventHandlerToken
Occurs when the overflow menu is about to open.
opened
fn opened(self: &Self, handler: impl Fn(&Interactive, &RoutedEventArgs) -> () + 'static) -> RoutedEventHandlerToken
Occurs when the overflow menu has opened.
closing
fn closing(self: &Self, handler: impl Fn(&Interactive, &RoutedEventArgs) -> () + 'static) -> RoutedEventHandlerToken
Occurs when the overflow menu is about to close.
closed
fn closed(self: &Self, handler: impl Fn(&Interactive, &RoutedEventArgs) -> () + 'static) -> RoutedEventHandlerToken
Occurs when the overflow menu has closed.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeTemplatedControlImplExtControlImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherDerefUpcast<T>Upcast<CommandBar>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleStyledElementImplInteractiveImplInputElementImplControlImplFerroObjectImplVisualImplLayoutableImplTemplatedControlImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.