Struct cursive::theme::ColorStyle [−][src]
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]
impl ColorStyle
pub fn new<F, B>(front: F, back: B) -> Self where
F: Into<ColorType>,
B: Into<ColorType>,
[src]
pub fn new<F, B>(front: F, back: B) -> Self where
F: Into<ColorType>,
B: Into<ColorType>,
Creates
pub fn terminal_default() -> Self
[src]
pub fn terminal_default() -> Self
Style set by terminal before entering a Cursive program.
pub fn background() -> Self
[src]
pub fn background() -> Self
Application background, where no view is present.
pub fn shadow() -> Self
[src]
pub fn shadow() -> Self
Color used by view shadows. Only background matters.
pub fn primary() -> Self
[src]
pub fn primary() -> Self
Main text with default background.
pub fn secondary() -> Self
[src]
pub fn secondary() -> Self
Secondary text color, with default background.
pub fn tertiary() -> Self
[src]
pub fn tertiary() -> Self
Tertiary text color, with default background.
pub fn title_primary() -> Self
[src]
pub fn title_primary() -> Self
Title text color with default background.
pub fn title_secondary() -> Self
[src]
pub fn title_secondary() -> Self
Alternative color for a title.
pub fn highlight() -> Self
[src]
pub fn highlight() -> Self
Alternate text with highlight background.
pub fn highlight_inactive() -> Self
[src]
pub fn highlight_inactive() -> Self
Highlight color for inactive views (not in focus).
pub fn resolve(&self, palette: &Palette) -> ColorPair
[src]
pub fn resolve(&self, palette: &Palette) -> ColorPair
Return the color pair that this style represents.
Trait Implementations
impl Clone for ColorStyle
[src]
impl Clone for ColorStyle
fn clone(&self) -> ColorStyle
[src]
fn clone(&self) -> ColorStyle
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for ColorStyle
[src]
impl Copy for ColorStyle
impl Debug for ColorStyle
[src]
impl Debug for ColorStyle
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for ColorStyle
[src]
impl PartialEq for ColorStyle
fn eq(&self, other: &ColorStyle) -> bool
[src]
fn eq(&self, other: &ColorStyle) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &ColorStyle) -> bool
[src]
fn ne(&self, other: &ColorStyle) -> bool
This method tests for !=
.
impl Eq for ColorStyle
[src]
impl Eq for ColorStyle
impl Hash for ColorStyle
[src]
impl Hash for ColorStyle
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
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]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl From<Color> for ColorStyle
[src]
impl From<Color> for ColorStyle
impl From<PaletteColor> for ColorStyle
[src]
impl From<PaletteColor> for ColorStyle
fn from(color: PaletteColor) -> Self
[src]
fn from(color: PaletteColor) -> Self
Performs the conversion.
impl From<ColorType> for ColorStyle
[src]
impl From<ColorType> for ColorStyle
impl<F, B> From<(F, B)> for ColorStyle where
F: Into<ColorType>,
B: Into<ColorType>,
[src]
impl<F, B> From<(F, B)> for ColorStyle where
F: Into<ColorType>,
B: Into<ColorType>,
impl From<ColorStyle> for Style
[src]
impl From<ColorStyle> for Style
fn from(color: ColorStyle) -> Self
[src]
fn from(color: ColorStyle) -> Self
Performs the conversion.
Auto Trait Implementations
impl Send for ColorStyle
impl Send for ColorStyle
impl Sync for ColorStyle
impl Sync for ColorStyle