-
-
Notifications
You must be signed in to change notification settings - Fork 135
/
styleplotvarid_enumer.go
182 lines (167 loc) · 8.94 KB
/
styleplotvarid_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
// Code generated by "enumer -linecomment -type=StylePlotVarID ."; DO NOT EDIT.
package giu
import (
"fmt"
"strings"
)
const _StylePlotVarIDName = "plot-line-weightplot-markerplot-marker-sizeplot-marker-weightplot-fill-alphaplot-error-bar-sizeplot-error-bar-weightplot-digital-bit-heightplot-digital-bit-gapplot-border-sizeplot-minor-alphaplot-major-tick-lenplot-minor-tick-lenplot-major-tick-sizeplot-minor-tick-sizeplot-major-grid-sizeplot-minor-grid-sizeplot-paddingplot-label-paddingplot-legend-paddingplot-legend-inner-paddingplot-legend-spacingplot-mouse-pos-paddingplot-annotation-paddingplot-fit-paddingplot-default-sizeplot-min-sizeStylePlotVarCOUNT"
var _StylePlotVarIDIndex = [...]uint16{0, 16, 27, 43, 61, 76, 95, 116, 139, 159, 175, 191, 210, 229, 249, 269, 289, 309, 321, 339, 358, 383, 402, 424, 447, 463, 480, 493, 510}
const _StylePlotVarIDLowerName = "plot-line-weightplot-markerplot-marker-sizeplot-marker-weightplot-fill-alphaplot-error-bar-sizeplot-error-bar-weightplot-digital-bit-heightplot-digital-bit-gapplot-border-sizeplot-minor-alphaplot-major-tick-lenplot-minor-tick-lenplot-major-tick-sizeplot-minor-tick-sizeplot-major-grid-sizeplot-minor-grid-sizeplot-paddingplot-label-paddingplot-legend-paddingplot-legend-inner-paddingplot-legend-spacingplot-mouse-pos-paddingplot-annotation-paddingplot-fit-paddingplot-default-sizeplot-min-sizestyleplotvarcount"
func (i StylePlotVarID) String() string {
if i < 0 || i >= StylePlotVarID(len(_StylePlotVarIDIndex)-1) {
return fmt.Sprintf("StylePlotVarID(%d)", i)
}
return _StylePlotVarIDName[_StylePlotVarIDIndex[i]:_StylePlotVarIDIndex[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 _StylePlotVarIDNoOp() {
var x [1]struct{}
_ = x[StylePlotVarLineWeight-(0)]
_ = x[StylePlotVarMarker-(1)]
_ = x[StylePlotVarMarkerSize-(2)]
_ = x[StylePlotVarMarkerWeight-(3)]
_ = x[StylePlotVarFillAlpha-(4)]
_ = x[StylePlotVarErrorBarSize-(5)]
_ = x[StylePlotVarErrorBarWeight-(6)]
_ = x[StylePlotVarDigitalBitHeight-(7)]
_ = x[StylePlotVarDigitalBitGap-(8)]
_ = x[StylePlotVarPlotBorderSize-(9)]
_ = x[StylePlotVarMinorAlpha-(10)]
_ = x[StylePlotVarMajorTickLen-(11)]
_ = x[StylePlotVarMinorTickLen-(12)]
_ = x[StylePlotVarMajorTickSize-(13)]
_ = x[StylePlotVarMinorTickSize-(14)]
_ = x[StylePlotVarMajorGridSize-(15)]
_ = x[StylePlotVarMinorGridSize-(16)]
_ = x[StylePlotVarPlotPadding-(17)]
_ = x[StylePlotVarLabelPadding-(18)]
_ = x[StylePlotVarLegendPadding-(19)]
_ = x[StylePlotVarLegendInnerPadding-(20)]
_ = x[StylePlotVarLegendSpacing-(21)]
_ = x[StylePlotVarMousePosPadding-(22)]
_ = x[StylePlotVarAnnotationPadding-(23)]
_ = x[StylePlotVarFitPadding-(24)]
_ = x[StylePlotVarPlotDefaultSize-(25)]
_ = x[StylePlotVarPlotMinSize-(26)]
_ = x[StylePlotVarCOUNT-(27)]
}
var _StylePlotVarIDValues = []StylePlotVarID{StylePlotVarLineWeight, StylePlotVarMarker, StylePlotVarMarkerSize, StylePlotVarMarkerWeight, StylePlotVarFillAlpha, StylePlotVarErrorBarSize, StylePlotVarErrorBarWeight, StylePlotVarDigitalBitHeight, StylePlotVarDigitalBitGap, StylePlotVarPlotBorderSize, StylePlotVarMinorAlpha, StylePlotVarMajorTickLen, StylePlotVarMinorTickLen, StylePlotVarMajorTickSize, StylePlotVarMinorTickSize, StylePlotVarMajorGridSize, StylePlotVarMinorGridSize, StylePlotVarPlotPadding, StylePlotVarLabelPadding, StylePlotVarLegendPadding, StylePlotVarLegendInnerPadding, StylePlotVarLegendSpacing, StylePlotVarMousePosPadding, StylePlotVarAnnotationPadding, StylePlotVarFitPadding, StylePlotVarPlotDefaultSize, StylePlotVarPlotMinSize, StylePlotVarCOUNT}
var _StylePlotVarIDNameToValueMap = map[string]StylePlotVarID{
_StylePlotVarIDName[0:16]: StylePlotVarLineWeight,
_StylePlotVarIDLowerName[0:16]: StylePlotVarLineWeight,
_StylePlotVarIDName[16:27]: StylePlotVarMarker,
_StylePlotVarIDLowerName[16:27]: StylePlotVarMarker,
_StylePlotVarIDName[27:43]: StylePlotVarMarkerSize,
_StylePlotVarIDLowerName[27:43]: StylePlotVarMarkerSize,
_StylePlotVarIDName[43:61]: StylePlotVarMarkerWeight,
_StylePlotVarIDLowerName[43:61]: StylePlotVarMarkerWeight,
_StylePlotVarIDName[61:76]: StylePlotVarFillAlpha,
_StylePlotVarIDLowerName[61:76]: StylePlotVarFillAlpha,
_StylePlotVarIDName[76:95]: StylePlotVarErrorBarSize,
_StylePlotVarIDLowerName[76:95]: StylePlotVarErrorBarSize,
_StylePlotVarIDName[95:116]: StylePlotVarErrorBarWeight,
_StylePlotVarIDLowerName[95:116]: StylePlotVarErrorBarWeight,
_StylePlotVarIDName[116:139]: StylePlotVarDigitalBitHeight,
_StylePlotVarIDLowerName[116:139]: StylePlotVarDigitalBitHeight,
_StylePlotVarIDName[139:159]: StylePlotVarDigitalBitGap,
_StylePlotVarIDLowerName[139:159]: StylePlotVarDigitalBitGap,
_StylePlotVarIDName[159:175]: StylePlotVarPlotBorderSize,
_StylePlotVarIDLowerName[159:175]: StylePlotVarPlotBorderSize,
_StylePlotVarIDName[175:191]: StylePlotVarMinorAlpha,
_StylePlotVarIDLowerName[175:191]: StylePlotVarMinorAlpha,
_StylePlotVarIDName[191:210]: StylePlotVarMajorTickLen,
_StylePlotVarIDLowerName[191:210]: StylePlotVarMajorTickLen,
_StylePlotVarIDName[210:229]: StylePlotVarMinorTickLen,
_StylePlotVarIDLowerName[210:229]: StylePlotVarMinorTickLen,
_StylePlotVarIDName[229:249]: StylePlotVarMajorTickSize,
_StylePlotVarIDLowerName[229:249]: StylePlotVarMajorTickSize,
_StylePlotVarIDName[249:269]: StylePlotVarMinorTickSize,
_StylePlotVarIDLowerName[249:269]: StylePlotVarMinorTickSize,
_StylePlotVarIDName[269:289]: StylePlotVarMajorGridSize,
_StylePlotVarIDLowerName[269:289]: StylePlotVarMajorGridSize,
_StylePlotVarIDName[289:309]: StylePlotVarMinorGridSize,
_StylePlotVarIDLowerName[289:309]: StylePlotVarMinorGridSize,
_StylePlotVarIDName[309:321]: StylePlotVarPlotPadding,
_StylePlotVarIDLowerName[309:321]: StylePlotVarPlotPadding,
_StylePlotVarIDName[321:339]: StylePlotVarLabelPadding,
_StylePlotVarIDLowerName[321:339]: StylePlotVarLabelPadding,
_StylePlotVarIDName[339:358]: StylePlotVarLegendPadding,
_StylePlotVarIDLowerName[339:358]: StylePlotVarLegendPadding,
_StylePlotVarIDName[358:383]: StylePlotVarLegendInnerPadding,
_StylePlotVarIDLowerName[358:383]: StylePlotVarLegendInnerPadding,
_StylePlotVarIDName[383:402]: StylePlotVarLegendSpacing,
_StylePlotVarIDLowerName[383:402]: StylePlotVarLegendSpacing,
_StylePlotVarIDName[402:424]: StylePlotVarMousePosPadding,
_StylePlotVarIDLowerName[402:424]: StylePlotVarMousePosPadding,
_StylePlotVarIDName[424:447]: StylePlotVarAnnotationPadding,
_StylePlotVarIDLowerName[424:447]: StylePlotVarAnnotationPadding,
_StylePlotVarIDName[447:463]: StylePlotVarFitPadding,
_StylePlotVarIDLowerName[447:463]: StylePlotVarFitPadding,
_StylePlotVarIDName[463:480]: StylePlotVarPlotDefaultSize,
_StylePlotVarIDLowerName[463:480]: StylePlotVarPlotDefaultSize,
_StylePlotVarIDName[480:493]: StylePlotVarPlotMinSize,
_StylePlotVarIDLowerName[480:493]: StylePlotVarPlotMinSize,
_StylePlotVarIDName[493:510]: StylePlotVarCOUNT,
_StylePlotVarIDLowerName[493:510]: StylePlotVarCOUNT,
}
var _StylePlotVarIDNames = []string{
_StylePlotVarIDName[0:16],
_StylePlotVarIDName[16:27],
_StylePlotVarIDName[27:43],
_StylePlotVarIDName[43:61],
_StylePlotVarIDName[61:76],
_StylePlotVarIDName[76:95],
_StylePlotVarIDName[95:116],
_StylePlotVarIDName[116:139],
_StylePlotVarIDName[139:159],
_StylePlotVarIDName[159:175],
_StylePlotVarIDName[175:191],
_StylePlotVarIDName[191:210],
_StylePlotVarIDName[210:229],
_StylePlotVarIDName[229:249],
_StylePlotVarIDName[249:269],
_StylePlotVarIDName[269:289],
_StylePlotVarIDName[289:309],
_StylePlotVarIDName[309:321],
_StylePlotVarIDName[321:339],
_StylePlotVarIDName[339:358],
_StylePlotVarIDName[358:383],
_StylePlotVarIDName[383:402],
_StylePlotVarIDName[402:424],
_StylePlotVarIDName[424:447],
_StylePlotVarIDName[447:463],
_StylePlotVarIDName[463:480],
_StylePlotVarIDName[480:493],
_StylePlotVarIDName[493:510],
}
// StylePlotVarIDString retrieves an enum value from the enum constants string name.
// Throws an error if the param is not part of the enum.
func StylePlotVarIDString(s string) (StylePlotVarID, error) {
if val, ok := _StylePlotVarIDNameToValueMap[s]; ok {
return val, nil
}
if val, ok := _StylePlotVarIDNameToValueMap[strings.ToLower(s)]; ok {
return val, nil
}
return 0, fmt.Errorf("%s does not belong to StylePlotVarID values", s)
}
// StylePlotVarIDValues returns all values of the enum
func StylePlotVarIDValues() []StylePlotVarID {
return _StylePlotVarIDValues
}
// StylePlotVarIDStrings returns a slice of all String values of the enum
func StylePlotVarIDStrings() []string {
strs := make([]string, len(_StylePlotVarIDNames))
copy(strs, _StylePlotVarIDNames)
return strs
}
// IsAStylePlotVarID returns "true" if the value is listed in the enum definition. "false" otherwise
func (i StylePlotVarID) IsAStylePlotVarID() bool {
for _, v := range _StylePlotVarIDValues {
if i == v {
return true
}
}
return false
}