Struct conrod::widget::primitive::text::Style
[−]
[src]
pub struct Style { pub font_size: Option<FontSize>, pub color: Option<Color>, pub maybe_wrap: Option<Option<Wrap>>, pub line_spacing: Option<Scalar>, pub text_align: Option<Align>, pub font_id: Option<Option<Id>>, }
The styling for a Text's graphics.
Fields
font_size: Option<FontSize>
The font size for the Text.
color: Option<Color>
The color of the Text.
maybe_wrap: Option<Option<Wrap>>
Whether or not the text should wrap around the width.
line_spacing: Option<Scalar>
The spacing between consecutive lines.
text_align: Option<Align>
Alignment of the text along the x axis.
font_id: Option<Option<Id>>
The id of the font to use for rendring and layout.
Methods
impl Style
[src]
impl Style
[src]
pub fn font_size(&self, theme: &Theme) -> FontSize
[src]
Retrieves the value from the Style
.
If the Style
's field is None
, falls back to default specified within the Theme
.
pub fn color(&self, theme: &Theme) -> Color
[src]
Retrieves the value from the Style
.
If the Style
's field is None
, falls back to default specified within the Theme
.
pub fn maybe_wrap(&self, theme: &Theme) -> Option<Wrap>
[src]
Retrieves the value from the Style
.
If the Style
's field is None
, falls back to default specified within the Theme
.
pub fn line_spacing(&self, theme: &Theme) -> Scalar
[src]
Retrieves the value from the Style
.
If the Style
's field is None
, falls back to default specified within the Theme
.
pub fn text_align(&self, theme: &Theme) -> Align
[src]
Retrieves the value from the Style
.
If the Style
's field is None
, falls back to default specified within the Theme
.
pub fn font_id(&self, theme: &Theme) -> Option<Id>
[src]
Retrieves the value from the Style
.
If the Style
's field is None
, falls back to default specified within the Theme
.
Trait Implementations
impl Copy for Style
[src]
impl Clone for Style
[src]
fn clone(&self) -> Style
[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 Debug for Style
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more