[][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.

Methods

impl ColorStyle[src]

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

Creates

pub fn terminal_default() -> Self[src]

Style set by terminal before entering a Cursive program.

pub fn background() -> Self[src]

Application background, where no view is present.

pub fn shadow() -> Self[src]

Color used by view shadows. Only background matters.

pub fn primary() -> Self[src]

Main text with default background.

pub fn secondary() -> Self[src]

Secondary text color, with default background.

pub fn tertiary() -> Self[src]

Tertiary text color, with default background.

pub fn title_primary() -> Self[src]

Title text color with default background.

pub fn title_secondary() -> Self[src]

Alternative color for a title.

pub fn highlight() -> Self[src]

Alternate text with highlight background.

pub fn highlight_inactive() -> Self[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 Copy for ColorStyle[src]

impl PartialEq<ColorStyle> for ColorStyle[src]

impl From<Color> for ColorStyle[src]

impl From<BaseColor> for ColorStyle[src]

impl From<PaletteColor> for ColorStyle[src]

impl From<ColorType> for ColorStyle[src]

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

impl From<ColorStyle> for Style[src]

impl Clone for ColorStyle[src]

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

Performs copy-assignment from source. Read more

impl Eq for ColorStyle[src]

impl Debug for ColorStyle[src]

impl Hash for ColorStyle[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Send for ColorStyle

impl Sync for ColorStyle

Blanket Implementations

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

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

type Owned = T

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

impl<T, U> TryInto 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> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T[src]