Struct cursive::theme::ColorStyle
[−]
[src]
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]
F: Into<ColorType>,
B: Into<ColorType>,
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 From<ColorStyle> for Style
[src]
fn from(color: ColorStyle) -> Self
[src]
Performs the conversion.
impl Clone for ColorStyle
[src]
fn clone(&self) -> ColorStyle
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for ColorStyle
[src]
impl Debug for ColorStyle
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl PartialEq for ColorStyle
[src]
fn eq(&self, __arg_0: &ColorStyle) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ColorStyle) -> bool
[src]
This method tests for !=
.
impl Eq for ColorStyle
[src]
impl Hash for ColorStyle
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl From<Color> for ColorStyle
[src]
impl From<PaletteColor> for ColorStyle
[src]
fn from(color: PaletteColor) -> Self
[src]
Performs the conversion.
impl From<ColorType> for ColorStyle
[src]
impl<F, B> From<(F, B)> for ColorStyle where
F: Into<ColorType>,
B: Into<ColorType>,
[src]
F: Into<ColorType>,
B: Into<ColorType>,