Commit Graph

38 Commits

Author SHA1 Message Date
Jeff Carr 761250d24c more sendAction() cleanups
Signed-off-by: Jeff Carr <jcarr@wit.com>
2023-05-09 18:53:31 -05:00
Jeff Carr 579d75d856 compiles again
Signed-off-by: Jeff Carr <jcarr@wit.com>
2023-05-09 08:38:33 -05:00
Jeff Carr 9934f932ca andlabs grid placement still broken
Signed-off-by: Jeff Carr <jcarr@wit.com>
2023-05-09 08:25:10 -05:00
Jeff Carr 14f69c4a40 s/Config/me/ to remove direct access to anything
since most everything needs to be passed to the toolkits
everything should be accessed via func()'s

Signed-off-by: Jeff Carr <jcarr@wit.com>
2023-04-28 10:35:57 -05:00
Jeff Carr 85c2fb8d70 andlabs: the binary tree limps along again
Signed-off-by: Jeff Carr <jcarr@wit.com>
2023-04-08 11:06:50 -05:00
Jeff Carr 57283a4da7 correctly deprecate *widget to plugins
Signed-off-by: Jeff Carr <jcarr@wit.com>
2023-04-06 20:50:00 -05:00
Jeff Carr 7cf0d45909 gocui: debug flag buttons work
Signed-off-by: Jeff Carr <jcarr@wit.com>
2023-04-06 18:26:30 -05:00
Jeff Carr 7f907e2b19 gocui: working towards correct layout
make a gocui widget binary tree
    more debugging cleanups
    sample button app displays in gocui
    geometry logic closer to correct
    improvements in gocui layout
    continued attempts to clean up tabs
    dump binary tree
    moving towards proper chan callback()
    deprecate Widget.Name

Signed-off-by: Jeff Carr <jcarr@wit.com>
2023-04-03 10:26:47 -05:00
Jeff Carr b99e4425fa add semi-working gocui
commit 947169df5a22c9f9b53f825764747f648c70ff1e
Author: Jeff Carr <jcarr@wit.com>
Date:   Wed Mar 29 22:44:08 2023 -0500

    ready for version v0.7.4

        start deprecating toolkit.Widget
        switch to variable name 'ParentId'
        use 'ActionType' and 'WidgetType'
        preliminary redraw()
        final definition of variables 'Name' and 'Text'
        more cleaning of the code
        remove lots of dumb code
        bind 'd' key press to dump out debugging info
        early color handling in gocui!

    Signed-off-by: Jeff Carr <jcarr@wit.com>

commit 6013fde8332e8ecbffaf1a0977ba2e1da8ea8775
Author: Jeff Carr <jcarr@wit.com>
Date:   Sun Mar 26 17:19:20 2023 -0500

    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 <jcarr@wit.com>

commit 6f91f5e080e06cdc0f34b13d23e5fd16ea37259a
Author: Jeff Carr <jcarr@wit.com>
Date:   Fri Mar 24 20:14:18 2023 -0500

    starting to try safe chan and goroutines

        fix tab title's
        right before attempting to add chan goroutines
        removed "where" widget pointer
        box added to tab
        experiement with log as it's own repo

    Signed-off-by: Jeff Carr <jcarr@wit.com>

Signed-off-by: Jeff Carr <jcarr@wit.com>
2023-03-29 23:03:04 -05:00
Jeff Carr fa356841bf Squashed commit of the following:
boxes now exist and are tracked in the binary tree
    create for group and grid works
    gocui plugin no longer works. TODO: fix in next release
    converted everything from plugin to Action()
        can remove send()
        tab and window are now action()
        flags moved to action()
    ready for new release
    pad() margion() border() all work
    move worked!
    go.wit.com attept 578th try
    adds an early grid widget. won't work until chan
        andlabs/ui grid (X,Y) works right
        actually can put things in places in a grid
        Queue() means shit doesn't look right on grids
    lots of fucking around. why am I wasting time on image?
    wow. the crazy doAppend() thing is gone
    implement Action Show() and Hide()

Signed-off-by: Jeff Carr <jcarr@wit.com>
2023-03-23 12:35:12 -05:00
Jeff Carr 6196739d82 lots cleaner code between the plugin
Queue() around SetText is helping userspace crashing
    merge forceDump(bool) into Dump()
    debugging output configuration is pretty clean
    keep cutting down duplicate things
    --gui-verbose flag works
    make label "standard" code
    add debug.FreeOSMemory()
    move the GO language internals to display in the GUI
    update push to do tags and go to github.com/wit-go/
    remove the other license file
        it might be confusing golang.org and github
    proper WidgetType
    added a Quit() button

Signed-off-by: Jeff Carr <jcarr@wit.com>
2023-03-01 11:35:36 -06:00
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 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 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 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 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 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 2af6db4d6c GOOD: use global 'Stretchy' setting
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-11-04 02:23:41 -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 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 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 d6980daa81 BOX: kill GuiBox
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-10-31 21:07:36 -05:00
Jeff Carr f9c6083be4 BOX: keep removing GuiBox
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-10-31 20:07:26 -05:00
Jeff Carr b90d7b96c3 BOX: start removing GuiBox
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-10-31 19:39:57 -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 9dc8d79062 DEBUG: add DumpMap()
Signed-off-by: Jeff Carr <jcarr@wit.com>
2021-10-05 10:37:53 -05: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 584e3b60d4 make a buttonMap
Signed-off-by: Jeff Carr <jcarr@wit.com>
2019-06-02 22:22:04 -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 2af6fa52a4 finally cleaned out all protobuf references
this effort is almost done being 'cleaned'
of the code I started with. This library
is not perfect and lacks features from
andlabs/ui but it will work for our purposes

Signed-off-by: Jeff Carr <jcarr@wit.com>
2019-06-02 13:40:44 -07:00