tui_gradient_block/
border_styles.rs

1use crate::structs::border_symbols::SegmentSet;
2use tui_rule::Set;
3// A module of predefined border styles for different visual aesthetics. Each `BorderSymbolSet`
4// instance defines the characters to be used for different parts of the border (corners, sides, and centers).
5//
6// # Variants:
7// - `MISC1`: A style with standard "+" corners, and "=" for top/bottom edges, with "|" for side edges.
8// - `MISC2`: A style with "╘" and "╛" for the bottom corners, and "=" for top and bottom edges.
9// - `MISC3`: A unique style with "$" corners, "~" for center sides, and "─" for top and bottom edges.
10// These styles can be used to customize the appearance of borders for blocks
11pub const MISC1: SegmentSet = SegmentSet {
12    left: Set {
13        start: '+',
14        rep_1: '|',
15        center: '+',
16        rep_2: '|',
17        end: '+',
18    },
19    right: Set {
20        start: '+',
21        rep_1: '|',
22        center: '+',
23        rep_2: '|',
24        end: '+',
25    },
26    top: Set {
27        start: '+',
28        rep_1: '-',
29        center: '+',
30        rep_2: '-',
31        end: '+',
32    },
33    bottom: Set {
34        start: '+',
35        rep_1: '-',
36        center: '+',
37        rep_2: '-',
38        end: '+',
39    },
40};
41/// A simple border style with "&" edges and "+" center symbols
42pub const MISC2: SegmentSet = SegmentSet {
43    left: Set {
44        start: '&',
45        rep_1: '|',
46        center: '+',
47        rep_2: '|',
48        end: '&',
49    },
50    right: Set {
51        start: '&',
52        rep_1: '|',
53        center: '+',
54        rep_2: '|',
55        end: '&',
56    },
57    top: Set {
58        start: '&',
59        rep_1: '-',
60        center: '-',
61        rep_2: '-',
62        end: '&',
63    },
64    bottom: Set {
65        start: '&',
66        rep_1: '-',
67        center: '-',
68        rep_2: '-',
69        end: '&',
70    },
71};
72
73/// A more unique border style featuring "$" for the corners and "~" for the center sides
74pub const MISC3: SegmentSet = SegmentSet {
75    left: Set {
76        start: '$',
77        rep_1: '│',
78        center: '~',
79        rep_2: '│',
80        end: '$',
81    },
82    right: Set {
83        start: '$',
84        rep_1: '│',
85        center: '~',
86        rep_2: '│',
87        end: '$',
88    },
89    top: Set {
90        start: '$',
91        rep_1: '─',
92        center: '~',
93        rep_2: '─',
94        end: '$',
95    },
96    bottom: Set {
97        start: '$',
98        rep_1: '─',
99        center: '$',
100        rep_2: '─',
101        end: '$',
102    },
103};