summaryrefslogtreecommitdiff
path: root/gui.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2019-05-24 11:32:47 -0700
committerJeff Carr <[email protected]>2019-05-24 11:32:47 -0700
commit8730dbc4dd5e36d5fbbc8ce784e1ad70242cbb69 (patch)
tree113f20223fdf1c24c0ff2fc434cdb2c2939d0427 /gui.go
parent171390c10095dd855cddcfbec82527c83ffedfe8 (diff)
move all structs into a common file
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'gui.go')
-rw-r--r--gui.go106
1 files changed, 0 insertions, 106 deletions
diff --git a/gui.go b/gui.go
index 9575c43..254458c 100644
--- a/gui.go
+++ b/gui.go
@@ -8,112 +8,6 @@ import _ "github.com/andlabs/ui/winmanifest"
import "github.com/gookit/config"
import "github.com/davecgh/go-spew/spew"
-//
-// 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
-
-type GuiTabStructure struct {
- me *ui.Tab
- parentWindow *ui.Window
- firstBox *ui.Box
- tabOffset int
-
- // this means only one table per tab
- mh *TableData
-
- // stuff for the 'area'
- // this means only one area per tab
- fontButton *ui.FontButton
- attrstr *ui.AttributedString
- splashArea *ui.Area
-}
-
-type GuiDataStructure struct {
- State string
- Width int
- Height int
-
- // a fallback default function to handle mouse events
- // if nothing else is defined to handle them
- MouseClick func(*ButtonMap)
-
- // general information
- Version string
- GitCommit string
- GoVersion string
- Buildtime string
- HomeDir string
- Debug bool
- DebugTable bool
-
- // official hostname and IPv6 address for this box
- Hostname string
- IPv6 string
-
- // account entry textboxes
- AccNick string
- AccUser string
- AccPass string
-
- // A map of all buttons everywhere on all
- // windows, all tabs, across all goroutines
- // This is "GLOBAL"
- AllButtons []ButtonMap
-
- // a tab (maybe the one the user is playing with?)
- CurrentTab *GuiTabStructure
- // a VM (maybe the one the user is playing with?)
- CurrentVM string
-
- // All the tabs
- Tabs []GuiTabStructure
-
- // stuff for the splash screen / setup tabs
- // MainWindow *ui.Window
- cloudWindow *ui.Window
- cloudTab *ui.Tab
- cloudBox *ui.Box
- smallBox *ui.Box
-
- mainwin *ui.Window
- maintab *ui.Tab
- tabcount int
-
- // stuff for the 'area'
- MyArea *ui.Area
- fontButton *ui.FontButton
- attrstr *ui.AttributedString
- splashArea *ui.Area
-}
-
-type TableColumnData struct {
- Index int
- CellType string
- Heading string
- Color string
-}
-
-type ButtonMap struct {
- B *ui.Button
- FB *ui.FontButton
- onClick func (int, string)
- onChanged func (int, string)
- custom func (*ButtonMap, string)
- Name string // the text on the button
- Note string // what type of button
- AccNick string // what account this button is for
-}
-
-/*
-func AddNewTab(mytab *ui.Tab, newbox ui.Control, tabOffset int) {
- mytab.Append("Cloud Info", newbox)
- mytab.SetMargined(tabOffset, true)
-}
-*/
-
func InitColumns(mh *TableData, parts []TableColumnData) {
tmpBTindex := 0
humanID := 0