/
enumgen.go
50 lines (34 loc) · 2.39 KB
/
enumgen.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
// Code generated by "core generate"; DO NOT EDIT.
package xyzview
import (
"cogentcore.org/core/enums"
)
var _SelectionModesValues = []SelectionModes{0, 1, 2, 3}
// SelectionModesN is the highest valid value for type SelectionModes, plus one.
const SelectionModesN SelectionModes = 4
var _SelectionModesValueMap = map[string]SelectionModes{`NotSelectable`: 0, `Selectable`: 1, `SelectionBox`: 2, `Manipulable`: 3}
var _SelectionModesDescMap = map[SelectionModes]string{0: `NotSelectable means that selection events are ignored entirely`, 1: `Selectable means that nodes can be selected but no visible consequence occurs`, 2: `SelectionBox means that a selection bounding box is drawn around selected nodes`, 3: `Manipulable means that a manipulation box will be created for selected nodes, which can update the Pose parameters dynamically.`}
var _SelectionModesMap = map[SelectionModes]string{0: `NotSelectable`, 1: `Selectable`, 2: `SelectionBox`, 3: `Manipulable`}
// String returns the string representation of this SelectionModes value.
func (i SelectionModes) String() string { return enums.String(i, _SelectionModesMap) }
// SetString sets the SelectionModes value from its string representation,
// and returns an error if the string is invalid.
func (i *SelectionModes) SetString(s string) error {
return enums.SetString(i, s, _SelectionModesValueMap, "SelectionModes")
}
// Int64 returns the SelectionModes value as an int64.
func (i SelectionModes) Int64() int64 { return int64(i) }
// SetInt64 sets the SelectionModes value from an int64.
func (i *SelectionModes) SetInt64(in int64) { *i = SelectionModes(in) }
// Desc returns the description of the SelectionModes value.
func (i SelectionModes) Desc() string { return enums.Desc(i, _SelectionModesDescMap) }
// SelectionModesValues returns all possible values for the type SelectionModes.
func SelectionModesValues() []SelectionModes { return _SelectionModesValues }
// Values returns all possible values for the type SelectionModes.
func (i SelectionModes) Values() []enums.Enum { return enums.Values(_SelectionModesValues) }
// MarshalText implements the [encoding.TextMarshaler] interface.
func (i SelectionModes) MarshalText() ([]byte, error) { return []byte(i.String()), nil }
// UnmarshalText implements the [encoding.TextUnmarshaler] interface.
func (i *SelectionModes) UnmarshalText(text []byte) error {
return enums.UnmarshalText(i, text, "SelectionModes")
}