summaryrefslogtreecommitdiff
path: root/redo/window_windows.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-07-15 22:44:27 -0400
committerPietro Gagliardi <[email protected]>2014-07-15 22:44:27 -0400
commitd154a2d74d01be34561b2959864ce9302043c27f (patch)
tree7c49f42acb69f30e8f45f5ec9a951d213ebc1765 /redo/window_windows.go
parentd6a8a72662f7ef5f73962967aff1423183c598cb (diff)
Added basic control showing to the Windows backend.
Diffstat (limited to 'redo/window_windows.go')
-rw-r--r--redo/window_windows.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/redo/window_windows.go b/redo/window_windows.go
index 4fb971f..14fa352 100644
--- a/redo/window_windows.go
+++ b/redo/window_windows.go
@@ -12,6 +12,8 @@ type window struct {
hwnd uintptr
shownbefore bool
+ child Control
+
closing *event
}
@@ -65,8 +67,12 @@ func (w *window) SetControl(control Control) *Request {
c := make(chan interface{})
return &Request{
op: func() {
- // TODO unparent
- // TODO reparent
+ if w.child != nil { // unparent existing control
+ w.child.unparent()
+ }
+ control.unparent()
+ control.parent(w)
+ w.child = control
c <- struct{}{}
},
resp: c,