rat_theme::dark_theme

Struct 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 white(&self, n: usize) -> Style

Create a style from the given white shade. n is 0..=3

source

pub fn black(&self, n: usize) -> Style

Create a style from the given black shade. n is 0..=3

source

pub fn gray(&self, n: usize) -> Style

Create a style from the given gray shade. n is 0..=3

source

pub fn red(&self, n: usize) -> Style

Create a style from the given red shade. n is 0..=3

source

pub fn orange(&self, n: usize) -> Style

Create a style from the given orange shade. n is 0..=3

source

pub fn yellow(&self, n: usize) -> Style

Create a style from the given yellow shade. n is 0..=3

source

pub fn limegreen(&self, n: usize) -> Style

Create a style from the given limegreen shade. n is 0..=3

source

pub fn green(&self, n: usize) -> Style

Create a style from the given green shade. n is 0..=3

source

pub fn bluegreen(&self, n: usize) -> Style

Create a style from the given bluegreen shade. n is 0..=3

source

pub fn cyan(&self, n: usize) -> Style

Create a style from the given cyan shade. n is 0..=3

source

pub fn blue(&self, n: usize) -> Style

Create a style from the given blue shade. n is 0..=3

source

pub fn deepblue(&self, n: usize) -> Style

Create a style from the given deepblue shade. n is 0..=3

source

pub fn purple(&self, n: usize) -> Style

Create a style from the given purple shade. n is 0..=3

source

pub fn magenta(&self, n: usize) -> Style

Create a style from the given magenta shade. n is 0..=3

source

pub fn redpink(&self, n: usize) -> Style

Create a style from the given redpink shade. n is 0..=3

source

pub fn primary(&self, n: usize) -> Style

Create a style from the given primary shade. n is 0..=3

source

pub fn secondary(&self, n: usize) -> Style

Create a style from the given secondary shade. n is 0..=3

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 line_nr_style(&self) -> LineNumberStyle

Style for LineNumbers.

source

pub fn textarea_style(&self) -> TextAreaStyle

Complete TextAreaStyle

source

pub fn input_style(&self) -> TextInputStyle

Complete TextInputStyle

source

pub fn menu_style(&self) -> MenuStyle

Complete MenuStyle

source

pub fn table_style(&self) -> TableStyle

Complete FTableStyle

source

pub fn list_style(&self) -> ListStyle

Complete ListStyle

source

pub fn button_style(&self) -> ButtonStyle

Complete ButtonStyle

source

pub fn scroll_style(&self) -> ScrollStyle

Complete ScrolledStyle

source

pub fn split_style(&self) -> SplitStyle

Complete Split style

source

pub fn tabbed_style(&self) -> TabbedStyle

Complete Tabbed style

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.

source

pub fn file_dialog_style(&self) -> FileDialogStyle

Trait Implementations§

source§

impl Clone for DarkTheme

source§

fn clone(&self) -> DarkTheme

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
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> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> DynClone for T
where T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

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> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

source§

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>,

source§

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.