blob: 9a80ad3fcb706402dfe8d54a327c84ea4b28559f (
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
// make debian packages for go applications
package main
import (
"go.wit.com/gui"
"go.wit.com/lib/debugger"
"go.wit.com/lib/gadgets"
"go.wit.com/log"
)
// This is the beginning of the binary tree of GUI widgets
var myGui *gui.Node
// this is the primary window. If you close it, the program will exit
// var mainWindow *gui.Node
// this is a basic window. the user can open and close it
var basicWindow *gadgets.BasicWindow
func main() {
if debugger.ArgDebug() {
log.SetAll(true)
log.ShowFlags()
}
if args.TmpLog {
// send all log() output to a file in /tmp
log.SetTmp()
}
myGui = gui.New()
myGui.Default()
// helloworld()
basicWindow = makebasicWindow()
if args.OpenGui {
basicWindow.Show()
// go will sit here until the window exits
gui.Watchdog()
}
// run the debugger if triggered from the commandline
if debugger.ArgDebug() {
go func() {
log.Sleep(2)
debugger.DebugWindow()
}()
}
}
/*
// This initializes the first window and some widgets
func helloworld() {
mainWindow = myGui.NewWindow("Debian Package Creater for GO Language Applicatiosn").SetProgName("BASEWIN")
box := mainWindow.NewBox("hbox", true)
// section1 = newChoices(box)
group := box.NewGroup("control file")
group.NewButton("show basic window", func() {
if basicWindow.Hidden() {
basicWindow.Show()
} else {
basicWindow.Hide()
}
})
}
*/
|