2023-12-29 09:24:06 -06:00
|
|
|
package gui
|
|
|
|
|
|
|
|
import (
|
2024-01-03 18:15:54 -06:00
|
|
|
"go.wit.com/log"
|
2024-01-14 14:51:18 -06:00
|
|
|
"go.wit.com/dev/alexflint/arg"
|
2023-12-29 09:24:06 -06:00
|
|
|
)
|
|
|
|
|
2024-01-08 23:52:56 -06:00
|
|
|
var INFO *log.LogFlag
|
|
|
|
var NOW *log.LogFlag
|
|
|
|
var GUI *log.LogFlag
|
|
|
|
var NODE *log.LogFlag
|
|
|
|
var PLUG *log.LogFlag
|
|
|
|
var CHANGE *log.LogFlag
|
2024-01-03 18:15:54 -06:00
|
|
|
|
2023-12-29 17:24:16 -06:00
|
|
|
var argGui ArgsGui
|
2023-12-29 09:24:06 -06:00
|
|
|
|
|
|
|
// This struct can be used with the go-arg package
|
2023-12-29 17:24:16 -06:00
|
|
|
type ArgsGui struct {
|
|
|
|
GuiPlugin string `arg:"--gui" help:"Use this gui toolkit [andlabs,gocui,nocui]"`
|
2023-12-29 09:24:06 -06:00
|
|
|
GuiVerbose bool `arg:"--gui-verbose" help:"enable all logging"`
|
|
|
|
}
|
|
|
|
|
2024-01-03 18:15:54 -06:00
|
|
|
// returns the toolkit
|
|
|
|
func ArgToolkit() string {
|
|
|
|
return argGui.GuiPlugin
|
|
|
|
}
|
|
|
|
|
2023-12-29 09:24:06 -06:00
|
|
|
func init() {
|
2023-12-29 17:24:16 -06:00
|
|
|
arg.Register(&argGui)
|
2023-12-31 16:08:18 -06:00
|
|
|
|
2024-01-08 22:27:17 -06:00
|
|
|
full := "go.wit.com/gui/gui"
|
|
|
|
short := "gui"
|
|
|
|
|
2024-01-08 23:52:56 -06:00
|
|
|
NOW = log.NewFlag("NOW", true, full, short, "temp debugging stuff")
|
|
|
|
INFO = log.NewFlag("INFO", false, full, short, "General Info")
|
|
|
|
GUI = log.NewFlag("GUI", false, full, short, "basic GUI internals")
|
|
|
|
NODE = log.NewFlag("NODE", false, full, short, "binary tree debugging")
|
|
|
|
PLUG = log.NewFlag("PLUG", false, full, short, "basic PLUG debuggging")
|
|
|
|
CHANGE = log.NewFlag("CHANGE", false, full, short, "user changed something")
|
2023-12-29 09:24:06 -06:00
|
|
|
}
|