From 88f33afbb777a3d02631c4eb6a2d6f6dbf7fba3f Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 6 Feb 2025 13:47:19 -0600 Subject: window depth order works --- structs.go | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'structs.go') diff --git a/structs.go b/structs.go index 7f9bf65..21a2d71 100644 --- a/structs.go +++ b/structs.go @@ -116,6 +116,19 @@ func (r *rectType) Height() int { return r.h1 - r.h0 } +// settings that are window specific +type window struct { + windowFrame *guiWidget // this is the frame for a window widget + dragW int // when dragging a window, this is the offset to the mouse position + dragH int // when dragging a window, this is the offset to the mouse position + hasTabs bool // does the window have tabs? + currentTab bool // the visible tab + selectedTab *tree.Node // for a window, this is currently selected tab + active bool // means this window is the active one + isBG bool // means this is the background widget. There is only one of these + order int // what level the window is on +} + type guiWidget struct { v *gocui.View // this is nil if the widget is not displayed cuiName string // what gocui uses to reference the widget (usually "TK " @@ -128,11 +141,11 @@ type guiWidget struct { dragH int // when dragging a window, this is the offset to the mouse position hasTabs bool // does the window have tabs? currentTab bool // the visible tab + window window // holds information specific only to Window widgets value string // ? checked bool // ? labelN string // the actual text to display in the console vals []string // dropdown menu items - active bool // ? enable bool // ? defaultColor *colorT // store the color to go back to gocuiSize rectType // should mirror the real display size. todo: verify these are accurate. they are not yet @@ -150,7 +163,6 @@ type guiWidget struct { color *colorT // what color to use resize bool // the window is currently being resized isBG bool // means this is the background widget. There is only one of these - activeWindow bool // means this window is the active one } // from the gocui devs: -- cgit v1.2.3