summaryrefslogtreecommitdiff
path: root/toolkit/gocui/structs.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-12-14 10:36:56 -0600
committerJeff Carr <[email protected]>2023-12-14 10:36:56 -0600
commit282119d970faed3f8a60d5105a2f26ee14681ff4 (patch)
tree1680731c899f0e147487b9ba4d50ace2f3e96eb1 /toolkit/gocui/structs.go
parent9d075afb1df62276dea06be4a188eaee8fc69420 (diff)
tabs, windows + gocui dropdown menu (almost)
dropdown menu figures out what text was clicked dropdown menu movement changes line colors dropdown menus force user to select a response accidentally committed a binary tab selection works tab and window views almost working tabs and windows almost working window widgets selection works better color handling using gocui view.Visable flag removal of old color setting code still need an artificial delay for andlabs SetText() catching more 'nil' errors fixed the stupid duplicate tab problem in andlabs figured out how andlabs had a tab/box mess works on more than one domain builds and runs again debugging double tabs in andlabs gui GO111MODULE compile notes code reorg further improvements example cloudflare app does first successful dns update add NewEntryLine() for single line entry boxes Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/gocui/structs.go')
-rw-r--r--toolkit/gocui/structs.go21
1 files changed, 19 insertions, 2 deletions
diff --git a/toolkit/gocui/structs.go b/toolkit/gocui/structs.go
index 06a2266..05df963 100644
--- a/toolkit/gocui/structs.go
+++ b/toolkit/gocui/structs.go
@@ -21,14 +21,24 @@ import (
// It's probably a terrible idea to call this 'me'
var me config
+var showDebug bool = true
+var showHelp bool = true
+var redoWidgets bool = true
+
+// This is the window that is currently active
+var currentWindow *node
+
type config struct {
baseGui *gocui.Gui // the main gocui handle
rootNode *node // the base of the binary tree. it should have id == 0
ctrlDown *node // shown if you click the mouse when the ctrl key is pressed
-// current *cuiWidget // this is the current tab or window to show
+ currentWindow *node // this is the current tab or window to show
logStdout *node // where to show STDOUT
helpLabel *gocui.View
+ ddview *node // the gocui view to select dropdrown lists
+ ddClicked bool // the dropdown menu view was clicked
+ ddNode *node // the dropdown menu is for this widget
// this is the channel we send user events like
// mouse clicks or keyboard events back to the program
@@ -123,6 +133,7 @@ type node struct {
horizontal bool `default:false`
hasTabs bool // does the window have tabs?
+ currentTab bool // the visible tab
// the internal plugin toolkit structure
tk *cuiWidget
@@ -152,7 +163,7 @@ type cuiWidget struct {
size rectType
// the actual gocui display view of this widget
- // sometimes this isn't visable like with a Box or Grid
+ // sometimes this isn't visible like with a Box or Grid
gocuiSize rectType
isCurrent bool // is this the currently displayed Window or Tab?
@@ -164,6 +175,12 @@ type cuiWidget struct {
tainted bool
frame bool
+
+ // for a window, this is currently selected tab
+ selectedTab *node
+
+ // what color to use
+ color *colorT
}
// from the gocui devs: