summaryrefslogtreecommitdiff
path: root/argv.go
blob: b7e75df8d0da16d304380f136f2f54197ff4de51 (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
package gui

import (
	"go.wit.com/dev/alexflint/arg"
)

var argGui ArgsGui

/*
This struct can be used with the go-arg package. These
are the generic default command line arguments for the 'GUI' package
*/
type ArgsGui struct {
	NoGui      bool   `arg:"--no-gui"         help:"ignore all these gui problems"`
	GuiPlugin  string `arg:"--gui"            help:"Use this gui toolkit [andlabs,gocui,nocui,stdin]"`
	GuiFile    string `arg:"--gui-file"       help:"Use a specific plugin.so file"`
	GuiTest    string `arg:"--gui-test"       help:"test a specific plugin.so will load"`
	GuiVerbose bool   `arg:"--gui-verbose"    help:"enable all logging"`
}

/*
used for command line options.
This allows you to control the toolkit settings from the command line

	--debugger      # opens the debugger
	--gui andlabs   # loads the GTK toolkit on linux or Cocoa on mac
	--gui gocui     # runs your program in the terminal in ncurses-like mode
*/
func ArgToolkit() string {
	return argGui.GuiPlugin
}

func InitArg() {
	arg.Register(&argGui)
}

/*
func init() {
	arg.Register(&argGui)
}
*/