-
-
Notifications
You must be signed in to change notification settings - Fork 135
/
styleplotcolorid_enumer.go
154 lines (139 loc) · 7.07 KB
/
styleplotcolorid_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
// Code generated by "enumer -linecomment -type=StylePlotColorID ."; DO NOT EDIT.
package giu
import (
"fmt"
"strings"
)
const _StylePlotColorIDName = "plot-lineplot-fillplot-marker-outlineplot-Marker-Fillplot-error-barplot-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 = [...]uint16{0, 9, 18, 37, 53, 67, 80, 92, 108, 122, 140, 156, 171, 186, 200, 214, 228, 240, 260, 279, 293, 308}
const _StylePlotColorIDLowerName = "plot-lineplot-fillplot-marker-outlineplot-marker-fillplot-error-barplot-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[StylePlotColorLine-(0)]
_ = x[StylePlotColorFill-(1)]
_ = x[StylePlotColorMarkerOutline-(2)]
_ = x[StylePlotColorMarkerFill-(3)]
_ = x[StylePlotColorErrorBar-(4)]
_ = x[StylePlotColorFrameBg-(5)]
_ = x[StylePlotColorPlotBg-(6)]
_ = x[StylePlotColorPlotBorder-(7)]
_ = x[StylePlotColorLegendBg-(8)]
_ = x[StylePlotColorLegendBorder-(9)]
_ = x[StylePlotColorLegendText-(10)]
_ = x[StylePlotColorTitleText-(11)]
_ = x[StylePlotColorInlayText-(12)]
_ = x[StylePlotColorAxisText-(13)]
_ = x[StylePlotColorAxisGrid-(14)]
_ = x[StylePlotColorAxisTick-(15)]
_ = x[StylePlotColorAxisBg-(16)]
_ = x[StylePlotColorAxisBgHovered-(17)]
_ = x[StylePlotColorAxisBgActive-(18)]
_ = x[StylePlotColorSelection-(19)]
_ = x[StylePlotColorCrosshairs-(20)]
}
var _StylePlotColorIDValues = []StylePlotColorID{StylePlotColorLine, StylePlotColorFill, StylePlotColorMarkerOutline, StylePlotColorMarkerFill, StylePlotColorErrorBar, StylePlotColorFrameBg, StylePlotColorPlotBg, StylePlotColorPlotBorder, StylePlotColorLegendBg, StylePlotColorLegendBorder, StylePlotColorLegendText, StylePlotColorTitleText, StylePlotColorInlayText, StylePlotColorAxisText, StylePlotColorAxisGrid, StylePlotColorAxisTick, StylePlotColorAxisBg, StylePlotColorAxisBgHovered, StylePlotColorAxisBgActive, StylePlotColorSelection, StylePlotColorCrosshairs}
var _StylePlotColorIDNameToValueMap = map[string]StylePlotColorID{
_StylePlotColorIDName[0:9]: StylePlotColorLine,
_StylePlotColorIDLowerName[0:9]: StylePlotColorLine,
_StylePlotColorIDName[9:18]: StylePlotColorFill,
_StylePlotColorIDLowerName[9:18]: StylePlotColorFill,
_StylePlotColorIDName[18:37]: StylePlotColorMarkerOutline,
_StylePlotColorIDLowerName[18:37]: StylePlotColorMarkerOutline,
_StylePlotColorIDName[37:53]: StylePlotColorMarkerFill,
_StylePlotColorIDLowerName[37:53]: StylePlotColorMarkerFill,
_StylePlotColorIDName[53:67]: StylePlotColorErrorBar,
_StylePlotColorIDLowerName[53:67]: StylePlotColorErrorBar,
_StylePlotColorIDName[67:80]: StylePlotColorFrameBg,
_StylePlotColorIDLowerName[67:80]: StylePlotColorFrameBg,
_StylePlotColorIDName[80:92]: StylePlotColorPlotBg,
_StylePlotColorIDLowerName[80:92]: StylePlotColorPlotBg,
_StylePlotColorIDName[92:108]: StylePlotColorPlotBorder,
_StylePlotColorIDLowerName[92:108]: StylePlotColorPlotBorder,
_StylePlotColorIDName[108:122]: StylePlotColorLegendBg,
_StylePlotColorIDLowerName[108:122]: StylePlotColorLegendBg,
_StylePlotColorIDName[122:140]: StylePlotColorLegendBorder,
_StylePlotColorIDLowerName[122:140]: StylePlotColorLegendBorder,
_StylePlotColorIDName[140:156]: StylePlotColorLegendText,
_StylePlotColorIDLowerName[140:156]: StylePlotColorLegendText,
_StylePlotColorIDName[156:171]: StylePlotColorTitleText,
_StylePlotColorIDLowerName[156:171]: StylePlotColorTitleText,
_StylePlotColorIDName[171:186]: StylePlotColorInlayText,
_StylePlotColorIDLowerName[171:186]: StylePlotColorInlayText,
_StylePlotColorIDName[186:200]: StylePlotColorAxisText,
_StylePlotColorIDLowerName[186:200]: StylePlotColorAxisText,
_StylePlotColorIDName[200:214]: StylePlotColorAxisGrid,
_StylePlotColorIDLowerName[200:214]: StylePlotColorAxisGrid,
_StylePlotColorIDName[214:228]: StylePlotColorAxisTick,
_StylePlotColorIDLowerName[214:228]: StylePlotColorAxisTick,
_StylePlotColorIDName[228:240]: StylePlotColorAxisBg,
_StylePlotColorIDLowerName[228:240]: StylePlotColorAxisBg,
_StylePlotColorIDName[240:260]: StylePlotColorAxisBgHovered,
_StylePlotColorIDLowerName[240:260]: StylePlotColorAxisBgHovered,
_StylePlotColorIDName[260:279]: StylePlotColorAxisBgActive,
_StylePlotColorIDLowerName[260:279]: StylePlotColorAxisBgActive,
_StylePlotColorIDName[279:293]: StylePlotColorSelection,
_StylePlotColorIDLowerName[279:293]: StylePlotColorSelection,
_StylePlotColorIDName[293:308]: StylePlotColorCrosshairs,
_StylePlotColorIDLowerName[293:308]: StylePlotColorCrosshairs,
}
var _StylePlotColorIDNames = []string{
_StylePlotColorIDName[0:9],
_StylePlotColorIDName[9:18],
_StylePlotColorIDName[18:37],
_StylePlotColorIDName[37:53],
_StylePlotColorIDName[53:67],
_StylePlotColorIDName[67:80],
_StylePlotColorIDName[80:92],
_StylePlotColorIDName[92:108],
_StylePlotColorIDName[108:122],
_StylePlotColorIDName[122:140],
_StylePlotColorIDName[140:156],
_StylePlotColorIDName[156:171],
_StylePlotColorIDName[171:186],
_StylePlotColorIDName[186:200],
_StylePlotColorIDName[200:214],
_StylePlotColorIDName[214:228],
_StylePlotColorIDName[228:240],
_StylePlotColorIDName[240:260],
_StylePlotColorIDName[260:279],
_StylePlotColorIDName[279:293],
_StylePlotColorIDName[293:308],
}
// 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
}