Struct conrod::theme::Theme [] [src]

pub struct Theme {
    pub name: String,
    pub padding: Padding,
    pub margin: Margin,
    pub position: Position,
    pub align: Align,
    pub background_color: Color,
    pub shape_color: Color,
    pub frame_color: Color,
    pub frame_width: f64,
    pub label_color: Color,
    pub font_size_large: u32,
    pub font_size_medium: u32,
    pub font_size_small: u32,
    pub maybe_button: Option<WidgetDefault<Style>>,
    pub maybe_canvas: Option<WidgetDefault<Style>>,
    pub maybe_drop_down_list: Option<WidgetDefault<Style>>,
    pub maybe_envelope_editor: Option<WidgetDefault<Style>>,
    pub maybe_matrix: Option<WidgetDefault<Style>>,
    pub maybe_number_dialer: Option<WidgetDefault<Style>>,
    pub maybe_scrollbar: Option<Style>,
    pub maybe_slider: Option<WidgetDefault<Style>>,
    pub maybe_tabs: Option<WidgetDefault<Style>>,
    pub maybe_text_box: Option<WidgetDefault<Style>>,
    pub maybe_toggle: Option<WidgetDefault<Style>>,
    pub maybe_xy_pad: Option<WidgetDefault<Style>>,
}

A serializable collection of canvas and widget styling defaults.

Fields

name: String

A name for the theme used for identification.

padding: Padding

Padding for Canvas layout and positioning.

margin: Margin

Margin for Canvas layout and positioning.

position: Position

A default widget position.

align: Align

A default alignment for widgets.

background_color: Color

A default background for the theme.

shape_color: Color

A default color for widget shapes.

frame_color: Color

A default color for widget frames.

frame_width: f64

A default width for widget frames.

label_color: Color

A default color for widget labels.

font_size_large: u32

A default "large" font size.

font_size_medium: u32

A default "medium" font size.

font_size_small: u32

A default "small" font size.

maybe_button: Option<WidgetDefault<Style>>

Optional style defaults for a Button widget.

maybe_canvas: Option<WidgetDefault<Style>>

Optional style defaults for a Canvas widget.

maybe_drop_down_list: Option<WidgetDefault<Style>>

Optional style defaults for a DropDownList.

maybe_envelope_editor: Option<WidgetDefault<Style>>

Optional style defaults for an EnvelopeEditor.

maybe_matrix: Option<WidgetDefault<Style>>

Optional style defaults for a Matrix.

maybe_number_dialer: Option<WidgetDefault<Style>>

Optional style defaults for a NumberDialer.

maybe_scrollbar: Option<Style>

Optional style defaults for a Scrollbar.

maybe_slider: Option<WidgetDefault<Style>>

Optional style defaults for a Slider.

maybe_tabs: Option<WidgetDefault<Style>>

Optional style defaults for a Tabs widget.

maybe_text_box: Option<WidgetDefault<Style>>

Optional style defaults for a TextBox.

maybe_toggle: Option<WidgetDefault<Style>>

Optional style defaults for a Toggle.

maybe_xy_pad: Option<WidgetDefault<Style>>

Optional style defaults for an XYPad.

Methods

impl Theme
[src]

fn default() -> Theme

The default theme if not loading from file.

fn load(path: &Path) -> Result<ThemeError>

Load a theme from file.

fn save(&self, path: &Path) -> Result<()Error>

Save a theme to file.

Trait Implementations

impl Decodable for Theme
[src]

fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<Theme, __D::Error>

impl Encodable for Theme
[src]

fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>

impl Clone for Theme
[src]

fn clone(&self) -> Theme

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Debug for Theme
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.