diff options
| author | Jeff Carr <[email protected]> | 2023-03-26 17:19:20 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-03-26 17:19:20 -0500 |
| commit | 6013fde8332e8ecbffaf1a0977ba2e1da8ea8775 (patch) | |
| tree | 3f9ccd75e8699974f3412fdd79a20173672c19c2 /main.go | |
| parent | 6f91f5e080e06cdc0f34b13d23e5fd16ea37259a (diff) | |
improvements towards a working dns control panel
democui has the help menu
try to add mouse support to gocui
make a direct access method
Margin() and Pad() tests
add SPEW
also push devel branch to github
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 29 |
1 files changed, 26 insertions, 3 deletions
@@ -57,7 +57,7 @@ func InitPlugins(names []string) { log(debugGui, "Starting gui.Init()") for _, aplug := range allPlugins { - log(debugGui, "gui.LoadToolkit() already loaded toolkit plugin =", aplug.name) + log(debugGui, "LoadToolkit() already loaded toolkit plugin =", aplug.name) for _, name := range names { if (name == aplug.name) { return @@ -93,6 +93,27 @@ func InitPlugins(names []string) { // StandardExit("golang wit/gui could not load a plugin TODO: do something to STDOUT (?)") } +func Start() *Node { + log(logInfo, "Start() Main(f)") + f := func() { + } + go Main(f) + sleep(1) + return Config.master +} + +func StartS(name string) *Node { + log(logInfo, "Start() Main(f) for name =", name) + if (LoadToolkit(name) == false) { + return Config.master + } + f := func() { + } + go Main(f) + sleep(1) + return Config.master +} + // This should not pass a function func Main(f func()) { log(debugGui, "Starting gui.Main() (using gtk via andlabs/ui)") @@ -111,11 +132,12 @@ func Main(f func()) { } aplug.MainOk = true aplug.Main(f) - // f() } - // toolkit.Main(f) } +/* +This is deprecated and will be implemented more correctly with waitgroups + // This should never be exposed(?) // Other goroutines must use this to access the GUI @@ -135,6 +157,7 @@ func Queue(f func()) { aplug.Queue(f) } } +*/ // The window is destroyed but the application does not quit func (n *Node) StandardClose() { |
