Struct nannou::ui::prelude::widget::canvas::Style [−][src]
pub struct Style { pub color: Option<Color>, pub border: Option<f64>, pub border_color: Option<Color>, pub length: Option<Length>, pub pad_left: Option<f64>, pub pad_right: Option<f64>, pub pad_bottom: Option<f64>, pub pad_top: Option<f64>, pub title_bar_color: Option<Option<Color>>, pub title_bar_text_color: Option<Color>, pub title_bar_font_size: Option<u32>, pub title_bar_maybe_wrap: Option<Option<Wrap>>, pub title_bar_line_spacing: Option<f64>, pub title_bar_justify: Option<Justify>, }
Unique styling for the Canvas.
Fields
color: Option<Color>
The color of the Canvas' rectangle surface.
border: Option<f64>
The width of the border surrounding the Canvas' rectangle.
border_color: Option<Color>
The color of the Canvas' border.
length: Option<Length>
If this Canvas is a split of some parent Canvas, this is the length of the split.
pad_left: Option<f64>
Padding for the left edge of the Canvas' kid area.
pad_right: Option<f64>
Padding for the right edge of the Canvas' kid area.
pad_bottom: Option<f64>
Padding for the bottom edge of the Canvas' kid area.
pad_top: Option<f64>
Padding for the top edge of the Canvas' kid area.
title_bar_color: Option<Option<Color>>
The color of the title bar. Defaults to the color of the Canvas.
title_bar_text_color: Option<Color>
The color of the title bar's text.
title_bar_font_size: Option<u32>
The font size for the title bar's text.
title_bar_maybe_wrap: Option<Option<Wrap>>
The way in which the title bar's text should wrap.
title_bar_line_spacing: Option<f64>
The distance between lines for multi-line title bar text.
title_bar_justify: Option<Justify>
The label's typographic alignment over the x axis.
Methods
impl Style
[src]
impl Style
impl Style
[src]
impl Style
pub fn color(&self, theme: &Theme) -> Color
[src]
pub fn color(&self, theme: &Theme) -> Color
Retrieves the value, falling back to a default values in the following order:
- If the field is
None
, falls back to the style stored within theTheme
. - If there are no style defaults for the widget in the theme, or if the
default field is also
None
, falls back to the expression specified within the field's#[conrod(default = "expr")]
attribute.
This method was generated by the #[conrod(default = "expr")]
attribute
associated with the #[derive(WidgetStyle)]
attribute.
pub fn border(&self, theme: &Theme) -> f64
[src]
pub fn border(&self, theme: &Theme) -> f64
Retrieves the value, falling back to a default values in the following order:
- If the field is
None
, falls back to the style stored within theTheme
. - If there are no style defaults for the widget in the theme, or if the
default field is also
None
, falls back to the expression specified within the field's#[conrod(default = "expr")]
attribute.
This method was generated by the #[conrod(default = "expr")]
attribute
associated with the #[derive(WidgetStyle)]
attribute.
pub fn border_color(&self, theme: &Theme) -> Color
[src]
pub fn border_color(&self, theme: &Theme) -> Color
Retrieves the value, falling back to a default values in the following order:
- If the field is
None
, falls back to the style stored within theTheme
. - If there are no style defaults for the widget in the theme, or if the
default field is also
None
, falls back to the expression specified within the field's#[conrod(default = "expr")]
attribute.
This method was generated by the #[conrod(default = "expr")]
attribute
associated with the #[derive(WidgetStyle)]
attribute.
pub fn length(&self, theme: &Theme) -> Length
[src]
pub fn length(&self, theme: &Theme) -> Length
Retrieves the value, falling back to a default values in the following order:
- If the field is
None
, falls back to the style stored within theTheme
. - If there are no style defaults for the widget in the theme, or if the
default field is also
None
, falls back to the expression specified within the field's#[conrod(default = "expr")]
attribute.
This method was generated by the #[conrod(default = "expr")]
attribute
associated with the #[derive(WidgetStyle)]
attribute.
pub fn pad_left(&self, theme: &Theme) -> f64
[src]
pub fn pad_left(&self, theme: &Theme) -> f64
Retrieves the value, falling back to a default values in the following order:
- If the field is
None
, falls back to the style stored within theTheme
. - If there are no style defaults for the widget in the theme, or if the
default field is also
None
, falls back to the expression specified within the field's#[conrod(default = "expr")]
attribute.
This method was generated by the #[conrod(default = "expr")]
attribute
associated with the #[derive(WidgetStyle)]
attribute.
pub fn pad_right(&self, theme: &Theme) -> f64
[src]
pub fn pad_right(&self, theme: &Theme) -> f64
Retrieves the value, falling back to a default values in the following order:
- If the field is
None
, falls back to the style stored within theTheme
. - If there are no style defaults for the widget in the theme, or if the
default field is also
None
, falls back to the expression specified within the field's#[conrod(default = "expr")]
attribute.
This method was generated by the #[conrod(default = "expr")]
attribute
associated with the #[derive(WidgetStyle)]
attribute.
pub fn pad_bottom(&self, theme: &Theme) -> f64
[src]
pub fn pad_bottom(&self, theme: &Theme) -> f64
Retrieves the value, falling back to a default values in the following order:
- If the field is
None
, falls back to the style stored within theTheme
. - If there are no style defaults for the widget in the theme, or if the
default field is also
None
, falls back to the expression specified within the field's#[conrod(default = "expr")]
attribute.
This method was generated by the #[conrod(default = "expr")]
attribute
associated with the #[derive(WidgetStyle)]
attribute.
pub fn pad_top(&self, theme: &Theme) -> f64
[src]
pub fn pad_top(&self, theme: &Theme) -> f64
Retrieves the value, falling back to a default values in the following order:
- If the field is
None
, falls back to the style stored within theTheme
. - If there are no style defaults for the widget in the theme, or if the
default field is also
None
, falls back to the expression specified within the field's#[conrod(default = "expr")]
attribute.
This method was generated by the #[conrod(default = "expr")]
attribute
associated with the #[derive(WidgetStyle)]
attribute.
pub fn title_bar_color(&self, theme: &Theme) -> Option<Color>
[src]
pub fn title_bar_color(&self, theme: &Theme) -> Option<Color>
Retrieves the value, falling back to a default values in the following order:
- If the field is
None
, falls back to the style stored within theTheme
. - If there are no style defaults for the widget in the theme, or if the
default field is also
None
, falls back to the expression specified within the field's#[conrod(default = "expr")]
attribute.
This method was generated by the #[conrod(default = "expr")]
attribute
associated with the #[derive(WidgetStyle)]
attribute.
pub fn title_bar_text_color(&self, theme: &Theme) -> Color
[src]
pub fn title_bar_text_color(&self, theme: &Theme) -> Color
Retrieves the value, falling back to a default values in the following order:
- If the field is
None
, falls back to the style stored within theTheme
. - If there are no style defaults for the widget in the theme, or if the
default field is also
None
, falls back to the expression specified within the field's#[conrod(default = "expr")]
attribute.
This method was generated by the #[conrod(default = "expr")]
attribute
associated with the #[derive(WidgetStyle)]
attribute.
pub fn title_bar_font_size(&self, theme: &Theme) -> u32
[src]
pub fn title_bar_font_size(&self, theme: &Theme) -> u32
Retrieves the value, falling back to a default values in the following order:
- If the field is
None
, falls back to the style stored within theTheme
. - If there are no style defaults for the widget in the theme, or if the
default field is also
None
, falls back to the expression specified within the field's#[conrod(default = "expr")]
attribute.
This method was generated by the #[conrod(default = "expr")]
attribute
associated with the #[derive(WidgetStyle)]
attribute.
pub fn title_bar_maybe_wrap(&self, theme: &Theme) -> Option<Wrap>
[src]
pub fn title_bar_maybe_wrap(&self, theme: &Theme) -> Option<Wrap>
Retrieves the value, falling back to a default values in the following order:
- If the field is
None
, falls back to the style stored within theTheme
. - If there are no style defaults for the widget in the theme, or if the
default field is also
None
, falls back to the expression specified within the field's#[conrod(default = "expr")]
attribute.
This method was generated by the #[conrod(default = "expr")]
attribute
associated with the #[derive(WidgetStyle)]
attribute.
pub fn title_bar_line_spacing(&self, theme: &Theme) -> f64
[src]
pub fn title_bar_line_spacing(&self, theme: &Theme) -> f64
Retrieves the value, falling back to a default values in the following order:
- If the field is
None
, falls back to the style stored within theTheme
. - If there are no style defaults for the widget in the theme, or if the
default field is also
None
, falls back to the expression specified within the field's#[conrod(default = "expr")]
attribute.
This method was generated by the #[conrod(default = "expr")]
attribute
associated with the #[derive(WidgetStyle)]
attribute.
pub fn title_bar_justify(&self, theme: &Theme) -> Justify
[src]
pub fn title_bar_justify(&self, theme: &Theme) -> Justify
Retrieves the value, falling back to a default values in the following order:
- If the field is
None
, falls back to the style stored within theTheme
. - If there are no style defaults for the widget in the theme, or if the
default field is also
None
, falls back to the expression specified within the field's#[conrod(default = "expr")]
attribute.
This method was generated by the #[conrod(default = "expr")]
attribute
associated with the #[derive(WidgetStyle)]
attribute.
Trait Implementations
impl Clone for Style
[src]
impl Clone for Style
fn clone(&self) -> Style
[src]
fn clone(&self) -> Style
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Style
[src]
impl Debug for Style
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl Default for Style
[src]
impl Default for Style
impl Copy for Style
[src]
impl Copy for Style
impl PartialEq<Style> for Style
[src]
impl PartialEq<Style> for Style