summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-11 01:00:05 -0600
committerJeff Carr <[email protected]>2024-02-11 01:00:05 -0600
commitb29d6caf34e72af362f791a5cba7dbd06e7fd1a2 (patch)
treeec37cefac915ac54a40fb2eac7ae2f55261477f3 /main.go
initial commit
Diffstat (limited to 'main.go')
-rw-r--r--main.go67
1 files changed, 67 insertions, 0 deletions
diff --git a/main.go b/main.go
new file mode 100644
index 0000000..9a80ad3
--- /dev/null
+++ b/main.go
@@ -0,0 +1,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()
+ }
+ })
+}
+*/