[−][src]Struct embedded_text::style::builder::TextBoxStyleBuilder
TextBoxStyle builder object.
Implementations
impl<C, F> TextBoxStyleBuilder<C, F, LeftAligned, TopAligned> where
C: PixelColor,
F: Font + Copy, [src]
C: PixelColor,
F: Font + Copy,
#[must_use]pub fn new(font: F) -> Self[src]
Creates a new textbox style builder with a given font.
Default settings are:
LeftAligned- Text color: transparent
- Backgound color: transparent
impl<C, F, A, V> TextBoxStyleBuilder<C, F, A, V> where
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment, [src]
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
#[must_use]pub fn text_color(self, text_color: C) -> Self[src]
Sets the text color.
Note: once the text color is set, there is no way to reset it to transparent.
#[must_use]pub fn background_color(self, background_color: C) -> Self[src]
Sets the background color.
Note: once the background color is set, there is no way to reset it to transparent.
Example: transparent text with background.
let style = TextBoxStyleBuilder::new(Font6x8) .background_color(BinaryColor::On) .build();
#[must_use]pub fn text_style(self, text_style: TextStyle<C, F>) -> Self[src]
Copies properties from an existing text style object.
#[must_use]pub fn alignment<TA: HorizontalTextAlignment>(
self,
alignment: TA
) -> TextBoxStyleBuilder<C, F, TA, V>[src]
self,
alignment: TA
) -> TextBoxStyleBuilder<C, F, TA, V>
Sets the horizontal text alignment.
#[must_use]pub fn vertical_alignment<VA: VerticalTextAlignment>(
self,
vertical_alignment: VA
) -> TextBoxStyleBuilder<C, F, A, VA>[src]
self,
vertical_alignment: VA
) -> TextBoxStyleBuilder<C, F, A, VA>
Sets the vertical text alignment.
#[must_use]pub fn build(self) -> TextBoxStyle<C, F, A, V>[src]
Builds the TextBoxStyle.
Auto Trait Implementations
impl<C, F, A, V> RefUnwindSafe for TextBoxStyleBuilder<C, F, A, V> where
A: RefUnwindSafe,
C: RefUnwindSafe,
F: RefUnwindSafe,
V: RefUnwindSafe,
A: RefUnwindSafe,
C: RefUnwindSafe,
F: RefUnwindSafe,
V: RefUnwindSafe,
impl<C, F, A, V> Send for TextBoxStyleBuilder<C, F, A, V> where
A: Send,
C: Send,
F: Send,
V: Send,
A: Send,
C: Send,
F: Send,
V: Send,
impl<C, F, A, V> Sync for TextBoxStyleBuilder<C, F, A, V> where
A: Sync,
C: Sync,
F: Sync,
V: Sync,
A: Sync,
C: Sync,
F: Sync,
V: Sync,
impl<C, F, A, V> Unpin for TextBoxStyleBuilder<C, F, A, V> where
A: Unpin,
C: Unpin,
F: Unpin,
V: Unpin,
A: Unpin,
C: Unpin,
F: Unpin,
V: Unpin,
impl<C, F, A, V> UnwindSafe for TextBoxStyleBuilder<C, F, A, V> where
A: UnwindSafe,
C: UnwindSafe,
F: UnwindSafe,
V: UnwindSafe,
A: UnwindSafe,
C: UnwindSafe,
F: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,