Struct prototty_elements::rich_text::RichText
[−]
[src]
pub struct RichText { pub parts: Vec<RichTextPart>, pub size: Vector2<u16>, }
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: Vector2<u16>
Methods
impl RichText
[src]
fn new<S, V>(parts: Vec<(S, TextInfo)>, size: V) -> Self where
S: Into<String>,
V: Into<Vector2<u16>>,
[src]
S: Into<String>,
V: Into<Vector2<u16>>,
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.
Trait Implementations
impl Debug for RichText
[src]
impl Clone for RichText
[src]
fn clone(&self) -> RichText
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl View for RichText
[src]
fn view<G: ViewGrid>(&self, offset: Vector2<i16>, depth: i16, grid: &mut G)
[src]
Update the cells in grid
to describe how a type should be rendered. Implementations of view
for low level ui components will typically involve updating cells directly. Implementations for higer level components, such as an entire application's ui, will typically call the view
methed of lower level components which make up the ui. Read more