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 table_base(&self) -> Style

Source

pub fn table_header(&self) -> Style

Source

pub fn container(&self) -> Style

Container base

Source

pub fn container_arrow(&self) -> Style

Container arrows

Source

pub fn data_base(&self) -> Style

Data display style. Used for lists, tables, …

Source

pub fn dialog_base(&self) -> Style

Background for dialogs.

Source

pub fn status_base(&self) -> Style

Style for the status line.

Source

pub fn list_base(&self) -> Style

Base style for lists.

Source

pub fn button_base(&self) -> Style

Base style for buttons.

Source

pub fn button_armed(&self) -> Style

Armed style for buttons.

Source

pub fn block(&self) -> Style

Source

pub fn block_title(&self) -> Style

Source

pub fn month_style(&self) -> MonthStyle

Complete MonthStyle.

Source

pub fn shadow_style(&self) -> ShadowStyle

Style for shadows.

Source

pub fn line_nr_style(&self) -> LineNumberStyle

Style for LineNumbers.

Source

pub fn textarea_style(&self) -> TextStyle

Complete TextAreaStyle

Source

pub fn input_style(&self) -> TextStyle

Complete TextInputStyle

Source

pub fn paragraph_style(&self) -> ParagraphStyle

Source

pub fn choice_style(&self) -> ChoiceStyle

Source

pub fn radio_style(&self) -> RadioStyle

Source

pub fn checkbox_style(&self) -> CheckboxStyle

Complete CheckboxStyle

Source

pub fn menu_style(&self) -> MenuStyle

Complete MenuStyle

Source

pub fn button_style(&self) -> ButtonStyle

Complete ButtonStyle

Source

pub fn table_style(&self) -> TableStyle

Complete TableStyle

Source

pub fn list_style(&self) -> ListStyle

Complete ListStyle

Source

pub fn scroll_style(&self) -> ScrollStyle

Scroll style

Source

pub fn split_style(&self) -> SplitStyle

Split style

Source

pub fn view_style(&self) -> ViewStyle

View style

Source

pub fn tabbed_style(&self) -> TabbedStyle

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 file_dialog_style(&self) -> FileDialogStyle

FileDialog style.

Source

pub fn msg_dialog_style(&self) -> MsgDialogStyle

Complete MsgDialogStyle.

Source

pub fn pager_style(&self) -> PagerStyle

Pager style.

Source

pub fn clipper_style(&self) -> ClipperStyle

Clipper style.

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.