CommandBarToggleButton
struct · ferroui-controls · v0.5.0
struct CommandBarToggleButton
A toggle button for use in a CommandBar.
Members
TYPEto_reflabel_propertyicon_propertyis_compact_propertydynamic_overflow_order_propertylabel_position_propertyis_in_overflow_propertyconstructnewas_command_bar_elementlabelset_labeliconset_iconis_compactset_is_compactdynamic_overflow_orderset_dynamic_overflow_orderlabel_positionset_label_positionis_in_overflowset_is_in_overflow
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<CommandBarToggleButton>
Returns a strong reference to this object.
label_property
fn label_property() -> &'static StyledProperty<Option<String>>
Defines the Label property.
icon_property
fn icon_property() -> &'static StyledProperty<Option<BoxedValue>>
Defines the Icon property.
is_compact_property
fn is_compact_property() -> &'static StyledProperty<bool>
Defines the IsCompact property.
dynamic_overflow_order_property
fn dynamic_overflow_order_property() -> &'static StyledProperty<i32>
Defines the DynamicOverflowOrder property.
label_position_property
fn label_position_property() -> &'static StyledProperty<CommandBarDefaultLabelPosition>
Defines the LabelPosition property.
is_in_overflow_property
fn is_in_overflow_property() -> &'static StyledProperty<bool>
Defines the IsInOverflow property.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new() -> Ref<Self>
Creates the button.
as_command_bar_element
fn as_command_bar_element(self: &Self) -> Rc<dyn ICommandBarElement>
The button as a command bar element.
label
fn label(self: &Self) -> Option<String>
Gets the text label for the button.
set_label
fn set_label(self: &Self, value: Option<&str>)
Sets the text label for the button.
icon
fn icon(self: &Self) -> Option<BoxedValue>
Gets the icon content for the button.
set_icon
fn set_icon(self: &Self, value: Option<BoxedValue>)
Sets the icon content for the button.
is_compact
fn is_compact(self: &Self) -> bool
Gets whether the button is in compact mode (icon only, label hidden).
set_is_compact
fn set_is_compact(self: &Self, value: bool)
Sets whether the button is in compact mode (icon only, label hidden).
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).
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.
label_position
fn label_position(self: &Self) -> CommandBarDefaultLabelPosition
Gets the label position. This is set automatically by the parent command bar.
set_label_position
fn set_label_position(self: &Self, value: CommandBarDefaultLabelPosition)
Sets the label position. This is set automatically by the parent command bar.
is_in_overflow
fn is_in_overflow(self: &Self) -> bool
Gets whether this button is displayed inside the overflow popup.
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.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeTemplatedControlImplExtToggleButtonImplExtContentControlImplExtControlImplExtButtonImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherDerefUpcast<T>Upcast<CommandBarToggleButton>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleFerroObjectImplStyledElementImplVisualImplLayoutableImplInteractiveImplInputElementImplControlImplTemplatedControlImplContentControlImplButtonImplToggleButtonImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.