pub struct StyleBuilder { /* private fields */ }Expand description
Represents a style instance.
Use the Style! widget to declare.
Implementations§
Source§impl StyleBuilder
impl StyleBuilder
Sourcepub const WIDGET_IMPORTANCE: Importance
pub const WIDGET_IMPORTANCE: Importance
Importance of style properties set by default in style widgets.
Is Importance::WIDGET - 10.
Sourcepub const INSTANCE_IMPORTANCE: Importance
pub const INSTANCE_IMPORTANCE: Importance
Importance of style properties set in style instances.
Is Importance::INSTANCE - 10.
Sourcepub const POSITION_OFFSET: u16 = 1u16
pub const POSITION_OFFSET: u16 = 1u16
Negative offset on the position index of style properties.
Is 1.
Sourcepub fn from_builder(wgt: WidgetBuilder) -> StyleBuilder
pub fn from_builder(wgt: WidgetBuilder) -> StyleBuilder
New style from a widget builder.
The importance and position index of properties are adjusted, any custom build or widget build action is ignored.
Sourcepub fn into_builder(self) -> WidgetBuilder
pub fn into_builder(self) -> WidgetBuilder
Unwrap the style dynamic widget.
Sourcepub fn extend(&mut self, other: StyleBuilder)
pub fn extend(&mut self, other: StyleBuilder)
Override or replace self with other.
Sourcepub fn extend_named(&mut self, other: StyleBuilder)
pub fn extend_named(&mut self, other: StyleBuilder)
Override self with items set in the instance of other if both are the same type. Otherwise replace self with other.
self is the named_style_fn and other is the style instance set in style_fn.
Sourcepub fn is_replace(&self) -> bool
pub fn is_replace(&self) -> bool
if the style removes all contextual properties.
Trait Implementations§
Source§impl Clone for StyleBuilder
impl Clone for StyleBuilder
Source§fn clone(&self) -> StyleBuilder
fn clone(&self) -> StyleBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StyleBuilder
impl Debug for StyleBuilder
Source§impl Default for StyleBuilder
impl Default for StyleBuilder
Source§impl From<StyleBuilder> for StyleFn
impl From<StyleBuilder> for StyleFn
Source§fn from(style: StyleBuilder) -> Self
fn from(style: StyleBuilder) -> Self
Singleton.
Source§impl From<StyleBuilder> for WidgetBuilder
impl From<StyleBuilder> for WidgetBuilder
Source§fn from(t: StyleBuilder) -> Self
fn from(t: StyleBuilder) -> Self
Source§impl From<WidgetBuilder> for StyleBuilder
impl From<WidgetBuilder> for StyleBuilder
Source§fn from(p: WidgetBuilder) -> Self
fn from(p: WidgetBuilder) -> Self
impl IntoValue<StyleFn> for StyleBuilder
Auto Trait Implementations§
impl Freeze for StyleBuilder
impl !RefUnwindSafe for StyleBuilder
impl Send for StyleBuilder
impl Sync for StyleBuilder
impl !Unpin for StyleBuilder
impl !UnwindSafe for StyleBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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