summaryrefslogtreecommitdiff
path: root/toolkit/andlabs/window.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-04-27 12:41:42 -0500
committerJeff Carr <[email protected]>2023-04-27 12:41:42 -0500
commit253dcb012f6d4fc861e6fc9a66fd2c7260ead442 (patch)
treea3092695fa5d6769d5898e3319016f0bb84ae6e9 /toolkit/andlabs/window.go
parent8100e7a1abdc31afbf65af6d0b7cd7cb0fff69eb (diff)
andlabs: deprecate old code
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/andlabs/window.go')
-rw-r--r--toolkit/andlabs/window.go15
1 files changed, 5 insertions, 10 deletions
diff --git a/toolkit/andlabs/window.go b/toolkit/andlabs/window.go
index 3e87b2c..ccc523a 100644
--- a/toolkit/andlabs/window.go
+++ b/toolkit/andlabs/window.go
@@ -3,8 +3,6 @@ package main
import (
"github.com/andlabs/ui"
_ "github.com/andlabs/ui/winmanifest"
-
- "git.wit.org/wit/gui/toolkit"
)
func (t *andlabsT) MessageWindow(msg1 string, msg2 string) {
@@ -19,31 +17,28 @@ func newWindow(n *node) {
var newt *andlabsT
newt = new(andlabsT)
- newt.WidgetType = toolkit.Window
- newt.wId = n.WidgetId
// menubar bool is if the OS defined border on the window should be used
win := ui.NewWindow(n.Name, n.X, n.Y, menubar)
win.SetBorderless(canvas)
win.SetMargined(margin)
win.OnClosing(func(*ui.Window) bool {
- newt.doUserEvent()
+ n.doUserEvent()
return true
})
newt.uiWindow = win
newt.uiControl = win
- newt.Name = n.Name
n.tk = newt
win.Show()
return
}
-func (t *andlabsT) SetWindowTitle(title string) {
- log(debugToolkit, "toolkit NewWindow", t.Name, "title", title)
- win := t.uiWindow
+func (n *node) SetWindowTitle(title string) {
+ log(debugToolkit, "toolkit NewWindow", n.Text, "title", title)
+ win := n.tk.uiWindow
if (win == nil) {
- log(debugError, "Error: no window", t.wId)
+ log(debugError, "Error: no window", n.WidgetId)
} else {
win.SetTitle(title)
log(debugToolkit, "Setting the window title", title)