parent
ec4fb6aecb
commit
01c8dd6cf4
10
action.go
10
action.go
|
@ -49,9 +49,6 @@ type ActionType int // Add, SetText, Click, Hide, Append, Delete, etc
|
||||||
const (
|
const (
|
||||||
Add ActionType = iota
|
Add ActionType = iota
|
||||||
Delete
|
Delete
|
||||||
Get
|
|
||||||
Set
|
|
||||||
GetText
|
|
||||||
SetText
|
SetText
|
||||||
AddText
|
AddText
|
||||||
Checked
|
Checked
|
||||||
|
@ -74,6 +71,7 @@ const (
|
||||||
ToolkitInit // initializes the toolkit
|
ToolkitInit // initializes the toolkit
|
||||||
ToolkitClose // closes the toolkit
|
ToolkitClose // closes the toolkit
|
||||||
ToolkitPanic
|
ToolkitPanic
|
||||||
|
Heartbeat
|
||||||
CloseWindow
|
CloseWindow
|
||||||
UserQuit // the user closed the GUI
|
UserQuit // the user closed the GUI
|
||||||
EnableDebug // open the debugging window
|
EnableDebug // open the debugging window
|
||||||
|
@ -85,12 +83,6 @@ func (s ActionType) String() string {
|
||||||
return "Add"
|
return "Add"
|
||||||
case Delete:
|
case Delete:
|
||||||
return "Delete"
|
return "Delete"
|
||||||
case Get:
|
|
||||||
return "Get"
|
|
||||||
case Set:
|
|
||||||
return "Set"
|
|
||||||
case GetText:
|
|
||||||
return "GetText"
|
|
||||||
case SetText:
|
case SetText:
|
||||||
return "SetText"
|
return "SetText"
|
||||||
case AddText:
|
case AddText:
|
||||||
|
|
9
state.go
9
state.go
|
@ -15,7 +15,14 @@ type State struct {
|
||||||
|
|
||||||
// most primitive widgets just store a single thing
|
// most primitive widgets just store a single thing
|
||||||
// it is the default value
|
// it is the default value
|
||||||
Value any
|
DefaultS string
|
||||||
|
CurrentS string
|
||||||
|
CurrentI int
|
||||||
|
NewString string
|
||||||
|
|
||||||
|
// most primitive widgets just store a single thing
|
||||||
|
// it is the default value
|
||||||
|
// Value any
|
||||||
|
|
||||||
// how to arrange widgets
|
// how to arrange widgets
|
||||||
Direction Orientation
|
Direction Orientation
|
||||||
|
|
Loading…
Reference in New Issue