Commit Graph

377 Commits

Author SHA1 Message Date
Jeff Carr 4242393152 setup building without plugins on windows
notes from github remote
keep removing os.Exit()
rename from andlabs2 back to andlabs
rename files for windows andlabs/ui
gocui always sets STDOUT a file in /tmp/

Signed-off-by: Jeff Carr <jcarr@wit.com>
2022-11-14 14:30:28 -06:00
Jeff Carr 8221522ba8 Massive refactor to use go plugins. This is neat.
update README.md
    set xterm title. make os.Exit() default on window close
    add a toolkit.Widget to the node structure
    remove 'Greeter' symbol mapping scheme
    removed the testing greeter code
    plugins:
        attempt to load plugins in a sensible order
    andlabs/ui:
        working andlabs/ui plugin (andlabs2)
   	buttons work in andlabs plugin
	TODO: re-implement non-plugin version for Windows
		mswindows doesn't support go plugins yet
    gocui:
        put the gocui console so file in the binary
        does a full init of gocui plugin
        Button() and Group() working very well with gogui
    	cleanly exit gocui
    technically you can load two toolkits at the same time
        kinda both working at the same time. esoteric
        two working plugins at the same time
        give up working on two gui's at the same time
        this is fun, but _not interesting
        wow. this actually works. NewButton() from both toolkits
    examples:
        all the examples run again
        remove early helloplugin example
        buttonplugin example cmd code
        buttonplugin runs and ldd is minimum

Signed-off-by: Jeff Carr <jcarr@wit.com>
2022-11-13 08:53:03 -06:00
Jeff Carr 06237c36fa cleanup of the example commands. more plugin work
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 <jcarr@wit.com>
2022-11-09 08:38:50 -06:00
Jeff Carr c43a684857 Implement a early AddButton() via a golang plugin
pass a name to gocui.AddButton()
    cleaner plugin usage
    add the start to golang plugin
    plugin stuff in a single file
    added a button correctly
    andlabs/ui added a button via plugin to gocli
  	  hot diggity!
    trying to invoke a gocli plugin function from the andlabs ui
    load the plugin
    hide more debugging output
    turn off all output

Signed-off-by: Jeff Carr <jcarr@wit.com>
2022-11-06 19:57:20 -06:00
Jeff Carr 482c3ef8eb start trying to make the tookits plugins
totally minimize helloworld demo
    try to make a button plugin example
    debug changes
    final changes before attempting to use a golang plugin
    actually running gocui as a plugin
    add gocli-as-plugin example
    try to convert the go-cui toolkit into a plugin
    doc updates
    make a minimal console gui

Signed-off-by: Jeff Carr <jcarr@wit.com>
2022-11-06 12:59:24 -06:00
Jeff Carr 5417c8f477 v0.4.2 more code cleanups and improvements
Add command line argv handling using go-arg
    make hello world dumb stupid simple again
    more swtiching to common code
    move debugging options to support go-args
    more debugging output cleanup
    more debugging cleanups
    fix null pointer crash
2022-11-05 10:19:04 -05:00
Jeff Carr f48d3fbcfe correct markdown syntax 2022-10-21 13:34:56 -05:00
Jeff Carr 9dcaff390f minor doc change 2022-10-21 13:33:55 -05:00
Jeff Carr cfb9202bff manually adjust docs 2022-10-21 13:29:15 -05:00
Jeff Carr cee37ba89d add url's in markup syntax 2022-10-21 13:13:41 -05:00
Jeff Carr 08d8070b63 OnChanged(doc.go) func() {goreadme > README.md}
Signed-off-by: Jeff Carr <jcarr@wit.com>
2022-10-21 13:02:25 -05:00
Jeff Carr 3283fee3f3 forgot to update the README.md
Signed-off-by: Jeff Carr <jcarr@wit.com>
2022-10-21 12:59:46 -05:00
Jeff Carr c5735353a6 v0.4.1 set sane toolkit default look and feel
autogenerate README.md from doc.go (goreadme cmd)
    remove passing arguements on a mouse click()
    make defaults for padding, margin, stretchy, etc
    add a checkbox widget
    function rename to NewButton()
    keep cleaning up toolkit code
    fix date. I was somehow in the future

Signed-off-by: Jeff Carr <jcarr@wit.com>
2022-10-21 11:40:08 -05:00
Jeff Carr d28f0eb8c1 Squashed commit of the following:
all non binary tree structs are gone (almost all)
    Use names from https://en.wikipedia.org/wiki/Graphical_widget
    toolkit andlabs/ui is isolated from being accessable
        all direct references to andlabs are removed
    working dropdown widgets
    add debugging more buttons and windows
2022-10-20 06:55:42 -05:00
Jeff Carr 6286635049 Refactor to 'gui/toolkit/'
* add a example cmds/consolemouse
       uses a console button to launch the andlabs/ui
    * fix wrong return value in toolkit/NewLabel()
    * redirect STDIN output to a file
    * wonderful fix of Window() exit
    * finally remove the ancient stupid variables x & y
    * phase out struct 'box' and use 'node' instead
    * better names for things: use NewFoo() and NewBar()
2022-10-19 13:23:22 -05:00
Jeff Carr a482e34efa purge lots of old code
Signed-off-by: Jeff Carr <jcarr@wit.com>
2022-10-17 23:19:28 -05:00
Jeff Carr e823dd78de GROUP: implement 'group' in toolkit/
move gui.group into toolkit
    remove duplicate code
    update demo
2022-10-17 22:39:03 -05:00
Jeff Carr 25a6d6a346 TITLE: set the window title
Signed-off-by: Jeff Carr <jcarr@wit.com>
2022-10-17 19:57:16 -05:00
Jeff Carr dbbffdffa3 remove old code
Signed-off-by: Jeff Carr <jcarr@wit.com>
2022-10-17 16:55:30 -05:00
Jeff Carr f079de80b6 DEMO: change the toolkit demo to not use 'tabs'
Signed-off-by: Jeff Carr <jcarr@wit.com>
2022-10-17 15:02:13 -05:00
Jeff Carr 2c8031b849 DEMO: work on a toolkit demo
Signed-off-by: Jeff Carr <jcarr@wit.com>
2022-10-17 12:12:58 -05:00
Jeff Carr 412b287403 DEMO: add andlabs/ui demo window
Signed-off-by: Jeff Carr <jcarr@wit.com>
2022-10-17 11:56:43 -05:00
Jeff Carr 12d232ba62 start moving tab handling into toolkit/
Signed-off-by: Jeff Carr <jcarr@wit.com>
2022-10-17 00:38:27 -05:00
Jeff Carr e3b2e5fcc4 add a GO Language Debugging Window
Signed-off-by: Jeff Carr <jcarr@wit.com>
2022-10-16 23:42:21 -05:00
Jeff Carr a03d2f7c97 fix andlabs.ui.NewLabel()
Signed-off-by: Jeff Carr <jcarr@wit.com>
2022-10-16 10:09:16 -05:00
Jeff Carr fbf97443d5 Add slander and spinbox in toolkit/andlabs
fix the helloworld demo
    move slider into toolkit/
    move more into the toolkit directory
    add spinbox()
    fix example
    minor update
    fix examples
    Fix andlabs.ui.Slider() to work again
    correctly implement custom OnChange() callback

Signed-off-by: Jeff Carr <jcarr@wit.com>
2022-10-16 08:07:13 -05:00
Jeff Carr 9076499b30 Merge branch 'master' into devel 2022-10-11 11:59:42 -05:00
Jeff Carr 23b29405fe Merge branch 'jcarr' 2022-10-11 11:58:59 -05:00
Jeff Carr 8cbfe29a86 Merge branch 'master' of git.wit.org:wit/gui 2022-10-11 11:51:17 -05:00
Jeff Carr adb7d849f6 build without go.mod file 2022-10-11 11:51:02 -05:00
Jeff Carr 4ffea70d84 Merge branch 'refactor' 2022-10-11 11:42:17 -05:00
Jeff Carr 390556e083 Change Node to Box 2022-10-11 11:25:46 -05:00
Jeff Carr f68428d13b Try renaming 'Node' to 'Box' 2022-10-08 23:51:48 -05:00
Jeff Carr 917527d4dc Merge branch 'master' into jcarr 2022-10-08 23:22:47 -05:00
Jeff Carr 54a402449f use the old way to ignore go.mod?
Signed-off-by: Jeff Carr <jcarr@wit.com>
2022-10-08 19:31:35 -05:00
Jeff Carr 0e69bcd67a BUILD: builds again with go 1.19 on sid as of today
Signed-off-by: Jeff Carr <jcarr@wit.com>
2022-10-08 17:33:12 -05:00
Jeff Carr cc676d14ec NOTE: minor
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-11-04 08:45:20 -05:00
Jeff Carr c91d7d52b8 SMALL: some stuff hanging around
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-11-04 05:46:49 -05:00
Jeff Carr 12cc3882f5 GOOD: font button shows up again (doesn't do anything)
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-11-04 03:25:42 -05:00
Jeff Carr f615feaf81 GOOD: read text from multi-line entrybox
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-11-04 02:48:41 -05:00
Jeff Carr 2af6db4d6c GOOD: use global 'Stretchy' setting
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-11-04 02:23:41 -05:00
Jeff Carr 50a33262c1 GOOD: add Node.SetMargined()
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-11-04 01:12:42 -05:00
Jeff Carr 20899fc2b4 PANIC: remove almost all panic()s
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-11-04 00:12:48 -05:00
Jeff Carr 1b8b31a123 EDITBOX: pull in a edit box example
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-11-03 23:25:57 -05:00
Jeff Carr 8d5b885b3a GUI: show error windows
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-11-03 22:41:22 -05:00
Jeff Carr 9c946630a1 WINDOW: try to properly destroy a window
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-11-03 01:44:32 -05:00
Jeff Carr 9960652ec7 TABS: very reliable tab, window and node handling
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-11-01 03:44:39 -05:00
Jeff Carr 934470d1a9 CODE: old code
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-11-01 02:15:38 -05:00
Jeff Carr f92435a726 BREAK: add vertical and horizontal breaks
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-11-01 01:26:31 -05:00
Jeff Carr 91e4ad1351 CLEAN: remove more cruft
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-11-01 01:13:07 -05:00