diff options
| author | Jeff Carr <[email protected]> | 2019-05-22 19:05:25 -0700 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2019-05-22 19:05:25 -0700 |
| commit | 9189fcde04e6051910e92d93bde0cde9172b851d (patch) | |
| tree | 342a3a08b609a56fdd48b672f087e7a635214340 /gui.go | |
| parent | 522581dbafc487a8b6a049e22522233504bdf829 (diff) | |
start moving everything into a common structure (gui.Data)
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'gui.go')
| -rw-r--r-- | gui.go | 21 |
1 files changed, 10 insertions, 11 deletions
@@ -12,22 +12,24 @@ var mainwin *ui.Window var maintab *ui.Tab var tabcount int -var Width int var Height int var allButtons []ButtonMap -var internalDS GuiDS -func GetDataStructures() *GuiDS { - return &internalDS -} +// +// All GUI Data Structures and functions that are external +// If you need cross platform support, these might only +// be the safe way to interact with the GUI +// +var Data GuiDataStructure -// All GUI Data Structures that are external -type GuiDS struct { +type GuiDataStructure struct { State string MainWindow *ui.Window + Width int ButtonClick func(int, string) + cloudWindow *ui.Window } type TableColumnData struct { @@ -48,7 +50,7 @@ type ButtonMap struct { } func setupUI() { - mainwin = ui.NewWindow("Cloud Control Panel", Width, Height, false) + mainwin = ui.NewWindow("Cloud Control Panel", Data.Width, Height, false) mainwin.OnClosing(func(*ui.Window) bool { ui.Quit() return true @@ -172,9 +174,6 @@ func DoGUI() { } } -func defaultMouseEvent() { -} - func defaultButtonClick(button *ui.Button) { log.Println("defaultButtonClick() button =", button) for key, foo := range allButtons { |
