blob: 016d10bc6ba389b175401861c5d4570d1e27f55a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
package smartwindow
import (
"go.wit.com/log"
"go.wit.com/gui/gadgets"
)
func New() *SmartWindow {
sw := SmartWindow {
hidden: true,
ready: false,
}
return &sw
}
func (sw *SmartWindow) InitWindow() {
if sw == nil {
log.Log(WARN, "not initalized yet (no parent for the window?)")
return
}
if sw.window != nil {
log.Log(WARN, "You already have a SmartWindow")
sw.ready = true
return
}
log.Log(WARN, "Creating the Window")
sw.window = gadgets.NewBasicWindow(sw.parent, sw.title)
sw.ready = true
}
|