Struct prototty_common::RichText
[−]
[src]
pub struct RichText { pub parts: Vec<RichTextPart>, pub size: Size, }
A text element, where the style of the text
can be controlled. A single RichText
element can have
several different parts, each styled differently.
Fields
parts: Vec<RichTextPart>
size: Size
Methods
impl RichText
[src]
fn new<S>(parts: Vec<(S, TextInfo)>, size: Size) -> Self where
S: Into<String>,
[src]
S: Into<String>,
Create a new RichText
element.
fn one_line<S>(parts: Vec<(S, TextInfo)>) -> Self where
S: Into<String>,
[src]
S: Into<String>,
Create a new Text
element of an appropriate
size for a single line.