diff options
| author | Jeff Carr <[email protected]> | 2019-05-31 09:01:46 -0700 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2019-05-31 09:01:46 -0700 |
| commit | f31e3850604b0150eac93862448ba520cd61b616 (patch) | |
| tree | f8d1674f9f001fa7009eceb43357bd431ef68491 /structs.go | |
| parent | 64401667b62a7621c2e71bc0f47c9f0d47c4106f (diff) | |
more cleanups
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'structs.go')
| -rw-r--r-- | structs.go | 40 |
1 files changed, 28 insertions, 12 deletions
@@ -55,6 +55,34 @@ type GuiData struct { EntryPass *ui.Entry } +// stores information on 'the' window + +// More than one Window is not supported in a cross platform +// sense & may never be. On Windows and MacOS, you have to have +// 'tabs'. Even under Linux, more than one Window is currently +// unstable +// +// This code will keep track of if the windows is 'tabbed' or +// not. You can draw one thing in the window, then destroy +// that, then redraw the window with something else +// +// This struct keeps track of what is in the window so you +// can destroy and replace it with something else +// +type GuiWindow struct { + Action string + Area *GuiArea // should be moved to GuiBox + + C *pb.Config + + W *ui.Window + T *ui.Tab // if this != nil, the window is 'tabbed' + BoxMap map[string]*GuiBox + Box1 *ui.Box + Box2 *ui.Box +} + + // Note: every mouse click is handled // as a 'Button' regardless of where // the user clicks it. You could probably @@ -103,18 +131,6 @@ type GuiEntry struct { } -type GuiWindow struct { - Action string - Area *GuiArea // should be moved to GuiBox - - C *pb.Config - - W *ui.Window - T *ui.Tab - Box1 *ui.Box - Box2 *ui.Box -} - // // AREA STRUCTURES START // AREA STRUCTURES START |
