fiber
Loading...
Searching...
No Matches
utf8_lines.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string_view>
4
5#ifdef FIBER_DISABLE_UTF8_CODES
6 #define FIBER_UTF8_CODE(str, alternative) alternative
7#else
8 #define FIBER_UTF8_CODE(str, alternative) str
9#endif
10
12
13// Single Line Drawing Characters
14constexpr std::string_view single_horizontal = FIBER_UTF8_CODE("─", "-"); // ─ "─"
15constexpr std::string_view single_vertical = FIBER_UTF8_CODE("│", "|"); // │ "│"
16constexpr std::string_view single_corner_topleft = FIBER_UTF8_CODE("┌", "+"); // ┌ "┌"
17constexpr std::string_view single_corner_topright = FIBER_UTF8_CODE("┐", "+"); // ┐ "┐"
18constexpr std::string_view single_corner_botleft = FIBER_UTF8_CODE("└", "+"); // └ "└"
19constexpr std::string_view single_corner_botright = FIBER_UTF8_CODE("┘", "+"); // ┘ "┘"
20constexpr std::string_view single_t_up = FIBER_UTF8_CODE("┬", "+"); // ┬ "┬"
21constexpr std::string_view single_t_down = FIBER_UTF8_CODE("┴", "+"); // ┴ "┴"
22constexpr std::string_view single_t_left = FIBER_UTF8_CODE("├", "+"); // ├ "├"
23constexpr std::string_view single_t_right = FIBER_UTF8_CODE("┤", "+"); // ┤ "┤"
24constexpr std::string_view single_cross = FIBER_UTF8_CODE("┼", "+"); // ┼ "┼"
25
26// Double Line Drawing Characters
27constexpr std::string_view double_horizontal = FIBER_UTF8_CODE("═", "-"); // ═ "═"
28constexpr std::string_view double_vertical = FIBER_UTF8_CODE("║", "|"); // ║ "║"
29constexpr std::string_view double_corner_topleft = FIBER_UTF8_CODE("╔", "+"); // ╔ "╔"
30constexpr std::string_view double_corner_topright = FIBER_UTF8_CODE("╗", "+"); // ╗ "╗"
31constexpr std::string_view double_corner_botleft = FIBER_UTF8_CODE("╚", "+"); // ╚ "╚"
32constexpr std::string_view double_corner_botright = FIBER_UTF8_CODE("╝", "+"); // ╝ "╝"
33constexpr std::string_view double_t_up = FIBER_UTF8_CODE("╦", "+"); // ╦ "╦"
34constexpr std::string_view double_t_down = FIBER_UTF8_CODE("╩", "+"); // ╩ "╩"
35constexpr std::string_view double_t_left = FIBER_UTF8_CODE("╠", "+"); // ╠ "╠"
36constexpr std::string_view double_t_right = FIBER_UTF8_CODE("╣", "+"); // ╣ "╣"
37constexpr std::string_view double_cross = FIBER_UTF8_CODE("╬", "+"); // ╬ "╬"
38
39// Mixed Single/Double Line Characters
40constexpr std::string_view mixed_corner_topleft = FIBER_UTF8_CODE("╒", "+"); // ╒ "╒"
41constexpr std::string_view mixed_corner_topright = FIBER_UTF8_CODE("╕", "+"); // ╕ "╕"
42constexpr std::string_view mixed_corner_botleft = FIBER_UTF8_CODE("╘", "+"); // ╘ "╘"
43constexpr std::string_view mixed_corner_botright = FIBER_UTF8_CODE("╛", "+"); // ╛ "╛"
44constexpr std::string_view mixed_t_up = FIBER_UTF8_CODE("╤", "+"); // ╤ "╤"
45constexpr std::string_view mixed_t_down = FIBER_UTF8_CODE("╧", "+"); // ╧ "╧"
46constexpr std::string_view mixed_t_left = FIBER_UTF8_CODE("╞", "+"); // ╞ "╞"
47constexpr std::string_view mixed_t_right = FIBER_UTF8_CODE("╡", "+"); // ╡ "╡"
48constexpr std::string_view mixed_cross = FIBER_UTF8_CODE("╪", "+"); // ╪ "╪"
49
50// Light Line Variants (similar to single, but sometimes spaced differently)
51constexpr std::string_view light_horizontal = FIBER_UTF8_CODE("─", "-");
52constexpr std::string_view light_vertical = FIBER_UTF8_CODE("│", "-");
53constexpr std::string_view light_corner_topleft = FIBER_UTF8_CODE("┌", "+");
54constexpr std::string_view light_corner_topright = FIBER_UTF8_CODE("┐", "+");
55constexpr std::string_view light_corner_botleft = FIBER_UTF8_CODE("└", "+");
56constexpr std::string_view light_corner_botright = FIBER_UTF8_CODE("┘", "+");
57
58// Heavy Line Drawing Characters
59constexpr std::string_view heavy_horizontal = FIBER_UTF8_CODE("━", "-"); // ━ "━"
60constexpr std::string_view heavy_vertical = FIBER_UTF8_CODE("┃", "|"); // ┃ "┃"
61constexpr std::string_view heavy_corner_topleft = FIBER_UTF8_CODE("┏", "+"); // ┏ "┏"
62constexpr std::string_view heavy_corner_topright = FIBER_UTF8_CODE("┓", "+"); // ┓ "┓"
63constexpr std::string_view heavy_corner_botleft = FIBER_UTF8_CODE("┗", "+"); // ┗ "┗"
64constexpr std::string_view heavy_corner_botright = FIBER_UTF8_CODE("┛", "+"); // ┛ "┛"
65constexpr std::string_view heavy_t_up = FIBER_UTF8_CODE("┳", "+"); // ┳ "┳"
66constexpr std::string_view heavy_t_down = FIBER_UTF8_CODE("┻", "+"); // ┻ "┻"
67constexpr std::string_view heavy_t_left = FIBER_UTF8_CODE("┣", "+"); // ┣ "┣"
68constexpr std::string_view heavy_t_right = FIBER_UTF8_CODE("┫", "+"); // ┫ "┫"
69constexpr std::string_view heavy_cross = FIBER_UTF8_CODE("╋", "+"); // ╋ "╋"
70
71// Rounded Corners (usually used with light lines)
72constexpr std::string_view rounded_corner_topleft = FIBER_UTF8_CODE("╭", "+"); // ╭ "╭"
73constexpr std::string_view rounded_corner_topright = FIBER_UTF8_CODE("╮", "+"); // ╮ "╮"
74constexpr std::string_view rounded_corner_botleft = FIBER_UTF8_CODE("╰", "+"); // ╰ "╰"
75constexpr std::string_view rounded_corner_botright = FIBER_UTF8_CODE("╯", "+"); // ╯ "╯"
76
77} // namespace terminal_lines
Definition utf8_lines.hpp:11
constexpr std::string_view heavy_vertical
Definition utf8_lines.hpp:60
constexpr std::string_view heavy_t_down
Definition utf8_lines.hpp:66
constexpr std::string_view double_vertical
Definition utf8_lines.hpp:28
constexpr std::string_view rounded_corner_botleft
Definition utf8_lines.hpp:74
constexpr std::string_view light_corner_botright
Definition utf8_lines.hpp:56
constexpr std::string_view rounded_corner_topleft
Definition utf8_lines.hpp:72
constexpr std::string_view mixed_t_down
Definition utf8_lines.hpp:45
constexpr std::string_view double_horizontal
Definition utf8_lines.hpp:27
constexpr std::string_view light_corner_topleft
Definition utf8_lines.hpp:53
constexpr std::string_view heavy_cross
Definition utf8_lines.hpp:69
constexpr std::string_view single_corner_botright
Definition utf8_lines.hpp:19
constexpr std::string_view double_t_left
Definition utf8_lines.hpp:35
constexpr std::string_view double_corner_botleft
Definition utf8_lines.hpp:31
constexpr std::string_view single_t_up
Definition utf8_lines.hpp:20
constexpr std::string_view heavy_t_left
Definition utf8_lines.hpp:67
constexpr std::string_view mixed_corner_botright
Definition utf8_lines.hpp:43
constexpr std::string_view heavy_t_right
Definition utf8_lines.hpp:68
constexpr std::string_view double_cross
Definition utf8_lines.hpp:37
constexpr std::string_view double_corner_topright
Definition utf8_lines.hpp:30
constexpr std::string_view single_corner_topright
Definition utf8_lines.hpp:17
constexpr std::string_view double_corner_topleft
Definition utf8_lines.hpp:29
constexpr std::string_view single_corner_topleft
Definition utf8_lines.hpp:16
constexpr std::string_view heavy_horizontal
Definition utf8_lines.hpp:59
constexpr std::string_view mixed_corner_botleft
Definition utf8_lines.hpp:42
constexpr std::string_view light_horizontal
Definition utf8_lines.hpp:51
constexpr std::string_view single_vertical
Definition utf8_lines.hpp:15
constexpr std::string_view double_t_right
Definition utf8_lines.hpp:36
constexpr std::string_view mixed_corner_topleft
Definition utf8_lines.hpp:40
constexpr std::string_view single_corner_botleft
Definition utf8_lines.hpp:18
constexpr std::string_view heavy_corner_botright
Definition utf8_lines.hpp:64
constexpr std::string_view double_corner_botright
Definition utf8_lines.hpp:32
constexpr std::string_view mixed_t_right
Definition utf8_lines.hpp:47
constexpr std::string_view light_vertical
Definition utf8_lines.hpp:52
constexpr std::string_view mixed_t_up
Definition utf8_lines.hpp:44
constexpr std::string_view single_t_down
Definition utf8_lines.hpp:21
constexpr std::string_view mixed_cross
Definition utf8_lines.hpp:48
constexpr std::string_view heavy_t_up
Definition utf8_lines.hpp:65
constexpr std::string_view single_horizontal
Definition utf8_lines.hpp:14
constexpr std::string_view rounded_corner_botright
Definition utf8_lines.hpp:75
constexpr std::string_view heavy_corner_topright
Definition utf8_lines.hpp:62
constexpr std::string_view heavy_corner_botleft
Definition utf8_lines.hpp:63
constexpr std::string_view single_t_right
Definition utf8_lines.hpp:23
constexpr std::string_view single_cross
Definition utf8_lines.hpp:24
constexpr std::string_view mixed_t_left
Definition utf8_lines.hpp:46
constexpr std::string_view heavy_corner_topleft
Definition utf8_lines.hpp:61
constexpr std::string_view mixed_corner_topright
Definition utf8_lines.hpp:41
constexpr std::string_view rounded_corner_topright
Definition utf8_lines.hpp:73
constexpr std::string_view single_t_left
Definition utf8_lines.hpp:22
constexpr std::string_view double_t_up
Definition utf8_lines.hpp:33
constexpr std::string_view double_t_down
Definition utf8_lines.hpp:34
constexpr std::string_view light_corner_botleft
Definition utf8_lines.hpp:55
constexpr std::string_view light_corner_topright
Definition utf8_lines.hpp:54
#define FIBER_UTF8_CODE(str, alternative)
Definition utf8_lines.hpp:8