Documentation ¶
Index ¶
- Variables
- func ArgToolkit() string
- func Indent(b bool, a ...interface{})
- func NoGui() bool
- func StandardExit()
- func Watchdog()
- type ArgsGui
- type Grid
- type GridOffset
- type Node
- func (n *Node) AddText(str string) bool
- func (parent *Node) Append(n *Node)
- func (n *Node) AppendText(str string)
- func (n *Node) At(w int, h int) *Node
- func (n *Node) Bool() bool
- func (parent *Node) Box() *Node
- func (n *Node) Checked() bool
- func (n *Node) Children() []*Node
- func (n *Node) CloseToolkit(name string) bool
- func (n *Node) Default() *Node
- func (n *Node) Delete(d *Node)
- func (n *Node) Disable() *Node
- func (n *Node) Draw() *Node
- func (n *Node) Dump()
- func (n *Node) Enable() *Node
- func (n *Node) Expand() *Node
- func (n *Node) GetProgName() string
- func (n *Node) Hidden() bool
- func (n *Node) Hide() *Node
- func (n *Node) Horizontal() *Node
- func (n *Node) InitEmbed(resFS embed.FS) *Node
- func (n *Node) Int() int
- func (n *Node) IsMirror() bool
- func (n *Node) ListChildren(dump bool)
- func (n *Node) ListToolkits()
- func (n *Node) LoadToolkit(name string) (*Node, error)
- func (n *Node) LoadToolkitEmbed(name string, b []byte) *Node
- func (n *Node) Margin() *Node
- func (parent *Node) Mirror(m *Node) *Node
- func (parent *Node) NewBox(progname string, b bool) *Node
- func (parent *Node) NewButton(name string, custom func()) *Node
- func (parent *Node) NewCheckbox(name string) *Node
- func (parent *Node) NewCombobox() *Node
- func (parent *Node) NewDropdown() *Node
- func (parent *Node) NewEntryLine(name string) *Node
- func (parent *Node) NewEntrybox(name string) *Node
- func (parent *Node) NewGrid(progname string, w int, h int) *Node
- func (parent *Node) NewGroup(name string) *Node
- func (parent *Node) NewHorizontalBox(progname string) *Node
- func (parent *Node) NewImage(name string) *Node
- func (parent *Node) NewLabel(text string) *Node
- func (parent *Node) NewSeparator(progname string) *Node
- func (parent *Node) NewSlider(progname string, x int, y int) *Node
- func (parent *Node) NewSpinner(progname string, x int, y int) *Node
- func (parent *Node) NewTextbox(name string) *Node
- func (parent *Node) NewVerticalBox(progname string) *Node
- func (parent *Node) NewWindow(title string) *Node
- func (n *Node) NextRow() *Node
- func (n *Node) Pad() *Node
- func (n *Node) Parent() *Node
- func (n *Node) ParentVisable() bool
- func (parent *Node) RawGrid() *Node
- func (parent *Node) RawWindow(title string) *Node
- func (n *Node) Ready() bool
- func (n *Node) SetBool(b bool)
- func (n *Node) SetChecked(b bool) *Node
- func (n *Node) SetExpand(b bool) *Node
- func (n *Node) SetInt(i int)
- func (n *Node) SetLabel(label string) *Node
- func (n *Node) SetProgName(s string) *Node
- func (n *Node) SetRefName(s string) *Node
- func (n *Node) SetText(text string) *Node
- func (n *Node) SetVisable(b bool)
- func (n *Node) Show() *Node
- func (n *Node) StandardClose()
- func (n *Node) StandardExit()
- func (n *Node) String() string
- func (n *Node) Strings() []string
- func (n *Node) TestDraw()
- func (n *Node) Unmargin() *Node
- func (n *Node) Unpad() *Node
- func (n *Node) Vertical() *Node
- func (n *Node) WindowVisable() bool
- type RangeMovedToWidget
- type Symbol
- type Widget
Constants ¶
This section is empty.
Variables ¶
var CHANGE *log.LogFlag
var GUI *log.LogFlag
var GUIVERSION string
var INFO *log.LogFlag
var NODE *log.LogFlag
var NOW *log.LogFlag
var PLUG *log.LogFlag
var WARN *log.LogFlag
Functions ¶
func ArgToolkit ¶ added in v0.9.5
func ArgToolkit() string
used for command line options. This allows you to control the toolkit settings from the command line
--debugger # opens the debugger --gui andlabs # loads the GTK toolkit on linux or Cocoa on mac --gui gocui # runs your program in the terminal in ncurses-like mode
func StandardExit ¶
func StandardExit()
The window is destroyed and the application exits TODO: properly exit the plugin since Quit() doesn't do it
Types ¶
type ArgsGui ¶ added in v0.9.5
type ArgsGui struct { NoGui bool `arg:"--no-gui" help:"ignore all these gui problems"` GuiPlugin string `arg:"--gui" help:"Use this gui toolkit [andlabs,gocui,nocui,stdin]"` GuiVerbose bool `arg:"--gui-verbose" help:"enable all logging"` }
This struct can be used with the go-arg package. These are the generic default command line arguments for the 'GUI' package
type GridOffset ¶ added in v0.12.16
type Node ¶
type Node struct { WidgetType widget.WidgetType // this function is run when there are mouse or keyboard events Custom func() // used for anything that needs a range (for example: a slider) X int Y int // the grid widget max width and height // the max height can be implemented in the toolkit plugin // to restrict the number of rows to display W int H int // where the next widget should be put in this grid NextW int NextH int // if this widget is in a grid, this is the position of a widget AtW int AtH int // contains filtered or unexported fields }
func New ¶
func New() *Node
There should only be one of these per application This is due to restrictions by being cross platform some toolkit's on some operating systems don't support more than one Keep things simple. Do the default expected thing whenever possible
func RawBox ¶ added in v0.20.8
func RawBox() *Node
this is an experiment. I like to think of this package like 'Sierpinski' It's like it's in a fractional dimension because it doesn't exist the toolkits are the things that make it visible to us. Here, we can think abstractly about how the data is formed make something that can't be seen at all
func TreeRoot ¶ added in v0.12.19
func TreeRoot() *Node
returns the root of the binary tree change the names to 'Tree' as I think the name is better
func (*Node) AddText ¶
add a new text string to widgets that support multiple string values These must be unique. return false if the string already exists
func (*Node) AppendText ¶
appends text to the existing text TODO: this is an experiement
func (*Node) CloseToolkit ¶
func (*Node) Enable ¶
enables a widget so the user can see it and work/click/etc on it by default, widgets are enabled when they are created
func (*Node) GetProgName ¶ added in v0.12.16
func (*Node) Horizontal ¶ added in v0.12.19
func (*Node) ListChildren ¶
func (n *Node) ListChildren(dump bool, dropdown *Node, mapNodes map[string]*Node) {
func (*Node) ListToolkits ¶
func (n *Node) ListToolkits()
func (*Node) Mirror ¶ added in v0.20.8
an experiemental idea basically, this is like a cell in a spreadsheet that is viable in one place but also exists sonewhere else
func (*Node) NewCheckbox ¶
func (*Node) NewCombobox ¶
func (*Node) NewDropdown ¶
func (*Node) NewEntryLine ¶
func (*Node) NewEntrybox ¶ added in v0.20.1
func (*Node) NewGroup ¶
TODO: make a "Group" a "Grid" ? probably since right now group is just a pre-canned andlabs/ui gtk,macos,windows thing
func (*Node) NewHorizontalBox ¶ added in v0.12.16
func (*Node) NewSeparator ¶ added in v0.12.16
func (*Node) NewTextbox ¶
func (*Node) NewVerticalBox ¶ added in v0.12.16
func (*Node) ParentVisable ¶ added in v0.13.1
returns true if the parent is not visable to the user in which case events are not sent to the toolkit
func (*Node) RawWindow ¶ added in v0.12.16
allow window create without actually sending it to the toolkit
func (*Node) SetChecked ¶ added in v0.12.18
func (*Node) SetLabel ¶ added in v0.12.18
This will set the visable name for widgets that have text displayed that is not editable by the user For example, a button, window, group, checkbox
func (*Node) SetProgName ¶ added in v0.12.16
func (*Node) SetRefName ¶ added in v0.22.2
should get the reference name used for programming and debugging
TODO: ensure these are unique and make a way to look them up myButton = myGroup.NewButton("hit ball", nil).SetName("HIT") myButton.GetName() should return "HIT" n = Find("HIT") should return myButton
switch to this todo: there are better ways than any of this once protobuf
func (*Node) SetText ¶
What "SetText" means depends on the type of widget should this be a different name?
func (*Node) SetVisable ¶ added in v0.12.19
func (*Node) StandardClose ¶
func (n *Node) StandardClose()
The window is destroyed but the application does not quit
func (*Node) StandardExit ¶ added in v0.12.16
func (n *Node) StandardExit()
The window is destroyed and the application exits TODO: properly exit the plugin since Quit() doesn't do it
func (*Node) TestDraw ¶ added in v0.12.16
func (n *Node) TestDraw()
when a window is redrawn, every widget in the window needs to be sent to the toolkit
func (*Node) WindowVisable ¶ added in v0.12.19
returns true if the window is not visable to the user in which case events are not sent to the toolkit TODO: fix this so ParentVisable() works
type RangeMovedToWidget ¶ added in v0.12.16
Range(1, 10) includes the values 1 and 10 almost all toolkits use integers so there doesn't seem to be a good idea to use 'type any' here as it just makes things more complicated for no good reason
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cloudflare
module
|
|
debugger
module
|
|
digitalocean
module
|
|
gadgets
module
|
|
repostatus
Module
|
|
gui
module
|
|
lib
|
|
cloudflare
Module
|
|
linuxstatus
Module
|
|
logsettings
Module
|
|
repostatus
Module
|
|
toolkits
module
|
|
widget
module
|