Struct ToolbarButtonProps
pub struct ToolbarButtonProps {
pub key: String,
pub label: String,
pub icon: Option<Icon>,
pub toggled: Option<bool>,
pub enabled: bool,
pub dot: bool,
pub priority: i64,
pub joined: bool,
pub menu: Vec<MenuItemProps>,
pub press: Event,
}Expand description
One command of a toolbar: pressing it does one thing, or opens its menu.
Fields§
§key: StringThe command’s stable key.
label: StringWhat it does, in a word or two. A command with a glyph shows only the glyph, the label naming it to assistive technology, in its tooltip and in the More menu.
icon: Option<Icon>A glyph instead of the label.
toggled: Option<bool>A command that is on or off (bold, a panel shown), and whether it is on: on, it stands lifted, and it is a checked row in the More menu.
enabled: boolWhether it can be pressed now. A command with nothing to do never can.
dot: boolA dot at its corner: something new behind it.
priority: i64How long it stays in the row where the window is narrow: higher stays longer, and of equal ones the last goes to the More menu first.
joined: boolIt goes with the command before it (zoom out, zoom in): the two go to the More menu together, never one alone.
The commands of a menu it opens instead of doing one thing: Sort, Insert, View.
press: EventIt was pressed (a click, Enter or Space, the More menu, an assistive technology).
Trait Implementations§
§impl Component for ToolbarButtonProps
impl Component for ToolbarButtonProps
fn describe() -> Description
§fn from_source(source: &mut dyn Source) -> Result<ToolbarButtonProps, Error>
fn from_source(source: &mut dyn Source) -> Result<ToolbarButtonProps, Error>
source gives. Read more§impl Default for ToolbarButtonProps
impl Default for ToolbarButtonProps
§fn default() -> ToolbarButtonProps
fn default() -> ToolbarButtonProps
Auto Trait Implementations§
impl Freeze for ToolbarButtonProps
impl !RefUnwindSafe for ToolbarButtonProps
impl !Send for ToolbarButtonProps
impl !Sync for ToolbarButtonProps
impl Unpin for ToolbarButtonProps
impl UnsafeUnpin for ToolbarButtonProps
impl !UnwindSafe for ToolbarButtonProps
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more