ratatui_core/symbols/
scrollbar.rs

1use crate::symbols::{block, line};
2
3/// Scrollbar Set
4/// ```text
5/// <--▮------->
6/// ^  ^   ^   ^
7/// │  │   │   └ end
8/// │  │   └──── track
9/// │  └──────── thumb
10/// └─────────── begin
11/// ```
12#[derive(Debug, Default, Clone, Eq, PartialEq, Hash)]
13pub struct Set<'a> {
14    pub track: &'a str,
15    pub thumb: &'a str,
16    pub begin: &'a str,
17    pub end: &'a str,
18}
19
20pub const DOUBLE_VERTICAL: Set = Set {
21    track: line::DOUBLE_VERTICAL,
22    thumb: block::FULL,
23    begin: "▲",
24    end: "▼",
25};
26
27pub const DOUBLE_HORIZONTAL: Set = Set {
28    track: line::DOUBLE_HORIZONTAL,
29    thumb: block::FULL,
30    begin: "◄",
31    end: "►",
32};
33
34pub const VERTICAL: Set = Set {
35    track: line::VERTICAL,
36    thumb: block::FULL,
37    begin: "↑",
38    end: "↓",
39};
40
41pub const HORIZONTAL: Set = Set {
42    track: line::HORIZONTAL,
43    thumb: block::FULL,
44    begin: "←",
45    end: "→",
46};