summaryrefslogtreecommitdiff
path: root/structs.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2021-10-31 21:07:36 -0500
committerJeff Carr <[email protected]>2021-10-31 21:07:36 -0500
commitc95392d4609f06eb0b86fc6a25b93613ee3770fb (patch)
tree73f1db3e4f756ee8a1bb16ad8f7601f566885dd1 /structs.go
parent7fecc2b2a8c87386c0a51c6e4e3942e2def8f514 (diff)
BOX: kill GuiBox
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'structs.go')
-rw-r--r--structs.go16
1 files changed, 11 insertions, 5 deletions
diff --git a/structs.go b/structs.go
index b298f43..c31b021 100644
--- a/structs.go
+++ b/structs.go
@@ -94,7 +94,7 @@ type GuiWindow struct {
// MakeWindow func(*GuiBox) *GuiBox
// the components of the window
- BoxMap map[string]*GuiBox
+ // BoxMap map[string]*GuiBox
EntryMap map[string]*GuiEntry
Area *GuiArea
@@ -112,6 +112,7 @@ func (w *GuiWindow) Dump() {
log.Println("gui.GuiWindow.Dump() Height = ", w.Height)
}
+/*
// GuiBox is any type of ui.Hbox or ui.Vbox
// There can be lots of these for each GuiWindow
type GuiBox struct {
@@ -124,7 +125,9 @@ type GuiBox struct {
// andlabs/ui abstraction mapping
UiBox *ui.Box
}
+*/
+/*
func (b *GuiBox) Dump() {
log.Println("gui.GuiBox.Dump() Name = ", b.Name)
log.Println("gui.GuiBox.Dump() Axis = ", b.Axis)
@@ -144,6 +147,7 @@ func (b *GuiBox) SetTitle(title string) {
b.Window.UiWindow.SetTitle(title)
return
}
+*/
func (w *GuiWindow) SetNode(n *Node) {
if (w.node != nil) {
@@ -157,6 +161,7 @@ func (w *GuiWindow) SetNode(n *Node) {
}
}
+/*
func (b *GuiBox) SetNode(n *Node) {
if (b.node != nil) {
b.Dump()
@@ -176,6 +181,7 @@ func (b *GuiBox) Append(child ui.Control, x bool) {
}
b.UiBox.Append(child, x)
}
+*/
// Note: every mouse click is handled
// as a 'Button' regardless of where
@@ -183,7 +189,7 @@ func (b *GuiBox) Append(child ui.Control, x bool) {
// call this 'GuiMouseClick'
type GuiButton struct {
Name string // field for human readable name
- Box *GuiBox // what box the button click was in
+ // box2 *GuiBox // what box the button click was in
// a callback function for the main application
Custom func(*GuiButton)
@@ -204,7 +210,7 @@ type GuiEntry struct {
Normalize func(string) string // function to 'normalize' the data
B *GuiButton
- Box *GuiBox
+ // Box *GuiBox
// andlabs/ui abstraction mapping
UiEntry *ui.Entry
@@ -217,7 +223,7 @@ type GuiEntry struct {
//
type GuiArea struct {
Button *GuiButton // what button handles mouse events
- Box *GuiBox
+ // Box *GuiBox
UiAttrstr *ui.AttributedString
UiArea *ui.Area
@@ -255,7 +261,7 @@ type TableData struct {
Cells [20]CellData
Human [20]HumanMap
- Box *GuiBox
+ // Box *GuiBox
n *Node
lastRow int