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§fn default() -> StyleBuilder
fn default() -> StyleBuilder
Source§impl From<StyleBuilder> for StyleFn
impl From<StyleBuilder> for StyleFn
Source§fn from(style: StyleBuilder) -> StyleFn
fn from(style: StyleBuilder) -> StyleFn
Singleton.
Source§impl From<StyleBuilder> for WidgetBuilder
impl From<StyleBuilder> for WidgetBuilder
Source§fn from(t: StyleBuilder) -> WidgetBuilder
fn from(t: StyleBuilder) -> WidgetBuilder
Source§impl From<WidgetBuilder> for StyleBuilder
impl From<WidgetBuilder> for StyleBuilder
Source§fn from(p: WidgetBuilder) -> StyleBuilder
fn from(p: WidgetBuilder) -> StyleBuilder
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,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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
.Source§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
.Source§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.Source§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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> FsChangeNote for T
impl<T> FsChangeNote for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian()
.