[−][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.
The Default
value is to inherit the parent's colors.
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
F: Into<ColorType>,
B: Into<ColorType>,
[src]
F: Into<ColorType>,
B: Into<ColorType>,
Creates
pub fn front<F>(front: F) -> ColorStyle where
F: Into<ColorType>,
[src]
F: Into<ColorType>,
Uses the given color as front, inherits the parent background color.
pub fn back<B>(back: B) -> ColorStyle where
B: Into<ColorType>,
[src]
B: Into<ColorType>,
Uses the given color as background, inherits the parent front color.
pub fn inherit_parent() -> ColorStyle
[src]
Uses ColorType::InheritParent
for both front and background.
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 merge(a: ColorStyle, b: ColorStyle) -> ColorStyle
[src]
Merge the style b
over style a
.
This merges the front and back color types of a
and b
.
pub fn resolve(&self, palette: &Palette, previous: ColorPair) -> ColorPair
[src]
Return the color pair that this style represents.
Trait Implementations
impl Clone for ColorStyle
[src]
pub fn clone(&self) -> ColorStyle
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for ColorStyle
[src]
impl Debug for ColorStyle
[src]
impl Default for ColorStyle
[src]
pub fn default() -> ColorStyle
[src]
impl Eq 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>,
pub fn from((F, B)) -> ColorStyle
[src]
impl From<BaseColor> for ColorStyle
[src]
pub fn from(color: BaseColor) -> ColorStyle
[src]
impl From<Color> for ColorStyle
[src]
pub fn from(color: Color) -> ColorStyle
[src]
impl From<ColorStyle> for Style
[src]
pub fn from(color: ColorStyle) -> Style
[src]
impl From<ColorType> for ColorStyle
[src]
pub fn from(color: ColorType) -> ColorStyle
[src]
impl From<PaletteColor> for ColorStyle
[src]
pub fn from(color: PaletteColor) -> ColorStyle
[src]
impl Hash for ColorStyle
[src]
pub fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<ColorStyle> for ColorStyle
[src]
pub fn eq(&self, other: &ColorStyle) -> bool
[src]
pub fn ne(&self, other: &ColorStyle) -> bool
[src]
impl StructuralEq for ColorStyle
[src]
impl StructuralPartialEq for ColorStyle
[src]
Auto Trait Implementations
impl RefUnwindSafe for ColorStyle
[src]
impl Send for ColorStyle
[src]
impl Sync for ColorStyle
[src]
impl Unpin for ColorStyle
[src]
impl UnwindSafe for ColorStyle
[src]
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CallHasher for T where
T: Hash + ?Sized,
[src]
T: Hash + ?Sized,
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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> With for T
[src]
pub fn wrap_with<U, F>(self, f: F) -> U where
F: FnOnce(Self) -> U,
[src]
F: FnOnce(Self) -> U,
pub fn with<F>(self, f: F) -> Self where
F: FnOnce(&mut Self),
[src]
F: FnOnce(&mut Self),
pub fn try_with<E, F>(self, f: F) -> Result<Self, E> where
F: FnOnce(&mut Self) -> Result<(), E>,
[src]
F: FnOnce(&mut Self) -> Result<(), E>,
pub fn with_if<F>(self, condition: bool, f: F) -> Self where
F: FnOnce(&mut Self),
[src]
F: FnOnce(&mut Self),