-
-
Notifications
You must be signed in to change notification settings - Fork 135
/
stylecolorid_enumer.go
307 lines (293 loc) · 15.8 KB
/
stylecolorid_enumer.go
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
// Code generated by "enumer -linecomment -type=StyleColorID ."; DO NOT EDIT.
package giu
import (
"fmt"
"strings"
)
const (
_StyleColorIDName_0 = "colordisabled-colorbackground-colorchild-background-colorpopup-background-colorborder-colorborder-shadow-colorframe-background-colorframe-background-hovered-colorframe-background-active-colortitle-background-colortitle-background-active-colortitle-background-collapsed-colormenu-bar-background-colorscrollbar-background-colorscrollbar-grab-colorscrollbar-grab-hovered-colorscrollbar-grab-active-colorcheckmark-colorslider-grab-colorslider-grab-active-colorbutton-colorbutton-hovered-colorbutton-active-colorheader-colorheader-hovered-colorheader-active-colorseparator-colorseparator-hovered-colorseparator-active-colorresize-grip-colorresize-grip-hovered-colorresize-grip-active-colortab-hovered-colortab-colortab-active-color"
_StyleColorIDLowerName_0 = "colordisabled-colorbackground-colorchild-background-colorpopup-background-colorborder-colorborder-shadow-colorframe-background-colorframe-background-hovered-colorframe-background-active-colortitle-background-colortitle-background-active-colortitle-background-collapsed-colormenu-bar-background-colorscrollbar-background-colorscrollbar-grab-colorscrollbar-grab-hovered-colorscrollbar-grab-active-colorcheckmark-colorslider-grab-colorslider-grab-active-colorbutton-colorbutton-hovered-colorbutton-active-colorheader-colorheader-hovered-colorheader-active-colorseparator-colorseparator-hovered-colorseparator-active-colorresize-grip-colorresize-grip-hovered-colorresize-grip-active-colortab-hovered-colortab-colortab-active-color"
_StyleColorIDName_1 = "tab-unfocused-colortab-unfocused-active-color"
_StyleColorIDLowerName_1 = "tab-unfocused-colortab-unfocused-active-color"
_StyleColorIDName_2 = "plot-lines-colorplot-lines-hovered-colorplot-histogram-colorplot-histogram-hovered-colortable-header-background-colortable-border-strong-colortable-border-light-colortable-row-background-colortable-row-alternate-background-color"
_StyleColorIDLowerName_2 = "plot-lines-colorplot-lines-hovered-colorplot-histogram-colorplot-histogram-hovered-colortable-header-background-colortable-border-strong-colortable-border-light-colortable-row-background-colortable-row-alternate-background-color"
_StyleColorIDName_3 = "text-selected-background-colordrag-drop-target-color"
_StyleColorIDLowerName_3 = "text-selected-background-colordrag-drop-target-color"
_StyleColorIDName_4 = "navigation-highlight-colorwindowing-dim-background-colormodal-window-dim-background-color"
_StyleColorIDLowerName_4 = "navigation-highlight-colorwindowing-dim-background-colormodal-window-dim-background-color"
)
var (
_StyleColorIDIndex_0 = [...]uint16{0, 5, 19, 35, 57, 79, 91, 110, 132, 162, 191, 213, 242, 274, 299, 325, 345, 373, 400, 415, 432, 456, 468, 488, 507, 519, 539, 558, 573, 596, 618, 635, 660, 684, 701, 710, 726}
_StyleColorIDIndex_1 = [...]uint8{0, 19, 45}
_StyleColorIDIndex_2 = [...]uint8{0, 16, 40, 60, 88, 117, 142, 166, 192, 228}
_StyleColorIDIndex_3 = [...]uint8{0, 30, 52}
_StyleColorIDIndex_4 = [...]uint8{0, 26, 56, 89}
)
func (i StyleColorID) String() string {
switch {
case 0 <= i && i <= 35:
return _StyleColorIDName_0[_StyleColorIDIndex_0[i]:_StyleColorIDIndex_0[i+1]]
case 37 <= i && i <= 38:
i -= 37
return _StyleColorIDName_1[_StyleColorIDIndex_1[i]:_StyleColorIDIndex_1[i+1]]
case 42 <= i && i <= 50:
i -= 42
return _StyleColorIDName_2[_StyleColorIDIndex_2[i]:_StyleColorIDIndex_2[i+1]]
case 52 <= i && i <= 53:
i -= 52
return _StyleColorIDName_3[_StyleColorIDIndex_3[i]:_StyleColorIDIndex_3[i+1]]
case 55 <= i && i <= 57:
i -= 55
return _StyleColorIDName_4[_StyleColorIDIndex_4[i]:_StyleColorIDIndex_4[i+1]]
default:
return fmt.Sprintf("StyleColorID(%d)", i)
}
}
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
func _StyleColorIDNoOp() {
var x [1]struct{}
_ = x[StyleColorText-(0)]
_ = x[StyleColorTextDisabled-(1)]
_ = x[StyleColorWindowBg-(2)]
_ = x[StyleColorChildBg-(3)]
_ = x[StyleColorPopupBg-(4)]
_ = x[StyleColorBorder-(5)]
_ = x[StyleColorBorderShadow-(6)]
_ = x[StyleColorFrameBg-(7)]
_ = x[StyleColorFrameBgHovered-(8)]
_ = x[StyleColorFrameBgActive-(9)]
_ = x[StyleColorTitleBg-(10)]
_ = x[StyleColorTitleBgActive-(11)]
_ = x[StyleColorTitleBgCollapsed-(12)]
_ = x[StyleColorMenuBarBg-(13)]
_ = x[StyleColorScrollbarBg-(14)]
_ = x[StyleColorScrollbarGrab-(15)]
_ = x[StyleColorScrollbarGrabHovered-(16)]
_ = x[StyleColorScrollbarGrabActive-(17)]
_ = x[StyleColorCheckMark-(18)]
_ = x[StyleColorSliderGrab-(19)]
_ = x[StyleColorSliderGrabActive-(20)]
_ = x[StyleColorButton-(21)]
_ = x[StyleColorButtonHovered-(22)]
_ = x[StyleColorButtonActive-(23)]
_ = x[StyleColorHeader-(24)]
_ = x[StyleColorHeaderHovered-(25)]
_ = x[StyleColorHeaderActive-(26)]
_ = x[StyleColorSeparator-(27)]
_ = x[StyleColorSeparatorHovered-(28)]
_ = x[StyleColorSeparatorActive-(29)]
_ = x[StyleColorResizeGrip-(30)]
_ = x[StyleColorResizeGripHovered-(31)]
_ = x[StyleColorResizeGripActive-(32)]
_ = x[StyleColorTabHovered-(33)]
_ = x[StyleColorTab-(34)]
_ = x[StyleColorTabActive-(35)]
_ = x[StyleColorTabUnfocused-(37)]
_ = x[StyleColorTabUnfocusedActive-(38)]
_ = x[StyleColorPlotLines-(42)]
_ = x[StyleColorPlotLinesHovered-(43)]
_ = x[StyleColorPlotHistogram-(44)]
_ = x[StyleColorPlotHistogramHovered-(45)]
_ = x[StyleColorTableHeaderBg-(46)]
_ = x[StyleColorTableBorderStrong-(47)]
_ = x[StyleColorTableBorderLight-(48)]
_ = x[StyleColorTableRowBg-(49)]
_ = x[StyleColorTableRowBgAlt-(50)]
_ = x[StyleColorTextSelectedBg-(52)]
_ = x[StyleColorDragDropTarget-(53)]
_ = x[StyleColorNavHighlight-(55)]
_ = x[StyleColorNavWindowingDimBg-(56)]
_ = x[StyleColorModalWindowDimBg-(57)]
}
var _StyleColorIDValues = []StyleColorID{StyleColorText, StyleColorTextDisabled, StyleColorWindowBg, StyleColorChildBg, StyleColorPopupBg, StyleColorBorder, StyleColorBorderShadow, StyleColorFrameBg, StyleColorFrameBgHovered, StyleColorFrameBgActive, StyleColorTitleBg, StyleColorTitleBgActive, StyleColorTitleBgCollapsed, StyleColorMenuBarBg, StyleColorScrollbarBg, StyleColorScrollbarGrab, StyleColorScrollbarGrabHovered, StyleColorScrollbarGrabActive, StyleColorCheckMark, StyleColorSliderGrab, StyleColorSliderGrabActive, StyleColorButton, StyleColorButtonHovered, StyleColorButtonActive, StyleColorHeader, StyleColorHeaderHovered, StyleColorHeaderActive, StyleColorSeparator, StyleColorSeparatorHovered, StyleColorSeparatorActive, StyleColorResizeGrip, StyleColorResizeGripHovered, StyleColorResizeGripActive, StyleColorTabHovered, StyleColorTab, StyleColorTabActive, StyleColorTabUnfocused, StyleColorTabUnfocusedActive, StyleColorPlotLines, StyleColorPlotLinesHovered, StyleColorPlotHistogram, StyleColorPlotHistogramHovered, StyleColorTableHeaderBg, StyleColorTableBorderStrong, StyleColorTableBorderLight, StyleColorTableRowBg, StyleColorTableRowBgAlt, StyleColorTextSelectedBg, StyleColorDragDropTarget, StyleColorNavHighlight, StyleColorNavWindowingDimBg, StyleColorModalWindowDimBg}
var _StyleColorIDNameToValueMap = map[string]StyleColorID{
_StyleColorIDName_0[0:5]: StyleColorText,
_StyleColorIDLowerName_0[0:5]: StyleColorText,
_StyleColorIDName_0[5:19]: StyleColorTextDisabled,
_StyleColorIDLowerName_0[5:19]: StyleColorTextDisabled,
_StyleColorIDName_0[19:35]: StyleColorWindowBg,
_StyleColorIDLowerName_0[19:35]: StyleColorWindowBg,
_StyleColorIDName_0[35:57]: StyleColorChildBg,
_StyleColorIDLowerName_0[35:57]: StyleColorChildBg,
_StyleColorIDName_0[57:79]: StyleColorPopupBg,
_StyleColorIDLowerName_0[57:79]: StyleColorPopupBg,
_StyleColorIDName_0[79:91]: StyleColorBorder,
_StyleColorIDLowerName_0[79:91]: StyleColorBorder,
_StyleColorIDName_0[91:110]: StyleColorBorderShadow,
_StyleColorIDLowerName_0[91:110]: StyleColorBorderShadow,
_StyleColorIDName_0[110:132]: StyleColorFrameBg,
_StyleColorIDLowerName_0[110:132]: StyleColorFrameBg,
_StyleColorIDName_0[132:162]: StyleColorFrameBgHovered,
_StyleColorIDLowerName_0[132:162]: StyleColorFrameBgHovered,
_StyleColorIDName_0[162:191]: StyleColorFrameBgActive,
_StyleColorIDLowerName_0[162:191]: StyleColorFrameBgActive,
_StyleColorIDName_0[191:213]: StyleColorTitleBg,
_StyleColorIDLowerName_0[191:213]: StyleColorTitleBg,
_StyleColorIDName_0[213:242]: StyleColorTitleBgActive,
_StyleColorIDLowerName_0[213:242]: StyleColorTitleBgActive,
_StyleColorIDName_0[242:274]: StyleColorTitleBgCollapsed,
_StyleColorIDLowerName_0[242:274]: StyleColorTitleBgCollapsed,
_StyleColorIDName_0[274:299]: StyleColorMenuBarBg,
_StyleColorIDLowerName_0[274:299]: StyleColorMenuBarBg,
_StyleColorIDName_0[299:325]: StyleColorScrollbarBg,
_StyleColorIDLowerName_0[299:325]: StyleColorScrollbarBg,
_StyleColorIDName_0[325:345]: StyleColorScrollbarGrab,
_StyleColorIDLowerName_0[325:345]: StyleColorScrollbarGrab,
_StyleColorIDName_0[345:373]: StyleColorScrollbarGrabHovered,
_StyleColorIDLowerName_0[345:373]: StyleColorScrollbarGrabHovered,
_StyleColorIDName_0[373:400]: StyleColorScrollbarGrabActive,
_StyleColorIDLowerName_0[373:400]: StyleColorScrollbarGrabActive,
_StyleColorIDName_0[400:415]: StyleColorCheckMark,
_StyleColorIDLowerName_0[400:415]: StyleColorCheckMark,
_StyleColorIDName_0[415:432]: StyleColorSliderGrab,
_StyleColorIDLowerName_0[415:432]: StyleColorSliderGrab,
_StyleColorIDName_0[432:456]: StyleColorSliderGrabActive,
_StyleColorIDLowerName_0[432:456]: StyleColorSliderGrabActive,
_StyleColorIDName_0[456:468]: StyleColorButton,
_StyleColorIDLowerName_0[456:468]: StyleColorButton,
_StyleColorIDName_0[468:488]: StyleColorButtonHovered,
_StyleColorIDLowerName_0[468:488]: StyleColorButtonHovered,
_StyleColorIDName_0[488:507]: StyleColorButtonActive,
_StyleColorIDLowerName_0[488:507]: StyleColorButtonActive,
_StyleColorIDName_0[507:519]: StyleColorHeader,
_StyleColorIDLowerName_0[507:519]: StyleColorHeader,
_StyleColorIDName_0[519:539]: StyleColorHeaderHovered,
_StyleColorIDLowerName_0[519:539]: StyleColorHeaderHovered,
_StyleColorIDName_0[539:558]: StyleColorHeaderActive,
_StyleColorIDLowerName_0[539:558]: StyleColorHeaderActive,
_StyleColorIDName_0[558:573]: StyleColorSeparator,
_StyleColorIDLowerName_0[558:573]: StyleColorSeparator,
_StyleColorIDName_0[573:596]: StyleColorSeparatorHovered,
_StyleColorIDLowerName_0[573:596]: StyleColorSeparatorHovered,
_StyleColorIDName_0[596:618]: StyleColorSeparatorActive,
_StyleColorIDLowerName_0[596:618]: StyleColorSeparatorActive,
_StyleColorIDName_0[618:635]: StyleColorResizeGrip,
_StyleColorIDLowerName_0[618:635]: StyleColorResizeGrip,
_StyleColorIDName_0[635:660]: StyleColorResizeGripHovered,
_StyleColorIDLowerName_0[635:660]: StyleColorResizeGripHovered,
_StyleColorIDName_0[660:684]: StyleColorResizeGripActive,
_StyleColorIDLowerName_0[660:684]: StyleColorResizeGripActive,
_StyleColorIDName_0[684:701]: StyleColorTabHovered,
_StyleColorIDLowerName_0[684:701]: StyleColorTabHovered,
_StyleColorIDName_0[701:710]: StyleColorTab,
_StyleColorIDLowerName_0[701:710]: StyleColorTab,
_StyleColorIDName_0[710:726]: StyleColorTabActive,
_StyleColorIDLowerName_0[710:726]: StyleColorTabActive,
_StyleColorIDName_1[0:19]: StyleColorTabUnfocused,
_StyleColorIDLowerName_1[0:19]: StyleColorTabUnfocused,
_StyleColorIDName_1[19:45]: StyleColorTabUnfocusedActive,
_StyleColorIDLowerName_1[19:45]: StyleColorTabUnfocusedActive,
_StyleColorIDName_2[0:16]: StyleColorPlotLines,
_StyleColorIDLowerName_2[0:16]: StyleColorPlotLines,
_StyleColorIDName_2[16:40]: StyleColorPlotLinesHovered,
_StyleColorIDLowerName_2[16:40]: StyleColorPlotLinesHovered,
_StyleColorIDName_2[40:60]: StyleColorPlotHistogram,
_StyleColorIDLowerName_2[40:60]: StyleColorPlotHistogram,
_StyleColorIDName_2[60:88]: StyleColorPlotHistogramHovered,
_StyleColorIDLowerName_2[60:88]: StyleColorPlotHistogramHovered,
_StyleColorIDName_2[88:117]: StyleColorTableHeaderBg,
_StyleColorIDLowerName_2[88:117]: StyleColorTableHeaderBg,
_StyleColorIDName_2[117:142]: StyleColorTableBorderStrong,
_StyleColorIDLowerName_2[117:142]: StyleColorTableBorderStrong,
_StyleColorIDName_2[142:166]: StyleColorTableBorderLight,
_StyleColorIDLowerName_2[142:166]: StyleColorTableBorderLight,
_StyleColorIDName_2[166:192]: StyleColorTableRowBg,
_StyleColorIDLowerName_2[166:192]: StyleColorTableRowBg,
_StyleColorIDName_2[192:228]: StyleColorTableRowBgAlt,
_StyleColorIDLowerName_2[192:228]: StyleColorTableRowBgAlt,
_StyleColorIDName_3[0:30]: StyleColorTextSelectedBg,
_StyleColorIDLowerName_3[0:30]: StyleColorTextSelectedBg,
_StyleColorIDName_3[30:52]: StyleColorDragDropTarget,
_StyleColorIDLowerName_3[30:52]: StyleColorDragDropTarget,
_StyleColorIDName_4[0:26]: StyleColorNavHighlight,
_StyleColorIDLowerName_4[0:26]: StyleColorNavHighlight,
_StyleColorIDName_4[26:56]: StyleColorNavWindowingDimBg,
_StyleColorIDLowerName_4[26:56]: StyleColorNavWindowingDimBg,
_StyleColorIDName_4[56:89]: StyleColorModalWindowDimBg,
_StyleColorIDLowerName_4[56:89]: StyleColorModalWindowDimBg,
}
var _StyleColorIDNames = []string{
_StyleColorIDName_0[0:5],
_StyleColorIDName_0[5:19],
_StyleColorIDName_0[19:35],
_StyleColorIDName_0[35:57],
_StyleColorIDName_0[57:79],
_StyleColorIDName_0[79:91],
_StyleColorIDName_0[91:110],
_StyleColorIDName_0[110:132],
_StyleColorIDName_0[132:162],
_StyleColorIDName_0[162:191],
_StyleColorIDName_0[191:213],
_StyleColorIDName_0[213:242],
_StyleColorIDName_0[242:274],
_StyleColorIDName_0[274:299],
_StyleColorIDName_0[299:325],
_StyleColorIDName_0[325:345],
_StyleColorIDName_0[345:373],
_StyleColorIDName_0[373:400],
_StyleColorIDName_0[400:415],
_StyleColorIDName_0[415:432],
_StyleColorIDName_0[432:456],
_StyleColorIDName_0[456:468],
_StyleColorIDName_0[468:488],
_StyleColorIDName_0[488:507],
_StyleColorIDName_0[507:519],
_StyleColorIDName_0[519:539],
_StyleColorIDName_0[539:558],
_StyleColorIDName_0[558:573],
_StyleColorIDName_0[573:596],
_StyleColorIDName_0[596:618],
_StyleColorIDName_0[618:635],
_StyleColorIDName_0[635:660],
_StyleColorIDName_0[660:684],
_StyleColorIDName_0[684:701],
_StyleColorIDName_0[701:710],
_StyleColorIDName_0[710:726],
_StyleColorIDName_1[0:19],
_StyleColorIDName_1[19:45],
_StyleColorIDName_2[0:16],
_StyleColorIDName_2[16:40],
_StyleColorIDName_2[40:60],
_StyleColorIDName_2[60:88],
_StyleColorIDName_2[88:117],
_StyleColorIDName_2[117:142],
_StyleColorIDName_2[142:166],
_StyleColorIDName_2[166:192],
_StyleColorIDName_2[192:228],
_StyleColorIDName_3[0:30],
_StyleColorIDName_3[30:52],
_StyleColorIDName_4[0:26],
_StyleColorIDName_4[26:56],
_StyleColorIDName_4[56:89],
}
// StyleColorIDString retrieves an enum value from the enum constants string name.
// Throws an error if the param is not part of the enum.
func StyleColorIDString(s string) (StyleColorID, error) {
if val, ok := _StyleColorIDNameToValueMap[s]; ok {
return val, nil
}
if val, ok := _StyleColorIDNameToValueMap[strings.ToLower(s)]; ok {
return val, nil
}
return 0, fmt.Errorf("%s does not belong to StyleColorID values", s)
}
// StyleColorIDValues returns all values of the enum
func StyleColorIDValues() []StyleColorID {
return _StyleColorIDValues
}
// StyleColorIDStrings returns a slice of all String values of the enum
func StyleColorIDStrings() []string {
strs := make([]string, len(_StyleColorIDNames))
copy(strs, _StyleColorIDNames)
return strs
}
// IsAStyleColorID returns "true" if the value is listed in the enum definition. "false" otherwise
func (i StyleColorID) IsAStyleColorID() bool {
for _, v := range _StyleColorIDValues {
if i == v {
return true
}
}
return false
}