Enum cursive::theme::ColorStyle
[−]
[src]
pub enum ColorStyle { TerminalDefault, Background, Shadow, Primary, Secondary, Tertiary, TitlePrimary, TitleSecondary, Highlight, HighlightInactive, Custom { front: Color, back: Color, }, }
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.
Variants
TerminalDefault
Style set by terminal before entering a Cursive program.
Background
Application background, where no view is present.
Shadow
Color used by view shadows. Only background matters.
Primary
Main text with default background.
Secondary
Secondary text color, with default background.
Tertiary
Tertiary text color, with default background.
TitlePrimary
Title text color with default background.
TitleSecondary
Alternative color for a title.
Highlight
Alternate text with highlight background.
HighlightInactive
Highlight color for inactive views (not in focus).
Custom
Directly specifies colors, independently of the theme.
Fields of Custom
front: Color | Foreground color |
back: Color | Background color |
Methods
impl ColorStyle
[src]
fn resolve(&self, theme: &Theme) -> ColorPair
Return the color pair that this style represents.
Returns (front, back)
.
Trait Implementations
impl Clone for ColorStyle
[src]
fn clone(&self) -> ColorStyle
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Copy for ColorStyle
[src]
impl Debug for ColorStyle
[src]
impl PartialEq for ColorStyle
[src]
fn eq(&self, __arg_0: &ColorStyle) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ColorStyle) -> bool
This method tests for !=
.