Commit Graph

101 Commits

Author SHA1 Message Date
Jeff Carr 053ea69885 The debugging window is finally useful
the gui enabled debugging works
        --gui-debug works from the command line
        The debug window can now select things
        debugging now includes widget types
        all the debug flags work
        finally working debugging flags via gui checkboxes
    add debian packaging rules
    use log() in the toolkit
    use a standard log() to simplify debugging flags
    add reference to 'GO Style Guide'
    use the same LICENSE from the GO developers.
    TODO: make this threadsafe
    TODO: fix plugin stuff

Signed-off-by: Jeff Carr <jcarr@wit.com>
2023-02-25 14:05:25 -06:00
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 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 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 390556e083 Change Node to Box 2022-10-11 11:25:46 -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 2af6db4d6c GOOD: use global 'Stretchy' setting
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-11-04 02:23:41 -05:00
Jeff Carr 898874b0e9 CLEAN: out of the rabbit hole
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-11-01 00:24:56 -05:00
Jeff Carr 8c1c837879 CLEAN: remove GuiButton struct 2021-10-31 23:48:34 -05:00
Jeff Carr 51d324e805 CLEAN: more code removals
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-10-31 22:22:16 -05:00
Jeff Carr db6c60decc REFACTOR: remove GuiWindow & GuiBox
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-10-31 21:46:30 -05:00
Jeff Carr d6980daa81 BOX: kill GuiBox
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-10-31 21:07:36 -05:00
Jeff Carr ad3a955750 BOX: remove GuiBox
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-10-31 20:22:36 -05:00
Jeff Carr f7ead697d3 REFACTOR: refactor everything to gui.Node struct
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-10-31 14:21:36 -05:00
Jeff Carr 2ccc1b518d REFACTOR: things are back to working as they were
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-10-06 14:32:07 -05:00
Jeff Carr 908615c038 TAB: correctly lookup and add tabs to blank windows
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-10-06 13:23:00 -05:00
Jeff Carr b4a11c0aa1 CODE: start a general code refactor
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-10-06 08:36:28 -05:00
Jeff Carr cabdb12495 BUILD: suck it up and try to use go.mod
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-10-06 05:14:24 -05:00
Jeff Carr ccb91460ca BUG: fix potential 'nil' reference
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-10-05 10:23:27 -05:00
Jeff Carr 6438e4cc6a CODE: not sure, but it compiles and runs somehow
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-10-05 09:29:55 -05:00
Jeff Carr 6035dc8d79 DEBUG: added button to SetMargin() by name
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-10-05 07:13:24 -05:00
Jeff Carr 6f88d8fbf5 DEBUG: gui to debug windows
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-10-05 05:52:50 -05:00
Jeff Carr 90d8111ada TAB: automatically set all tables to SetMargined(true)
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-10-05 02:00:32 -05:00
Jeff Carr e6c44cd2d3 ANALABS: work on improving the abstraction
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-10-04 23:38:45 -05:00
Jeff Carr 83c19cb614 TAB: more tab handling cleanups
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-10-04 21:54:16 -05:00
Jeff Carr 71a9b13236 TAB: code to more correctly handle gtk tabs
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-10-04 21:33:03 -05:00
Jeff Carr c55a039042 allow a custom Exit()
Signed-off-by: Jeff Carr <jcarr@wit.com>
2019-06-17 08:09:28 -07:00
Jeff Carr 7da54784fb don't use Data.Windows anymore
Signed-off-by: Jeff Carr <jcarr@wit.com>
2019-06-14 15:41:30 -07:00
Jeff Carr 17512c10c5 ready to implement Destroy()
Signed-off-by: Jeff Carr <jcarr@wit.com>
2019-06-13 14:17:05 -07:00
Jeff Carr 22760127b9 more tests
Signed-off-by: Jeff Carr <jcarr@wit.com>
2019-06-13 13:28:13 -07:00
Jeff Carr 8ad635c307 finally vm list working again
Signed-off-by: Jeff Carr <jcarr@wit.com>
2019-06-13 12:08:47 -07:00
Jeff Carr 999a8fd199 reimplement the color button
Signed-off-by: Jeff Carr <jcarr@wit.com>
2019-06-05 10:01:36 -07:00
Jeff Carr d86d25390d finally fix the window and tab names
Signed-off-by: Jeff Carr <jcarr@wit.com>
2019-06-04 00:56:58 -07:00
Jeff Carr 8d9f0b6a34 make a WindowMap to track which windows exist
Signed-off-by: Jeff Carr <jcarr@wit.com>
2019-06-03 15:45:40 -07:00
Jeff Carr 1e28641cde more button cleanups
Signed-off-by: Jeff Carr <jcarr@wit.com>
2019-06-03 00:50:05 -07:00
Jeff Carr 584e3b60d4 make a buttonMap
Signed-off-by: Jeff Carr <jcarr@wit.com>
2019-06-02 22:22:04 -07:00
Jeff Carr a030afb2bd remove 'Action'
Signed-off-by: Jeff Carr <jcarr@wit.com>
2019-06-02 21:56:43 -07:00
Jeff Carr abd061ae58 This might be stable enough to leave alone.
Up to this point it's been needing 10 patches
a day.

Signed-off-by: Jeff Carr <jcarr@wit.com>
2019-06-02 20:51:26 -07:00
Jeff Carr 5536e659ae see if an interface can store the outside values
also finally fixed the splash area logic

Signed-off-by: Jeff Carr <jcarr@wit.com>
2019-06-02 19:49:17 -07:00
Jeff Carr 1366012bc9 more deletions of old stuff
Signed-off-by: Jeff Carr <jcarr@wit.com>
2019-06-02 15:49:52 -07:00
Jeff Carr 1274211f20 almost complete 'CLEAN'. yet more code refactoring
Signed-off-by: Jeff Carr <jcarr@wit.com>
2019-06-02 15:19:53 -07:00
Jeff Carr b57b12549e doesn't crash
Signed-off-by: Jeff Carr <jcarr@wit.com>
2019-06-02 11:02:14 -07:00
Jeff Carr d95e62aaea spash screen works again
Signed-off-by: Jeff Carr <jcarr@wit.com>
2019-06-01 21:15:55 -07:00
Jeff Carr c9d46e1905 builds and works again
Signed-off-by: Jeff Carr <jcarr@wit.com>
2019-06-01 15:38:47 -07:00