Skip to main content

PanelStyle

Enum PanelStyle 

Source
pub enum PanelStyle {
Show 26 variants Title, Label, Hint, Error, Row { selected: bool, }, Button { primary: bool, }, Field { focused: bool, valid: bool, }, Swatch(u32), Tile { selected: bool, }, Popup, Dim(u8), FloatLabel, FolderIcon, Badge(u8), Progress { done: u16, hover: u16, }, Scrollbar { start: u16, len: u16, }, Option { selected: bool, highlight: u64, }, FontOption { selected: bool, highlight: u64, }, ThemePreview { fg: u32, bg: u32, cursor: u32, accent: u32, }, Md { flags: u8, heading: u8, }, MdCode { top: bool, bottom: bool, }, MdToken(u8), MdQuote, MdRule, Frame { focused: bool, }, Bubble { mine: bool, },
}
Expand description

How the host draws one panel item.

Variants§

§

Title

§

Label

§

Hint

§

Error

§

Row

Selectable list row.

Fields

§selected: bool
§

Button

Fields

§primary: bool
§

Field

Text input; valid false draws it in the error colour.

Fields

§focused: bool
§valid: bool
§

Swatch(u32)

Colour sample.

§

Tile

Framed tile (commander grid / carousel item).

Fields

§selected: bool
§

Popup

Background of a dropdown drawn over the panel.

§

Dim(u8)

A veil over the rect (0 clear … 255 opaque black) for motion such as the fullscreen viewer backdrop.

§

FloatLabel

Name tag drawn on top of everything, previews included (commander carousel): a slightly transparent rounded box with a soft shadow.

§

FolderIcon

Folder icon filling the rect (commander carousel).

§

Badge(u8)

Type badge (mouser_core::commander::Badge index) on a grid tile or carousel item, drawn on top like PanelStyle::FloatLabel.

§

Progress

Seek / volume bar: done and the hover mark (u16::MAX: none) in 1/1000.

Fields

§done: u16
§hover: u16
§

Scrollbar

Scroll position: a slim track with a thumb from start for len (1/1000 of the content). Vertical when taller than wide.

Fields

§start: u16
§len: u16
§

Option

Dropdown row; bit i of highlight marks char i as matched.

Fields

§selected: bool
§highlight: u64
§

FontOption

Font picker row: text is the family name and is drawn in that face.

Fields

§selected: bool
§highlight: u64
§

ThemePreview

Mini terminal sample for live theme edits (side preview).

Fields

§fg: u32
§bg: u32
§cursor: u32
§accent: u32
§

Md

A markdown text run (mouser_core::markdown span flags; heading level, 0 for body text).

Fields

§flags: u8
§heading: u8
§

MdCode

Markdown code block background, rounded at the block’s top and bottom.

Fields

§top: bool
§bottom: bool
§

MdToken(u8)

A highlighted run in a Markdown code block: its token class (mouser_core::highlight), coloured from the theme’s palette.

§

MdQuote

Markdown block quote bar.

§

MdRule

Markdown thematic break.

§

Frame

A rounded outline box (the chat’s frames, like grokbot-tui’s): the item’s text is a title set into the top edge; focused draws it in the accent. Nothing is filled, so items drawn after it show inside.

Fields

§focused: bool
§

Bubble

A rounded message bubble behind the rows drawn after it; mine tints it with the accent (your messages).

Fields

§mine: bool

Trait Implementations§

Source§

impl Clone for PanelStyle

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for PanelStyle

Source§

impl Debug for PanelStyle

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for PanelStyle

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for PanelStyle

Source§

impl PartialEq for PanelStyle

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for PanelStyle

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for PanelStyle

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, dest: *mut u8)

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

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.