[][src]Struct cursive::theme::ColorStyle

pub struct ColorStyle {
    pub front: ColorType,
    pub back: ColorType,
}

Possible color style for a cell.

Represents a color pair role to use when printing something.

The current theme will assign each role a foreground and background color.

Fields

front: ColorType

Color used for the foreground (the text itself).

back: ColorType

Color used for the background.

Implementations

impl ColorStyle[src]

pub fn new<F, B>(front: F, back: B) -> ColorStyle where
    B: Into<ColorType>,
    F: Into<ColorType>, 
[src]

Creates

pub fn terminal_default() -> ColorStyle[src]

Style set by terminal before entering a Cursive program.

pub fn background() -> ColorStyle[src]

Application background, where no view is present.

pub fn shadow() -> ColorStyle[src]

Color used by view shadows. Only background matters.

pub fn primary() -> ColorStyle[src]

Main text with default background.

pub fn secondary() -> ColorStyle[src]

Secondary text color, with default background.

pub fn tertiary() -> ColorStyle[src]

Tertiary text color, with default background.

pub fn title_primary() -> ColorStyle[src]

Title text color with default background.

pub fn title_secondary() -> ColorStyle[src]

Alternative color for a title.

pub fn highlight() -> ColorStyle[src]

Alternate text with highlight background.

pub fn highlight_inactive() -> ColorStyle[src]

Highlight color for inactive views (not in focus).

pub fn resolve(&self, palette: &Palette) -> ColorPair[src]

Return the color pair that this style represents.

Trait Implementations

impl Clone for ColorStyle[src]

impl Copy for ColorStyle[src]

impl Debug for ColorStyle[src]

impl Eq for ColorStyle[src]

impl<F, B> From<(F, B)> for ColorStyle where
    B: Into<ColorType>,
    F: Into<ColorType>, 
[src]

impl From<BaseColor> for ColorStyle[src]

impl From<Color> for ColorStyle[src]

impl From<ColorStyle> for Style[src]

impl From<ColorType> for ColorStyle[src]

impl From<PaletteColor> for ColorStyle[src]

impl Hash for ColorStyle[src]

impl PartialEq<ColorStyle> for ColorStyle[src]

impl StructuralEq for ColorStyle[src]

impl StructuralPartialEq for ColorStyle[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> Erased for T

impl<T> From<T> for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> With for T[src]