-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathtab.rs
More file actions
110 lines (102 loc) · 2.64 KB
/
tab.rs
File metadata and controls
110 lines (102 loc) · 2.64 KB
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
102
103
104
105
106
107
108
109
110
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum TabId {
Drawing,
Presets,
Arrow,
History,
Performance,
Ui,
Board,
Capture,
Session,
Keybindings,
Tablet,
}
impl TabId {
pub const ALL: [TabId; 11] = [
TabId::Drawing,
TabId::Presets,
TabId::Ui,
TabId::Board,
TabId::Performance,
TabId::History,
TabId::Capture,
TabId::Session,
TabId::Keybindings,
TabId::Arrow,
TabId::Tablet,
];
pub fn title(&self) -> &'static str {
match self {
TabId::Drawing => "Drawing",
TabId::Presets => "Presets",
TabId::Arrow => "Arrow",
TabId::History => "History",
TabId::Performance => "Performance",
TabId::Ui => "UI",
TabId::Board => "Board",
TabId::Capture => "Capture",
TabId::Session => "Session",
TabId::Keybindings => "Keybindings",
TabId::Tablet => "Tablet",
}
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum UiTabId {
Toolbar,
StatusBar,
HelpOverlay,
ClickHighlight,
}
impl UiTabId {
pub const ALL: [UiTabId; 4] = [
UiTabId::Toolbar,
UiTabId::StatusBar,
UiTabId::HelpOverlay,
UiTabId::ClickHighlight,
];
pub fn title(&self) -> &'static str {
match self {
UiTabId::Toolbar => "Toolbar",
UiTabId::StatusBar => "Status Bar",
UiTabId::HelpOverlay => "Help Overlay",
UiTabId::ClickHighlight => "Click Highlight",
}
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum KeybindingsTabId {
General,
Drawing,
Tools,
Selection,
History,
UiModes,
CaptureView,
Presets,
}
impl KeybindingsTabId {
pub const ALL: [KeybindingsTabId; 8] = [
KeybindingsTabId::General,
KeybindingsTabId::Drawing,
KeybindingsTabId::Tools,
KeybindingsTabId::Selection,
KeybindingsTabId::History,
KeybindingsTabId::UiModes,
KeybindingsTabId::CaptureView,
KeybindingsTabId::Presets,
];
pub fn title(&self) -> &'static str {
match self {
KeybindingsTabId::General => "General",
KeybindingsTabId::Drawing => "Drawing",
KeybindingsTabId::Tools => "Tools",
KeybindingsTabId::Selection => "Selection",
KeybindingsTabId::History => "History",
KeybindingsTabId::UiModes => "UI & Modes",
KeybindingsTabId::CaptureView => "Capture & View",
KeybindingsTabId::Presets => "Presets",
}
}
}