Struct rat_theme::dark_theme::DarkTheme

source ·
pub struct DarkTheme { /* private fields */ }
Expand description

One sample theme which prefers dark colors from the color-scheme and generates styles for widgets.

The widget set fits for the widgets provided by rat-widget, for other needs take it as an idea for your own implementation.

Implementations§

source§

impl DarkTheme

source

pub fn new(name: String, s: Scheme) -> Self

source§

impl DarkTheme

source

pub fn name(&self) -> &str

Some display name.

source

pub fn dark_theme(&self) -> bool

Hint at dark.

source

pub fn scheme(&self) -> &Scheme

The underlying scheme.

source

pub fn focus(&self) -> Style

Focus style

source

pub fn select(&self) -> Style

Selection style

source

pub fn text_input(&self) -> Style

Text field style.

source

pub fn text_focus(&self) -> Style

Focused text field style.

source

pub fn text_select(&self) -> Style

Text selection style.

source

pub fn data(&self) -> Style

Data display style. Used for lists, tables, …

source

pub fn dialog_style(&self) -> Style

Background for dialogs.

source

pub fn status_style(&self) -> Style

Style for the status line.

source

pub fn input_style(&self) -> TextInputStyle

Complete TextInputStyle

source

pub fn inputmask_style(&self) -> MaskedInputStyle

Complete MaskedInputStyle

source

pub fn menu_style(&self) -> MenuStyle

Complete MenuStyle

source

pub fn table_style(&self) -> FTableStyle

Complete FTableStyle

source

pub fn list_style(&self) -> ListStyle

Complete ListStyle

source

pub fn button_style(&self) -> ButtonStyle

Complete ButtonStyle

source

pub fn scrolled_style(&self) -> ScrolledStyle

Complete ScrolledStyle

source

pub fn statusline_style(&self) -> Vec<Style>

Complete StatusLineStyle for a StatusLine with 3 indicator fields. This is what I need for the minimal example, which shows timings for Render/Event/Action.

source

pub fn msg_dialog_style(&self) -> MsgDialogStyle

Complete MsgDialogStyle.

Trait Implementations§

source§

impl Debug for DarkTheme

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.