summaryrefslogtreecommitdiff
path: root/state.go
diff options
context:
space:
mode:
Diffstat (limited to 'state.go')
-rw-r--r--state.go28
1 files changed, 15 insertions, 13 deletions
diff --git a/state.go b/state.go
index 7b7c7d8..c81ccf4 100644
--- a/state.go
+++ b/state.go
@@ -1,5 +1,7 @@
package widget
+// TODO: redo this with protocol buffers
+
// This is the state of the widget
// The whole state of the widget is sent
@@ -11,14 +13,14 @@ package widget
// just makes things more complicated for no good reason
type State struct {
// This is a unmodifiable string that is displayed to the user.
- Label string
+ Label string
// most primitive widgets just store a single thing
// it is the default value
- DefaultS string
- CurrentS string
- CurrentI int
- NewString string
+ DefaultS string
+ CurrentS string
+ CurrentI int
+ NewString string
// most primitive widgets just store a single thing
// it is the default value
@@ -64,19 +66,19 @@ type State struct {
Strings []string
// for widgets that use a range
- Range RangeType
+ Range RangeType
- Geom Geom
- Size Size
+ Geom Geom
+ Size Size
- GridSize GridSize
+ GridSize GridSize
GridOffset GridOffset
// This is for the grid size & widget position
- W int
- H int
- AtW int
- AtH int
+ W int
+ H int
+ AtW int
+ AtH int
// a name useful for programming and the debugger.
// It is not intended to be displayed to the user