[][src]Struct iced_native::widget::text::Text

pub struct Text<Renderer: Renderer> { /* fields omitted */ }

A paragraph of text.

Example

Text::new("I <3 iced!")
    .color([0.0, 0.0, 1.0])
    .size(40);

Text drawn by iced_wgpu

Implementations

impl<Renderer: Renderer> Text<Renderer>[src]

pub fn new<T: Into<String>>(label: T) -> Self[src]

Create a new fragment of Text with the given contents.

pub fn size(self, size: u16) -> Self[src]

Sets the size of the Text.

pub fn color<C: Into<Color>>(self, color: C) -> Self[src]

Sets the Color of the Text.

pub fn font(self, font: impl Into<Renderer::Font>) -> Self[src]

Sets the Font of the Text.

pub fn width(self, width: Length) -> Self[src]

Sets the width of the Text boundaries.

pub fn height(self, height: Length) -> Self[src]

Sets the height of the Text boundaries.

pub fn horizontal_alignment(self, alignment: HorizontalAlignment) -> Self[src]

Sets the HorizontalAlignment of the Text.

pub fn vertical_alignment(self, alignment: VerticalAlignment) -> Self[src]

Sets the VerticalAlignment of the Text.

Trait Implementations

impl<Renderer: Renderer> Clone for Text<Renderer>[src]

impl<Renderer: Debug + Renderer> Debug for Text<Renderer> where
    Renderer::Font: Debug
[src]

impl<'a, Message, Renderer> From<Text<Renderer>> for Element<'a, Message, Renderer> where
    Renderer: Renderer + 'a, 
[src]

impl<Message, Renderer> Widget<Message, Renderer> for Text<Renderer> where
    Renderer: Renderer
[src]

Auto Trait Implementations

impl<Renderer> RefUnwindSafe for Text<Renderer> where
    <Renderer as Renderer>::Font: RefUnwindSafe

impl<Renderer> Send for Text<Renderer> where
    <Renderer as Renderer>::Font: Send

impl<Renderer> Sync for Text<Renderer> where
    <Renderer as Renderer>::Font: Sync

impl<Renderer> Unpin for Text<Renderer> where
    <Renderer as Renderer>::Font: Unpin

impl<Renderer> UnwindSafe for Text<Renderer> where
    <Renderer as Renderer>::Font: UnwindSafe

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,