summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-06 20:40:13 -0600
committerJeff Carr <[email protected]>2024-02-06 20:40:13 -0600
commit2aed14a60cbb9208f8f9a507c83a3dd297a93640 (patch)
tree85081da45e1914f84d1efadfdf94e9fbc8abaf94
parenta7ad4af45c4adbb70da457e7e925c93ddac85251 (diff)
allow Windows to be made directly off the binary tree
Signed-off-by: Jeff Carr <[email protected]>
-rw-r--r--textbox.go4
-rw-r--r--window.go9
2 files changed, 13 insertions, 0 deletions
diff --git a/textbox.go b/textbox.go
index 782c705..2b28fae 100644
--- a/textbox.go
+++ b/textbox.go
@@ -20,6 +20,10 @@ func (parent *Node) NewTextbox(name string) *Node {
return newNode
}
+func (parent *Node) NewEntrybox(name string) *Node {
+ return parent.NewEntryLine(name)
+}
+
func (parent *Node) NewEntryLine(name string) *Node {
newNode := parent.newNode(name, widget.Textbox)
newNode.defaultS = name
diff --git a/window.go b/window.go
index c805e47..f8319b7 100644
--- a/window.go
+++ b/window.go
@@ -38,6 +38,15 @@ func (parent *Node) NewWindow(title string) *Node {
return newNode
}
+// This creates a window off the root of the binary tree
+func NewWindow(title string) *Node {
+ return me.rootNode.NewWindow(title)
+}
+
+func RawWindow(title string) *Node {
+ return me.rootNode.RawWindow(title)
+}
+
// allow window create without actually sending it to the toolkit
func (parent *Node) RawWindow(title string) *Node {
var newNode *Node