Struct theo::TextLayoutBuilder
source · pub struct TextLayoutBuilder(_);
Expand description
The text layout builder for the system.
Trait Implementations§
source§impl TextLayoutBuilder for TextLayoutBuilder
impl TextLayoutBuilder for TextLayoutBuilder
§type Out = TextLayout
type Out = TextLayout
The type of the generated
TextLayout
.source§fn alignment(self, alignment: TextAlignment) -> Self
fn alignment(self, alignment: TextAlignment) -> Self
Set the
TextAlignment
to be used for this layout.source§fn default_attribute(self, attribute: impl Into<TextAttribute>) -> Self
fn default_attribute(self, attribute: impl Into<TextAttribute>) -> Self
Add a default
TextAttribute
for this layout. Read moresource§fn range_attribute(
self,
range: impl RangeBounds<usize>,
attribute: impl Into<TextAttribute>
) -> Self
fn range_attribute( self, range: impl RangeBounds<usize>, attribute: impl Into<TextAttribute> ) -> Self
Add a
TextAttribute
to a range of this layout. Read moresource§fn font(self, font: FontFamily, font_size: f64) -> Self
fn font(self, font: FontFamily, font_size: f64) -> Self
A convenience method for setting the default font family and size. Read more
source§fn text_color(self, color: Color) -> Self
fn text_color(self, color: Color) -> Self
A convenience method for setting the default text color. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for TextLayoutBuilder
impl !Send for TextLayoutBuilder
impl !Sync for TextLayoutBuilder
impl Unpin for TextLayoutBuilder
impl !UnwindSafe for TextLayoutBuilder
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
Mutably borrows from an owned value. Read more
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
Convert
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, Global>) -> Rc<dyn Any, Global>
fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
Convert
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)
Convert
&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)
Convert
&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> 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, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere U: RoundFrom<T>,
source§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.