diff options
| author | Jeff Carr <[email protected]> | 2022-11-09 08:38:50 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2022-11-09 08:38:50 -0600 |
| commit | ed382bec55be25039e4dcf020d1512139855c9bb (patch) | |
| tree | fb3a671fd07c03a75cedb8d56b2241108cd792ff /cmds/buttonAsPlugin/main.go | |
| parent | b410d0fd083ee89eed410cda2123a22cddcd3f44 (diff) | |
cleanup of the example commands. more plugin workv0.4.6
add a button in two plugins at the same time!
added a button in andlabs/ui & gocui
attempt a common widget struct between wit/gui & the plugins
start handling missing plugins
rename Makefile command examples
remote examples used for testing
filename improvements
golang src code uses lowercase and _ in filenames
fix crash when button click function == nil
fix wrong name 'gocli' -> 'gocui'
keep fighting with goreadme generated README.md
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'cmds/buttonAsPlugin/main.go')
| -rw-r--r-- | cmds/buttonAsPlugin/main.go | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/cmds/buttonAsPlugin/main.go b/cmds/buttonAsPlugin/main.go deleted file mode 100644 index e26c75e..0000000 --- a/cmds/buttonAsPlugin/main.go +++ /dev/null @@ -1,54 +0,0 @@ -// This is a simple example -package main - -import ( - "log" - "git.wit.org/wit/gui" -) - -func main() { - // go loadPlugin(plugHello, "../../toolkit/hello.so") - - // this doesn't seem to work - captureSTDOUT() - - // go loadPlugin("../../toolkit/gocli.so") - gui.Main(buttonWindow) -} - -// This creates a window -func buttonWindow() { - var w, g *gui.Node - gui.Config.Title = "Demo Plugin Window" - gui.Config.Width = 640 - gui.Config.Height = 480 - - w = gui.NewWindow() - g = w.NewGroup("buttonGroup") - - g.NewButton("hello", func () { - log.Println("world") - }) - - /* - g.NewButton("LoadPlugin()", func () { - log.Println("world") - gui.LoadPlugin("../../toolkit/gocli.so") - }) - */ - - g.NewButton("RunGreet()", func () { - log.Println("world") - go gui.RunGreet() - }) - - g.NewButton("gui.LookupJcarrButton()", func () { - log.Println("gui.LookupJcarrButton()") - gui.LookupJcarrButton() - }) - - g.NewButton("gui.GocuiAddButton()", func () { - log.Println("gui.GocuiAddButton()") - gui.GocuiAddButton("new foobar") - }) -} |
