-
-
Notifications
You must be signed in to change notification settings - Fork 155
Expand file tree
/
Copy pathstyleplotcolorid_enumer.go
More file actions
134 lines (119 loc) · 5.87 KB
/
styleplotcolorid_enumer.go
File metadata and controls
134 lines (119 loc) · 5.87 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
// Code generated by "enumer -linecomment -type=StylePlotColorID ."; DO NOT EDIT.
package giu
import (
"fmt"
"strings"
)
const _StylePlotColorIDName = "plot-frame-bgplot-plot-bgplot-plot-borderplot-legend-bgplot-legend-borderplot-legend-textplot-title-textplot-inlay-textplot-axis-textplot-axis-gridplot-axis-tickplot-axis-bgplot-axis-bg-hoveredplot-axis-bg-activeplot-selectionplot-crosshairs"
var _StylePlotColorIDIndex = [...]uint8{0, 13, 25, 41, 55, 73, 89, 104, 119, 133, 147, 161, 173, 193, 212, 226, 241}
const _StylePlotColorIDLowerName = "plot-frame-bgplot-plot-bgplot-plot-borderplot-legend-bgplot-legend-borderplot-legend-textplot-title-textplot-inlay-textplot-axis-textplot-axis-gridplot-axis-tickplot-axis-bgplot-axis-bg-hoveredplot-axis-bg-activeplot-selectionplot-crosshairs"
func (i StylePlotColorID) String() string {
if i < 0 || i >= StylePlotColorID(len(_StylePlotColorIDIndex)-1) {
return fmt.Sprintf("StylePlotColorID(%d)", i)
}
return _StylePlotColorIDName[_StylePlotColorIDIndex[i]:_StylePlotColorIDIndex[i+1]]
}
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
func _StylePlotColorIDNoOp() {
var x [1]struct{}
_ = x[StylePlotColorFrameBg-(0)]
_ = x[StylePlotColorPlotBg-(1)]
_ = x[StylePlotColorPlotBorder-(2)]
_ = x[StylePlotColorLegendBg-(3)]
_ = x[StylePlotColorLegendBorder-(4)]
_ = x[StylePlotColorLegendText-(5)]
_ = x[StylePlotColorTitleText-(6)]
_ = x[StylePlotColorInlayText-(7)]
_ = x[StylePlotColorAxisText-(8)]
_ = x[StylePlotColorAxisGrid-(9)]
_ = x[StylePlotColorAxisTick-(10)]
_ = x[StylePlotColorAxisBg-(11)]
_ = x[StylePlotColorAxisBgHovered-(12)]
_ = x[StylePlotColorAxisBgActive-(13)]
_ = x[StylePlotColorSelection-(14)]
_ = x[StylePlotColorCrosshairs-(15)]
}
var _StylePlotColorIDValues = []StylePlotColorID{StylePlotColorFrameBg, StylePlotColorPlotBg, StylePlotColorPlotBorder, StylePlotColorLegendBg, StylePlotColorLegendBorder, StylePlotColorLegendText, StylePlotColorTitleText, StylePlotColorInlayText, StylePlotColorAxisText, StylePlotColorAxisGrid, StylePlotColorAxisTick, StylePlotColorAxisBg, StylePlotColorAxisBgHovered, StylePlotColorAxisBgActive, StylePlotColorSelection, StylePlotColorCrosshairs}
var _StylePlotColorIDNameToValueMap = map[string]StylePlotColorID{
_StylePlotColorIDName[0:13]: StylePlotColorFrameBg,
_StylePlotColorIDLowerName[0:13]: StylePlotColorFrameBg,
_StylePlotColorIDName[13:25]: StylePlotColorPlotBg,
_StylePlotColorIDLowerName[13:25]: StylePlotColorPlotBg,
_StylePlotColorIDName[25:41]: StylePlotColorPlotBorder,
_StylePlotColorIDLowerName[25:41]: StylePlotColorPlotBorder,
_StylePlotColorIDName[41:55]: StylePlotColorLegendBg,
_StylePlotColorIDLowerName[41:55]: StylePlotColorLegendBg,
_StylePlotColorIDName[55:73]: StylePlotColorLegendBorder,
_StylePlotColorIDLowerName[55:73]: StylePlotColorLegendBorder,
_StylePlotColorIDName[73:89]: StylePlotColorLegendText,
_StylePlotColorIDLowerName[73:89]: StylePlotColorLegendText,
_StylePlotColorIDName[89:104]: StylePlotColorTitleText,
_StylePlotColorIDLowerName[89:104]: StylePlotColorTitleText,
_StylePlotColorIDName[104:119]: StylePlotColorInlayText,
_StylePlotColorIDLowerName[104:119]: StylePlotColorInlayText,
_StylePlotColorIDName[119:133]: StylePlotColorAxisText,
_StylePlotColorIDLowerName[119:133]: StylePlotColorAxisText,
_StylePlotColorIDName[133:147]: StylePlotColorAxisGrid,
_StylePlotColorIDLowerName[133:147]: StylePlotColorAxisGrid,
_StylePlotColorIDName[147:161]: StylePlotColorAxisTick,
_StylePlotColorIDLowerName[147:161]: StylePlotColorAxisTick,
_StylePlotColorIDName[161:173]: StylePlotColorAxisBg,
_StylePlotColorIDLowerName[161:173]: StylePlotColorAxisBg,
_StylePlotColorIDName[173:193]: StylePlotColorAxisBgHovered,
_StylePlotColorIDLowerName[173:193]: StylePlotColorAxisBgHovered,
_StylePlotColorIDName[193:212]: StylePlotColorAxisBgActive,
_StylePlotColorIDLowerName[193:212]: StylePlotColorAxisBgActive,
_StylePlotColorIDName[212:226]: StylePlotColorSelection,
_StylePlotColorIDLowerName[212:226]: StylePlotColorSelection,
_StylePlotColorIDName[226:241]: StylePlotColorCrosshairs,
_StylePlotColorIDLowerName[226:241]: StylePlotColorCrosshairs,
}
var _StylePlotColorIDNames = []string{
_StylePlotColorIDName[0:13],
_StylePlotColorIDName[13:25],
_StylePlotColorIDName[25:41],
_StylePlotColorIDName[41:55],
_StylePlotColorIDName[55:73],
_StylePlotColorIDName[73:89],
_StylePlotColorIDName[89:104],
_StylePlotColorIDName[104:119],
_StylePlotColorIDName[119:133],
_StylePlotColorIDName[133:147],
_StylePlotColorIDName[147:161],
_StylePlotColorIDName[161:173],
_StylePlotColorIDName[173:193],
_StylePlotColorIDName[193:212],
_StylePlotColorIDName[212:226],
_StylePlotColorIDName[226:241],
}
// StylePlotColorIDString retrieves an enum value from the enum constants string name.
// Throws an error if the param is not part of the enum.
func StylePlotColorIDString(s string) (StylePlotColorID, error) {
if val, ok := _StylePlotColorIDNameToValueMap[s]; ok {
return val, nil
}
if val, ok := _StylePlotColorIDNameToValueMap[strings.ToLower(s)]; ok {
return val, nil
}
return 0, fmt.Errorf("%s does not belong to StylePlotColorID values", s)
}
// StylePlotColorIDValues returns all values of the enum
func StylePlotColorIDValues() []StylePlotColorID {
return _StylePlotColorIDValues
}
// StylePlotColorIDStrings returns a slice of all String values of the enum
func StylePlotColorIDStrings() []string {
strs := make([]string, len(_StylePlotColorIDNames))
copy(strs, _StylePlotColorIDNames)
return strs
}
// IsAStylePlotColorID returns "true" if the value is listed in the enum definition. "false" otherwise
func (i StylePlotColorID) IsAStylePlotColorID() bool {
for _, v := range _StylePlotColorIDValues {
if i == v {
return true
}
}
return false
}