-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathenums.go
More file actions
285 lines (234 loc) · 5.03 KB
/
enums.go
File metadata and controls
285 lines (234 loc) · 5.03 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
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
package flex
// port of YGEnums.h
// Align describes align flex attribute
type Align int
const (
// AlignAuto is "auto"
AlignAuto Align = iota
// AlignFlexStart is "flex-start"
AlignFlexStart
// AlignCenter if "center"
AlignCenter
// AlignFlexEnd is "flex-end"
AlignFlexEnd
// AlignStretch is "strech"
AlignStretch
// AlignBaseline is "baseline"
AlignBaseline
// AlignSpaceBetween is "space-between"
AlignSpaceBetween
// AlignSpaceAround is "space-around"
AlignSpaceAround
)
// Dimension represents dimention
type Dimension int
const (
// DimensionWidth is width
DimensionWidth Dimension = iota
// DimensionHeight is height
DimensionHeight
)
// Direction represents right-to-left or left-to-right direction
type Direction int
const (
// DirectionInherit is "inherit"
DirectionInherit Direction = iota
// DirectionLTR is "ltr"
DirectionLTR
// DirectionRTL is "rtl"
DirectionRTL
)
// Display is "display" property
type Display int
const (
// DisplayFlex is "flex"
DisplayFlex Display = iota
// DisplayNone is "none"
DisplayNone
)
// Edge represents an edge
type Edge int
const (
// EdgeLeft is left edge
EdgeLeft Edge = iota
// EdgeTop is top edge
EdgeTop
// EdgeRight is right edge
EdgeRight
// EdgeBottom is bottom edge
EdgeBottom
// EdgeStart is start edge
EdgeStart
// EdgeEnd is end edge
EdgeEnd
// EdgeHorizontal is horizontal edge
EdgeHorizontal
// EdgeVertical is vertical edge
EdgeVertical
// EdgeAll is all edge
EdgeAll
)
const (
// EdgeCount is count of edges
EdgeCount = 9
)
// ExperimentalFeature defines experimental features
type ExperimentalFeature int
const (
// ExperimentalFeatureWebFlexBasis is web flex basis
ExperimentalFeatureWebFlexBasis ExperimentalFeature = iota
)
const (
experimentalFeatureCount = 1
)
// FlexDirection describes "flex-direction" property
type FlexDirection int
const (
// FlexDirectionColumn is "column"
FlexDirectionColumn FlexDirection = iota
// FlexDirectionColumnReverse is "column-reverse"
FlexDirectionColumnReverse
// FlexDirectionRow is "row"
FlexDirectionRow
// FlexDirectionRowReverse is "row-reverse"
FlexDirectionRowReverse
)
// Justify is "justify" property
type Justify int
const (
// JustifyFlexStart is "flex-start"
JustifyFlexStart Justify = iota
// JustifyCenter is "center"
JustifyCenter
// JustifyFlexEnd is "flex-end"
JustifyFlexEnd
// JustifySpaceBetween is "space-between"
JustifySpaceBetween
// JustifySpaceAround is "space-around"
JustifySpaceAround
)
// LogLevel represents log level
type LogLevel int
const (
LogLevelError LogLevel = iota
LogLevelWarn
LogLevelInfo
LogLevelDebug
LogLevelVerbose
LogLevelFatal
)
// MeasureMode defines measurement mode
type MeasureMode int
const (
// MeasureModeUndefined is undefined
MeasureModeUndefined MeasureMode = iota
// MeasureModeExactly is exactly
MeasureModeExactly
// MeasureModeAtMost is at-most
MeasureModeAtMost
)
const (
measureModeCount = 3
)
// NodeType defines node type
type NodeType int
const (
// NodeTypeDefault is default node
NodeTypeDefault NodeType = iota
// NodeTypeText is text node
NodeTypeText
)
// Overflow describes "overflow" property
type Overflow int
const (
// OverflowVisible is "visible"
OverflowVisible Overflow = iota
// OverflowHidden is "hidden"
OverflowHidden
// OverflowScroll is "scroll"
OverflowScroll
)
// PositionType is "position" property
type PositionType int
const (
// PositionTypeRelative is "relative"
PositionTypeRelative PositionType = iota
// PositionTypeAbsolute is "absolute"
PositionTypeAbsolute
)
type PrintOptions int
const (
PrintOptionsLayout PrintOptions = 1 << iota
PrintOptionsStyle
PrintOptionsChildren
)
// Unit is "unit" property
type Unit int
const (
// UnitUndefined is "undefined"
UnitUndefined Unit = iota
// UnitPoint is "point"
UnitPoint
// UnitPercent is "percent"
UnitPercent
// UnitAuto is "auto"
UnitAuto
)
// Wrap is "wrap" property
type Wrap int
const (
// WrapNoWrap is "no-wrap"
WrapNoWrap Wrap = iota
// WrapWrap is "wrap"
WrapWrap
// WrapWrapReverse is "reverse"
WrapWrapReverse
)
func YGWrapToString(value Wrap) string {
return ""
}
func YGAlignToString(value Align) string {
return ""
}
func YGDimensionToString(value Dimension) string {
return ""
}
func YGDirectionToString(value Direction) string {
return ""
}
func YGDisplayToString(value Display) string {
return ""
}
func YGEdgeToString(value Edge) string {
return ""
}
func YGExperimentalFeatureToString(value ExperimentalFeature) string {
return ""
}
func YGFlexDirectionToString(value FlexDirection) string {
return ""
}
func YGJustifyToString(value Justify) string {
return ""
}
func YGLogLevelToString(value LogLevel) string {
return ""
}
func YGMeasureModeToString(value MeasureMode) string {
return ""
}
func YGNodeTypeToString(value NodeType) string {
return ""
}
func YGOverflowToString(value Overflow) string {
return ""
}
func YGPositionTypeToString(value PositionType) string {
return ""
}
func YGPrintOptionsToString(value PrintOptions) string {
return ""
}
func YGUnitToString(value Unit) string {
return ""
}