2021-09-01 21:16:18 -05:00
|
|
|
# list of examples:
|
|
|
|
```
|
|
|
|
# shell things
|
|
|
|
cd example-nohup; go install # minimum golang 'cmd'
|
|
|
|
cd example-expect; go install # traditional 'expect' shell automation
|
|
|
|
cd example-shell; go install # a tty wrapper
|
|
|
|
cd example-gocui-mouse; go install # mouse interaction
|
|
|
|
cd example-gocui-active; go install # ytalk
|
|
|
|
cd example-gocui-colorstrue; go install # shell colors
|
|
|
|
cd example-gocui-dynamic; go install # interactive movement
|
|
|
|
|
|
|
|
# GUI things
|
|
|
|
cd example-systray; go install # an example systray menu (cross platform)
|
|
|
|
cd example-ui-splash; go install # an example GUI with drop down menus, etc
|
|
|
|
cd example-ui-controlgallery; go install # an example GUI with drop down menus, etc
|
|
|
|
cd example-ui-radiobutton; go install # slidebars, lists, radio buttons
|
|
|
|
cd example-ui-table; go install # spreadsheet
|
|
|
|
cd example-ui-show-hide; go install # toggle hide, show
|
|
|
|
|
|
|
|
# wit/gui things
|
|
|
|
cd example-gui; go install # an example using the wit/gui wrapper
|
|
|
|
|
|
|
|
# misc
|
|
|
|
cd example-lookupAAAA; go install # nslookup
|
|
|
|
cd example-json-decode; go install # raw golang byte handling
|
|
|
|
cd example-ssh; go install # scp example
|
|
|
|
|
|
|
|
# golang things
|
|
|
|
cd example-flag; go install # process argv
|
|
|
|
cd example-pprof; go install # dump out go process internals
|
|
|
|
cd example-protobuf; go install # convert json into golang protobuf struct
|
|
|
|
cd example-bench-fast-timer; go install # time golang channels
|
|
|
|
cd example-bench-readWriteOps; go install # uses channels to time select
|
|
|
|
```
|
|
|
|
|
|
|
|
# example-ui-*
|
2019-06-13 19:53:47 -05:00
|
|
|
|
2021-08-08 20:59:13 -05:00
|
|
|
This is a set of demo apps that use the AndLabs UI toolkit.
|
|
|
|
It also uses a wrapper around it that puts all the gtk elements
|
|
|
|
in a structure so they can all be accessed.
|
2019-06-13 19:53:47 -05:00
|
|
|
|
2021-08-08 20:59:13 -05:00
|
|
|
This code should compile and work on Linux, MacOS and Windows.
|
2019-06-13 19:53:47 -05:00
|
|
|
|
2021-08-08 20:59:13 -05:00
|
|
|
It is very *alpha*.
|
2019-06-13 19:53:47 -05:00
|
|
|
|
|
|
|
# IMPORTANT NOTES
|
|
|
|
|
|
|
|
To use the cross platform UI, all GUI interactions must be
|
|
|
|
done from within the same goroutine for it to work properly
|
|
|
|
on Windows. This is an annoying limitation of how Windows works
|
|
|
|
(or so it appears. maybe someone will figure out how to fix that)
|
|
|
|
|
|
|
|
This means the Windows version of this GUI will probably always
|
|
|
|
be sub-par verses the Linux and Macintosh versions
|
|
|
|
|
2021-09-01 20:07:52 -05:00
|
|
|
# clone
|
2019-06-13 19:53:47 -05:00
|
|
|
|
|
|
|
```
|
2021-09-01 12:57:18 -05:00
|
|
|
go get -v -t -u git.wit.org/jcarr/golang-examples
|
2021-09-01 20:07:52 -05:00
|
|
|
```
|
|
|
|
|
|
|
|
# prep (download all the golang build dependancies)
|
|
|
|
|
|
|
|
```
|
2021-09-01 12:57:18 -05:00
|
|
|
cd ~/go/src/git.wit.org/jcarr/golang-examples
|
2021-09-01 20:07:52 -05:00
|
|
|
witgoget='-v -t -u' make prep
|
|
|
|
```
|
|
|
|
|
|
|
|
# build
|
|
|
|
```
|
2021-09-01 12:57:18 -05:00
|
|
|
make build
|
2019-06-13 19:53:47 -05:00
|
|
|
```
|
|
|
|
|
2021-08-08 20:35:57 -05:00
|
|
|
# screenshots
|
2021-09-01 20:36:49 -05:00
|
|
|
## example-ui-table
|
|
|
|
![test image](example-ui-table/screenshot.png)
|
|
|
|
## example-ui-radiobutton
|
|
|
|
![test image](example-ui-radiobutton/capture.gif)
|
2021-08-08 22:24:42 -05:00
|
|
|
## example-systray
|
2021-09-01 20:41:56 -05:00
|
|
|
![test image](example-systray/capture.gif)
|
2021-08-08 22:24:42 -05:00
|
|
|
![test image](example-systray/capture.mp4)
|
2021-08-08 22:35:10 -05:00
|
|
|
![test image](example-systray/capture.webm)
|
2021-08-08 20:35:57 -05:00
|
|
|
|
2019-06-13 19:53:47 -05:00
|
|
|
# License
|
|
|
|
|
|
|
|
This is a GPL 3.0 Project.
|
|
|
|
|
|
|
|
# Credits
|
|
|
|
|
|
|
|
* All the GO developers & Google
|
|
|
|
* The andlabs people that made the golang cross platform UI
|
|
|
|
* All the kernel, KVM and QEMU developers
|
2021-09-01 21:16:18 -05:00
|
|
|
|