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

pub struct Theme {
    pub name: String,
    pub padding: Padding,
    pub x_position: Position,
    pub y_position: Position,
    pub background_color: Color,
    pub shape_color: Color,
    pub border_color: Color,
    pub border_width: Scalar,
    pub label_color: Color,
    pub font_id: Option<Id>,
    pub font_size_large: u32,
    pub font_size_medium: u32,
    pub font_size_small: u32,
    pub widget_styling: StyleMap,
    pub mouse_drag_threshold: Scalar,
    pub double_click_threshold: Duration,
}

A serializable collection of canvas and widget styling defaults.

Fields

A name for the theme used for identification.

Padding for Canvas layout and positioning.

A default widget position along the x axis.

A default widget position along the y axis.

A default background for the theme.

A default color for widget shapes.

A default color for widget borders.

A default width for widget borders.

A default color for widget labels.

The Id of the default font used for text widgets when one is not specified.

A default "large" font size.

A default "medium" font size.

A default "small" font size.

StyleMap for unique styling of each widget, index-able by the Widget::kind.

Mouse Drag distance threshold determines the minimum distance from the mouse-down point that the mouse must move before starting a drag operation.

Once the Duration that separates two consecutive Clicks is greater than this value, a DoubleClick event will no longer be generated.

Methods

impl Theme
[src]

The default theme if not loading from file.

Retrieve the unique default styling for a widget.

Attempts to cast the Box<WidgetStyle> to the Widget's unique associated style T.

Auto Trait Implementations

impl Send for Theme

impl !Sync for Theme

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Mutably borrows from an owned value. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more

impl<T> Erased for T
[src]

impl<T> Downcast for T where
    T: Any
[src]

Convert Box<Trait> (where Trait: Downcast) to Box<Any>. Box<Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any's vtable from &Trait's. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any's vtable from &mut Trait's. Read more