-
Notifications
You must be signed in to change notification settings - Fork 4
/
style.h
101 lines (98 loc) · 3.65 KB
/
style.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#ifndef STYLE_H
#define STYLE_H
#define PARTICIPANT_TOP_GAP 0
#define PARTICIPANT_BOTTOM_GAP 0
#define PARTICIPANT_VERTICAL_GAP (PARTICIPANT_BOTTOM_GAP+PARTICIPANT_TOP_GAP+2)
// +-------+ <-+
// | somth | |
// +-------+ <-+- : default = 2
#define PARTICIPANT_LEFT_GAP 1
#define PARTICIPANT_RIGHT_GAP 1
#define PARTICIPANT_HORIZONTAL_GAP (PARTICIPANT_LEFT_GAP+PARTICIPANT_RIGHT_GAP+2)
// +-------+
// | somth |
// +-------+
// ^-------^---: default = 2
//--------------------------------------------------
// ***STYLES***
#define DEFAULT 0
#define UTF_DEFAULT 1
//--------------------------------------------------
#define STYLE_S 21
#define UTF_SUPPORT
# define D_PARTICIPANT_VERTICAL_LINE "|"
# define D_PARTICIPANT_HORIZONTAL_LINE "-"
# define D_PARTICIPANT_TOP_LEFT ","
# define D_PARTICIPANT_TOP_RIGHT "."
# define D_PARTICIPANT_BOTTOM_LEFT "`"
# define D_PARTICIPANT_BOTTOM_RIGHT "'"
# define D_PARTICIPANT_BOTTOM_CONNECTION "-"
# define D_VERTICAL_LINE "|"
# define D_ARROW_NORMAL_VERTICAL_LINE "|"
# define D_ARROW_RET_VERTICAL_LINE ":"
# define D_ARROW_RET_LINE_L "."
# define D_ARROW_RET_LINE_R "."
# define D_ARROW_NORMAL_R ">"
# define D_ARROW_NORMAL_L "<"
# define D_ARROW_RET_L "<"
# define D_ARROW_RET_R ">"
# define D_ARROW_ORIGIN_R "+"
# define D_ARROW_ORIGIN_L "+"
# define D_ARROW_LINE_R "-"
# define D_ARROW_LINE_L "-"
//--------------------------------------------------
# define U_PARTICIPANT_VERTICAL_LINE "│"
# define U_PARTICIPANT_HORIZONTAL_LINE "─"
# define U_PARTICIPANT_TOP_LEFT "╭"
# define U_PARTICIPANT_TOP_RIGHT "╮"
# define U_PARTICIPANT_BOTTOM_LEFT "╰"
# define U_PARTICIPANT_BOTTOM_RIGHT "╯"
# define U_PARTICIPANT_BOTTOM_CONNECTION "┬"
# define U_VERTICAL_LINE "│"
# define U_ARROW_NORMAL_VERTICAL_LINE "│"
# define U_ARROW_RET_VERTICAL_LINE "┊"
# define U_ARROW_RET_LINE_L "╴"
# define U_ARROW_RET_LINE_R "╶"
# define U_ARROW_NORMAL_R "▶"
# define U_ARROW_NORMAL_L "◀"
# define U_ARROW_RET_L "≺"
# define U_ARROW_RET_R "≻"
# define U_ARROW_ORIGIN_R "├"
# define U_ARROW_ORIGIN_L "┤"
# define U_ARROW_LINE_R "╌"
# define U_ARROW_LINE_L "╌"
//--------------------------------------------------
#define PARTICIPANT_VERTICAL_LINE style[ 0 ]
#define PARTICIPANT_HORIZONTAL_LINE style[ 1 ]
#define PARTICIPANT_TOP_LEFT style[ 2 ]
#define PARTICIPANT_TOP_RIGHT style[ 3 ]
#define PARTICIPANT_BOTTOM_LEFT style[ 4 ]
#define PARTICIPANT_BOTTOM_RIGHT style[ 5 ]
#define PARTICIPANT_BOTTOM_CONNECTION style[ 6 ]
#define VERTICAL_LINE style[ 7 ]
#define ARROW_NORMAL_VERTICAL_LINE style[ 8 ]
#define ARROW_RET_VERTICAL_LINE style[ 9 ]
#define ARROW_RET_LINE_L style[ 10 ]
#define ARROW_RET_LINE_R style[ 11 ]
#define ARROW_NORMAL_R style[ 12 ]
#define ARROW_NORMAL_L style[ 13 ]
#define ARROW_RET_L style[ 14 ]
#define ARROW_RET_R style[ 15 ]
#define ARROW_ORIGIN_R style[ 16 ]
#define ARROW_ORIGIN_L style[ 17 ]
#define ARROW_LINE_R style[ 18 ]
#define ARROW_LINE_L style[ 19 ]
#ifdef UTF_SUPPORT
static inline char* C(char* ch)
{
return ch;
}
#else
static inline char C(char* ch)
{
return *ch;
}
#endif
char* style[STYLE_S];
void set_style(int style);
#endif