pub struct ComboStyle(/* private fields */);Expand description
W Style applied to all Toggle! widgets using the toggle::ComboStyle! inside Menu! root.
Gives the toggle a toolbar-item look.
Implementations§
Source§impl ComboStyle
impl ComboStyle
Sourcepub fn widget_new() -> Self
pub fn widget_new() -> Self
Start building a new instance.
Sourcepub fn widget_type() -> WidgetType
pub fn widget_type() -> WidgetType
Gets the widget type info.
Methods from Deref<Target = DefaultStyle>§
Sourcepub fn is_checked(&self, state: impl IntoVar<bool>)
pub fn is_checked(&self, state: impl IntoVar<bool>)
P If the toggle is checked from any of the three primary properties.
Note to read the tristate directly use IS_CHECKED_VAR directly.
Sourcepub fn scroll_on_select(&self, enabled: impl IntoVar<bool>)
pub fn scroll_on_select(&self, enabled: impl IntoVar<bool>)
P If the widget scrolls into view when the value selected.
This is enabled by default.
Methods from Deref<Target = DefaultStyle>§
Sourcepub fn cmd_child_fn(&self, cmd_child: impl IntoVar<WidgetFn<Command>>)
pub fn cmd_child_fn(&self, cmd_child: impl IntoVar<WidgetFn<Command>>)
Sourcepub fn cmd_tooltip_fn(
&self,
cmd_tooltip: impl IntoVar<WidgetFn<CmdTooltipArgs>>,
)
pub fn cmd_tooltip_fn( &self, cmd_tooltip: impl IntoVar<WidgetFn<CmdTooltipArgs>>, )
P Sets the widget function used to produce the button tooltip when cmd is set and tooltip is not.
Methods from Deref<Target = Style>§
Sourcepub fn replace(&self, replace: impl IntoValue<bool>)
pub fn replace(&self, replace: impl IntoValue<bool>)
B Fully replace the contextual style.
This is not enabled by default, if set to true the contextual style properties are removed.
Sourcepub fn named_style_fn(&self, name: impl IntoValue<NamedStyleVar>)
pub fn named_style_fn(&self, name: impl IntoValue<NamedStyleVar>)
B Set in the default properties of a named style to define the contextual variable for that style.
During widget instantiation, if this is set by default in a style the contextual style is used as the defaults and only the properties set on the style instance replace them.
This property is part of the named styles pattern, see impl_named_style_fn! for more details.
Note that this property expects a ContextVar<StyleFn> as a value, not a variable directly, it will also only work if
set in the default properties of a style type.
Trait Implementations§
Source§impl Deref for ComboStyle
impl Deref for ComboStyle
Auto Trait Implementations§
impl !Freeze for ComboStyle
impl !RefUnwindSafe for ComboStyle
impl !Unpin for ComboStyle
impl !UnwindSafe for ComboStyle
impl Send for ComboStyle
impl Sync for ComboStyle
impl UnsafeUnpin for ComboStyle
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> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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