pub enum BorderType {
Plain,
Rounded,
Double,
Thick,
}Expand description
The box-drawing glyph set BoxBorder, Panel, and
Modal draw their corners and edges with.
BorderType::Plain is the default: the single-line set every one of these widgets drew
before this type existed, so adding it is purely additive. The other three variants exist to
make nested or stateful boxes visually distinct at a glance: an outer BorderType::Double
around an inner BorderType::Plain reads instantly, where two identical single lines don’t,
and double/thick borders are a legible way to mark an active pane even on a 16-color terminal
where Theme alone can’t carry that distinction.
Covers four of ratatui’s six BorderType variants (Plain, Rounded, Double, Thick);
QuadrantInside/QuadrantOutside are omitted since nothing here has a use for them yet. Each
variant maps directly to a BorderSet in
retroglyph_core::symbols::border, the shared glyph tables every crate draws borders from.
§Examples
use retroglyph_ui::{BorderType, BoxBorder};
let border = BoxBorder::new().border_type(BorderType::Rounded);Variants§
Plain
Single-line box-drawing glyphs: ┌─┐│└┘.
Rounded
Single-line glyphs with rounded corners: ╭─╮│╰╯.
Double
Double-line box-drawing glyphs: ╔═╗║╚╝.
Thick
Heavy single-line box-drawing glyphs: ┏━┓┃┗┛.
Trait Implementations§
Source§impl Clone for BorderType
impl Clone for BorderType
Source§fn clone(&self) -> BorderType
fn clone(&self) -> BorderType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BorderType
impl Debug for BorderType
Source§impl Default for BorderType
impl Default for BorderType
Source§fn default() -> BorderType
fn default() -> BorderType
Source§impl Hash for BorderType
impl Hash for BorderType
Source§impl PartialEq for BorderType
impl PartialEq for BorderType
Source§fn eq(&self, other: &BorderType) -> bool
fn eq(&self, other: &BorderType) -> bool
self and other values to be equal, and is used by ==.impl Copy for BorderType
impl Eq for BorderType
impl StructuralPartialEq for BorderType
Auto Trait Implementations§
impl Freeze for BorderType
impl RefUnwindSafe for BorderType
impl Send for BorderType
impl Sync for BorderType
impl Unpin for BorderType
impl UnsafeUnpin for BorderType
impl UnwindSafe for BorderType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<C> WithAlpha for Cwhere
C: Copy,
impl<C> WithAlpha for Cwhere
C: Copy,
§fn with_alpha_first<A>(self, alpha: A) -> AlphaFirst<A, Self>
fn with_alpha_first<A>(self, alpha: A) -> AlphaFirst<A, Self>
self with alpha, storing alpha before the color in memory
(see [AlphaFirst]).§fn with_alpha_last<A>(self, alpha: A) -> AlphaLast<A, Self>
fn with_alpha_last<A>(self, alpha: A) -> AlphaLast<A, Self>
self with alpha, storing alpha after the color in memory
(see [AlphaLast]).