summaryrefslogtreecommitdiff
path: root/gui.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2019-05-22 18:35:00 -0700
committerJeff Carr <[email protected]>2019-05-22 18:35:00 -0700
commit522581dbafc487a8b6a049e22522233504bdf829 (patch)
tree233548feacd4562dd7014e9f1307943d880f3434 /gui.go
parent5c07e5f605cb74ed0a1504e2386ba565f37b49f4 (diff)
I guess all GUI stuff must go in here. No other goroutine can ever
interact with the GUI or Windows cross platform support breaks. Lame Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'gui.go')
-rw-r--r--gui.go15
1 files changed, 14 insertions, 1 deletions
diff --git a/gui.go b/gui.go
index 3218667..245749a 100644
--- a/gui.go
+++ b/gui.go
@@ -17,6 +17,19 @@ var Height int
var allButtons []ButtonMap
+var internalDS GuiDS
+
+func GetDataStructures() *GuiDS {
+ return &internalDS
+}
+
+// All GUI Data Structures that are external
+type GuiDS struct {
+ State string
+ MainWindow *ui.Window
+ ButtonClick func(int, string)
+}
+
type TableColumnData struct {
Index int
CellType string
@@ -219,7 +232,7 @@ func closeButtonClick(button *ui.Button) {
func closeButton(name string, mytab *ui.Tab) ui.Control {
tmpButton := ui.NewButton(name)
- tmpButton.OnClicked(buttonClick)
+ tmpButton.OnClicked(defaultButtonClick)
return tmpButton
}