From 522581dbafc487a8b6a049e22522233504bdf829 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 22 May 2019 18:35:00 -0700 Subject: 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 --- gui.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'gui.go') 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 } -- cgit v1.2.3