Trait vizia::modifiers::TextModifiers

source ·
pub trait TextModifiers: Modifiable {
    // Provided methods
    fn text<T>(self, value: impl Res<T>) -> Self
       where T: ToStringLocalized { ... }
    fn font_family<U>(self, value: impl Res<U>) -> Self
       where U: Into<Vec<FamilyOwned>> { ... }
    fn font_weight<U>(self, value: impl Res<U>) -> Self
       where U: Into<FontWeight> { ... }
    fn font_style<U>(self, value: impl Res<U>) -> Self
       where U: Into<FontStyle> { ... }
    fn font_stretch<U>(self, value: impl Res<U>) -> Self
       where U: Into<FontStretch> { ... }
    fn color<U>(self, value: impl Res<U>) -> Self
       where U: Clone + Into<Color> { ... }
    fn font_size<U>(self, value: impl Res<U>) -> Self
       where U: Into<FontSize> { ... }
    fn caret_color<U>(self, value: impl Res<U>) -> Self
       where U: Into<Color> { ... }
    fn selection_color<U>(self, value: impl Res<U>) -> Self
       where U: Into<Color> { ... }
    fn text_wrap<U>(self, value: impl Res<U>) -> Self
       where U: Into<bool> { ... }
    fn text_align<U>(self, value: impl Res<U>) -> Self
       where U: Into<TextAlign> { ... }
}
Expand description

Modifiers for changing the text properties of a view.

Provided Methods§

source

fn text<T>(self, value: impl Res<T>) -> Self

Sets the text content of the view.

source

fn font_family<U>(self, value: impl Res<U>) -> Self
where U: Into<Vec<FamilyOwned>>,

Sets the font that should be used by the view.

The font name refers to the name assigned when the font is added to context.

source

fn font_weight<U>(self, value: impl Res<U>) -> Self
where U: Into<FontWeight>,

Sets the font weight that should be used by the view.

source

fn font_style<U>(self, value: impl Res<U>) -> Self
where U: Into<FontStyle>,

Sets the font style that should be used by the view.

source

fn font_stretch<U>(self, value: impl Res<U>) -> Self
where U: Into<FontStretch>,

Sets the font stretch that should be used by the view if the font supports it.

source

fn color<U>(self, value: impl Res<U>) -> Self
where U: Clone + Into<Color>,

Sets the text color of the view.

source

fn font_size<U>(self, value: impl Res<U>) -> Self
where U: Into<FontSize>,

Sets the font size of the view.

source

fn caret_color<U>(self, value: impl Res<U>) -> Self
where U: Into<Color>,

Sets the ext caret color of the view.

source

fn selection_color<U>(self, value: impl Res<U>) -> Self
where U: Into<Color>,

Sets the color used to highlight selected text within the view.

source

fn text_wrap<U>(self, value: impl Res<U>) -> Self
where U: Into<bool>,

Sets whether the text of the view should be allowed to wrap.

source

fn text_align<U>(self, value: impl Res<U>) -> Self
where U: Into<TextAlign>,

Sets the horizontal alignment of text within the view.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'a, V> TextModifiers for Handle<'a, V>