[−][src]Struct cursive::theme::ColorStyle
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]
B: Into<ColorType>,
F: Into<ColorType>,
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]
fn clone(&self) -> ColorStyle
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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]
B: Into<ColorType>,
F: Into<ColorType>,
fn from((F, B)) -> ColorStyle
[src]
impl From<BaseColor> for ColorStyle
[src]
fn from(color: BaseColor) -> ColorStyle
[src]
impl From<Color> for ColorStyle
[src]
fn from(color: Color) -> ColorStyle
[src]
impl From<ColorStyle> for Style
[src]
fn from(color: ColorStyle) -> Style
[src]
impl From<ColorType> for ColorStyle
[src]
fn from(color: ColorType) -> ColorStyle
[src]
impl From<PaletteColor> for ColorStyle
[src]
fn from(color: PaletteColor) -> ColorStyle
[src]
impl Hash for ColorStyle
[src]
fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<ColorStyle> for ColorStyle
[src]
fn eq(&self, other: &ColorStyle) -> bool
[src]
fn ne(&self, other: &ColorStyle) -> bool
[src]
impl StructuralEq for ColorStyle
[src]
impl StructuralPartialEq for ColorStyle
[src]
Auto Trait Implementations
impl RefUnwindSafe for ColorStyle
impl Send for ColorStyle
impl Sync for ColorStyle
impl Unpin for ColorStyle
impl UnwindSafe for ColorStyle
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[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]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.