Struct embedded_text::StyledTextBox [−][src]
pub struct StyledTextBox<'a, C, F, A, V, H> where
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode, { pub text_box: TextBox<'a>, pub style: TextBoxStyle<C, F, A, V, H>, }
A styled TextBox struct.
This structure is constructed by calling the into_styled method of a TextBox object.
Use the draw method to draw the textbox on a display.
Fields
text_box: TextBox<'a>A TextBox that has an associated TextBoxStyle.
style: TextBoxStyle<C, F, A, V, H>The style of the TextBox.
Implementations
impl<C, F, A, V, H> StyledTextBox<'_, C, F, A, V, H> where
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode, [src]
impl<C, F, A, V, H> StyledTextBox<'_, C, F, A, V, H> where
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode, [src]pub fn fit_height(&mut self) -> &mut Self[src]
Sets the height of the StyledTextBox to the height of the text.
pub fn fit_height_limited(&mut self, max_height: u32) -> &mut Self[src]
Sets the height of the StyledTextBox to the height of the text, limited to max_height.
This method allows you to set a maximum height. The StyledTextBox will take up at most
max_height pixel vertical space.
Trait Implementations
impl<'a, C: Clone, F: Clone, A: Clone, V: Clone, H: Clone> Clone for StyledTextBox<'a, C, F, A, V, H> where
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode, [src]
impl<'a, C: Clone, F: Clone, A: Clone, V: Clone, H: Clone> Clone for StyledTextBox<'a, C, F, A, V, H> where
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode, [src]fn clone(&self) -> StyledTextBox<'a, C, F, A, V, H>[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<'a, C: Copy, F: Copy, A: Copy, V: Copy, H: Copy> Copy for StyledTextBox<'a, C, F, A, V, H> where
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode, [src]
impl<'a, C: Copy, F: Copy, A: Copy, V: Copy, H: Copy> Copy for StyledTextBox<'a, C, F, A, V, H> where
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode, [src]impl<'a, C: Debug, F: Debug, A: Debug, V: Debug, H: Debug> Debug for StyledTextBox<'a, C, F, A, V, H> where
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode, [src]
impl<'a, C: Debug, F: Debug, A: Debug, V: Debug, H: Debug> Debug for StyledTextBox<'a, C, F, A, V, H> where
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode, [src]impl<C, F, A, V, H> Dimensions for StyledTextBox<'_, C, F, A, V, H> where
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode, [src]
impl<C, F, A, V, H> Dimensions for StyledTextBox<'_, C, F, A, V, H> where
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode, [src]impl<'a, C, F, A, V, H> Drawable<C> for &'a StyledTextBox<'a, C, F, A, V, H> where
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
StyledTextBox<'a, C, F, A, V, H>: RendererFactory<'a, C>,
H: HeightMode, [src]
impl<'a, C, F, A, V, H> Drawable<C> for &'a StyledTextBox<'a, C, F, A, V, H> where
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
StyledTextBox<'a, C, F, A, V, H>: RendererFactory<'a, C>,
H: HeightMode, [src]impl<'a, C: Eq, F: Eq, A: Eq, V: Eq, H: Eq> Eq for StyledTextBox<'a, C, F, A, V, H> where
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode, [src]
impl<'a, C: Eq, F: Eq, A: Eq, V: Eq, H: Eq> Eq for StyledTextBox<'a, C, F, A, V, H> where
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode, [src]impl<'a, C: Hash, F: Hash, A: Hash, V: Hash, H: Hash> Hash for StyledTextBox<'a, C, F, A, V, H> where
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode, [src]
impl<'a, C: Hash, F: Hash, A: Hash, V: Hash, H: Hash> Hash for StyledTextBox<'a, C, F, A, V, H> where
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode, [src]impl<'a, C: PartialEq, F: PartialEq, A: PartialEq, V: PartialEq, H: PartialEq> PartialEq<StyledTextBox<'a, C, F, A, V, H>> for StyledTextBox<'a, C, F, A, V, H> where
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode, [src]
impl<'a, C: PartialEq, F: PartialEq, A: PartialEq, V: PartialEq, H: PartialEq> PartialEq<StyledTextBox<'a, C, F, A, V, H>> for StyledTextBox<'a, C, F, A, V, H> where
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode, [src]fn eq(&self, other: &StyledTextBox<'a, C, F, A, V, H>) -> bool[src]
fn ne(&self, other: &StyledTextBox<'a, C, F, A, V, H>) -> bool[src]
impl<'a, C, F, V, H> RendererFactory<'a, C> for StyledTextBox<'a, C, F, CenterAligned, V, H> where
C: PixelColor + From<Rgb>,
F: Font + Copy,
V: VerticalTextAlignment,
H: HeightMode, [src]
impl<'a, C, F, V, H> RendererFactory<'a, C> for StyledTextBox<'a, C, F, CenterAligned, V, H> where
C: PixelColor + From<Rgb>,
F: Font + Copy,
V: VerticalTextAlignment,
H: HeightMode, [src]type Renderer = StyledTextBoxIterator<'a, C, F, CenterAligned, V, H, UniformSpaceConfig<F>>
The type of the pixel iterator.
#[must_use]fn create_renderer(&self) -> Self::Renderer[src]
#[must_use]
fn create_renderer(&self) -> Self::Rendererimpl<'a, C, F, V, H> RendererFactory<'a, C> for StyledTextBox<'a, C, F, Justified, V, H> where
C: PixelColor + From<Rgb>,
F: Font + Copy,
V: VerticalTextAlignment,
H: HeightMode, [src]
impl<'a, C, F, V, H> RendererFactory<'a, C> for StyledTextBox<'a, C, F, Justified, V, H> where
C: PixelColor + From<Rgb>,
F: Font + Copy,
V: VerticalTextAlignment,
H: HeightMode, [src]type Renderer = StyledTextBoxIterator<'a, C, F, Justified, V, H, JustifiedSpaceConfig<F>>
The type of the pixel iterator.
#[must_use]fn create_renderer(&self) -> Self::Renderer[src]
#[must_use]
fn create_renderer(&self) -> Self::Rendererimpl<'a, C, F, V, H> RendererFactory<'a, C> for StyledTextBox<'a, C, F, LeftAligned, V, H> where
C: PixelColor + From<Rgb>,
F: Font + Copy,
V: VerticalTextAlignment,
H: HeightMode, [src]
impl<'a, C, F, V, H> RendererFactory<'a, C> for StyledTextBox<'a, C, F, LeftAligned, V, H> where
C: PixelColor + From<Rgb>,
F: Font + Copy,
V: VerticalTextAlignment,
H: HeightMode, [src]type Renderer = StyledTextBoxIterator<'a, C, F, LeftAligned, V, H, UniformSpaceConfig<F>>
The type of the pixel iterator.
#[must_use]fn create_renderer(&self) -> Self::Renderer[src]
#[must_use]
fn create_renderer(&self) -> Self::Rendererimpl<'a, C, F, V, H> RendererFactory<'a, C> for StyledTextBox<'a, C, F, RightAligned, V, H> where
C: PixelColor + From<Rgb>,
F: Font + Copy,
V: VerticalTextAlignment,
H: HeightMode, [src]
impl<'a, C, F, V, H> RendererFactory<'a, C> for StyledTextBox<'a, C, F, RightAligned, V, H> where
C: PixelColor + From<Rgb>,
F: Font + Copy,
V: VerticalTextAlignment,
H: HeightMode, [src]type Renderer = StyledTextBoxIterator<'a, C, F, RightAligned, V, H, UniformSpaceConfig<F>>
The type of the pixel iterator.
#[must_use]fn create_renderer(&self) -> Self::Renderer[src]
#[must_use]
fn create_renderer(&self) -> Self::Rendererimpl<'a, C, F, A, V, H> StructuralEq for StyledTextBox<'a, C, F, A, V, H> where
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode, [src]
impl<'a, C, F, A, V, H> StructuralEq for StyledTextBox<'a, C, F, A, V, H> where
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode, [src]impl<'a, C, F, A, V, H> StructuralPartialEq for StyledTextBox<'a, C, F, A, V, H> where
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode, [src]
impl<'a, C, F, A, V, H> StructuralPartialEq for StyledTextBox<'a, C, F, A, V, H> where
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode, [src]impl<C, F, A, V, H> Transform for StyledTextBox<'_, C, F, A, V, H> where
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode, [src]
impl<C, F, A, V, H> Transform for StyledTextBox<'_, C, F, A, V, H> where
C: PixelColor,
F: Font + Copy,
A: HorizontalTextAlignment,
V: VerticalTextAlignment,
H: HeightMode, [src]Auto Trait Implementations
impl<'a, C, F, A, V, H> RefUnwindSafe for StyledTextBox<'a, C, F, A, V, H> where
A: RefUnwindSafe,
C: RefUnwindSafe,
F: RefUnwindSafe,
H: RefUnwindSafe,
V: RefUnwindSafe,
impl<'a, C, F, A, V, H> RefUnwindSafe for StyledTextBox<'a, C, F, A, V, H> where
A: RefUnwindSafe,
C: RefUnwindSafe,
F: RefUnwindSafe,
H: RefUnwindSafe,
V: RefUnwindSafe, impl<'a, C, F, A, V, H> Send for StyledTextBox<'a, C, F, A, V, H> where
A: Send,
C: Send,
F: Send,
H: Send,
V: Send,
impl<'a, C, F, A, V, H> Send for StyledTextBox<'a, C, F, A, V, H> where
A: Send,
C: Send,
F: Send,
H: Send,
V: Send, impl<'a, C, F, A, V, H> Sync for StyledTextBox<'a, C, F, A, V, H> where
A: Sync,
C: Sync,
F: Sync,
H: Sync,
V: Sync,
impl<'a, C, F, A, V, H> Sync for StyledTextBox<'a, C, F, A, V, H> where
A: Sync,
C: Sync,
F: Sync,
H: Sync,
V: Sync, impl<'a, C, F, A, V, H> Unpin for StyledTextBox<'a, C, F, A, V, H> where
A: Unpin,
C: Unpin,
F: Unpin,
H: Unpin,
V: Unpin,
impl<'a, C, F, A, V, H> Unpin for StyledTextBox<'a, C, F, A, V, H> where
A: Unpin,
C: Unpin,
F: Unpin,
H: Unpin,
V: Unpin, impl<'a, C, F, A, V, H> UnwindSafe for StyledTextBox<'a, C, F, A, V, H> where
A: UnwindSafe,
C: UnwindSafe,
F: UnwindSafe,
H: UnwindSafe,
V: UnwindSafe,
impl<'a, C, F, A, V, H> UnwindSafe for StyledTextBox<'a, C, F, A, V, H> where
A: UnwindSafe,
C: UnwindSafe,
F: UnwindSafe,
H: UnwindSafe,
V: UnwindSafe,