summaryrefslogtreecommitdiff
path: root/toolkit/andlabs/window.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2022-11-06 19:57:20 -0600
committerJeff Carr <[email protected]>2022-11-06 19:57:20 -0600
commitb410d0fd083ee89eed410cda2123a22cddcd3f44 (patch)
tree3f1a637003629a3ec7d383b5db6beb0df9e5a97c /toolkit/andlabs/window.go
parente55fb6675d692e3f44fa67b02b12661e476bd028 (diff)
Implement a early AddButton() via a golang pluginv0.4.5
pass a name to gocui.AddButton() cleaner plugin usage add the start to golang plugin plugin stuff in a single file added a button correctly andlabs/ui added a button via plugin to gocli hot diggity! trying to invoke a gocli plugin function from the andlabs ui load the plugin hide more debugging output turn off all output Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/andlabs/window.go')
-rw-r--r--toolkit/andlabs/window.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/toolkit/andlabs/window.go b/toolkit/andlabs/window.go
index 3e5f16a..efbd672 100644
--- a/toolkit/andlabs/window.go
+++ b/toolkit/andlabs/window.go
@@ -17,7 +17,9 @@ func (t *Toolkit) ErrorWindow(msg1 string, msg2 string) {
func NewWindow(title string, x int, y int) *Toolkit {
var t Toolkit
- log.Println("toolkit NewWindow", title, x, y)
+ if (DebugToolkit) {
+ log.Println("toolkit NewWindow", title, x, y)
+ }
w := ui.NewWindow(title, x, y, menubar)
w.SetBorderless(canvas)
w.SetMargined(margin)
@@ -50,11 +52,15 @@ func NewWindow(title string, x int, y int) *Toolkit {
}
func (t *Toolkit) SetWindowTitle(title string) {
- log.Println("toolkit NewWindow", t.Name, "title", title)
+ if (DebugToolkit) {
+ log.Println("toolkit NewWindow", t.Name, "title", title)
+ }
win := t.uiWindow
if (win != nil) {
win.SetTitle(title)
} else {
- log.Println("Setting the window title", title)
+ if (DebugToolkit) {
+ log.Println("Setting the window title", title)
+ }
}
}