diff options
| author | Jeff Carr <[email protected]> | 2022-10-19 13:23:22 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2022-10-19 13:23:22 -0500 |
| commit | f3af1f5b7ff78b3f73d7510622fc9633dec36d35 (patch) | |
| tree | e4868584d5e19942938aaa122b2e1cab377db000 /doc.go | |
| parent | f7b1036e544238d65b0e3ad46d08075aa4177032 (diff) | |
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()
Diffstat (limited to 'doc.go')
| -rw-r--r-- | doc.go | 30 |
1 files changed, 23 insertions, 7 deletions
@@ -1,13 +1,22 @@ /* Package gui implements a abstraction layer for Go visual elements in -a cross platform way. +a cross platform and library independent way. (hopefully this is will work) A quick overview of the features, some general design guidelines and principles for how this package should generally work: - * GUI elements are stored in a tree of nodes - * When in doubt, it's ok to guess. We will return something close. - * It tries to make your code simple +Definitions: + + * Toolkit: the underlying library (MacOS gui, Windows gui, gtk, qt, etc) + * Node: A binary tree of all the underlying GUI toolkit elements + +Principles: + + * Make code using this package simple to use + * When in doubt, search upward in the binary tree + * It's ok to guess. We will return something close. + * Hide complexity internally here + * Isolate the GUI toolkit Quick Start @@ -22,11 +31,11 @@ sections below for further details on formatting and configuration options. ) func main() { - gui.Main(initGUI) + gui.Main(helloworld) } // This initializes the first window - func initGUI() { + func helloworld() { gui.Config.Title = "Hello World golang wit/gui Window" gui.Config.Width = 640 gui.Config.Height = 480 @@ -42,7 +51,7 @@ sections below for further details on formatting and configuration options. groupNode1.AddComboBox("demoCombo2", "more 1", "more 2", "more 3") } -Toolkit Usage +Toolkits (hopefully more than one will work) Right now, this abstraction is built on top of the go package 'andlabs/ui' which does the cross platform support. @@ -63,5 +72,12 @@ Debugging To dump variables with full newlines, indentation, type, and pointer information this uses spew.Dump() +Bugs + +"The author's idea of friendly may differ to that of many other people." + +-- manpage quote from the excellent minimalistic window manager 'evilwm' + + */ package gui |
