Documentation
¶
Index ¶
- Variables
- func BlankWindow(w *ui.Window) *ui.Box
- func GetDebugToolkit() bool
- func Main(f func())
- func Queue(f func())
- func SetDebugToolkit(s bool)
- type Toolkit
- func (t *Toolkit) AddDropdown(title string)
- func (t *Toolkit) AddTab(name string) *Toolkit
- func (t Toolkit) Checked() bool
- func (t *Toolkit) DemoNumbersPage()
- func (t *Toolkit) Dump()
- func (t *Toolkit) ErrorWindow(msg1 string, msg2 string)
- func (t *Toolkit) GetBox() *ui.Box
- func (t *Toolkit) GetText() string
- func (t *Toolkit) MessageWindow(msg1 string, msg2 string)
- func (t *Toolkit) NewBox() *Toolkit
- func (t Toolkit) NewButton(name string) *Toolkit
- func (t Toolkit) NewCheckbox(name string) *Toolkit
- func (t *Toolkit) NewDropdown(title string) *Toolkit
- func (t Toolkit) NewGroup(title string) *Toolkit
- func (t *Toolkit) NewLabel(name string) *Toolkit
- func (t Toolkit) NewSlider(title string, x int, y int) *Toolkit
- func (t Toolkit) NewSpinner(title string, x int, y int) *Toolkit
- func (t Toolkit) NewTextbox(name string) *Toolkit
- func (t Toolkit) SetDropdown(i int)
- func (t *Toolkit) SetText(s string) bool
- func (t *Toolkit) SetValue(i int) bool
- func (t *Toolkit) SetWindowTitle(title string)
- func (t *Toolkit) String() string
- func (t *Toolkit) Value() int
Constants ¶
This section is empty.
Variables ¶
var DebugToolkit bool
Functions ¶
func Main ¶
func Main(f func())
func Queue ¶
func Queue(f func())
Other goroutines must use this to access the GUI
You can not acess / process the GUI thread directly from other goroutines. This is due to the nature of how Linux, MacOS and Windows work (they all work differently. suprise. surprise.)
For example: Queue(NewWindow())
Types ¶
type Toolkit ¶
type Toolkit struct { Name string Width int Height int OnChanged func(*Toolkit) OnExit func(*Toolkit) Custom func() UiWindowBad *ui.Window // contains filtered or unexported fields }
stores the raw toolkit internals
func (*Toolkit) AddTab ¶
This adds a tab
andlabs/ui is goofy in the sense that you have to determine if the ui.Window already has a tab in it. If it does, then you need to add this tab and not run SetChild() on the window or instead it replaces the existing tab with the new one
I work around this by always sending a Toolkit that is a tab once there is one. If you send a Window here, it will replace any existing tabs rather than adding a new one
Source Files
¶
- box.go
- button.go
- checkbox.go
- common.go
- demo.go
- dropdown.go
- group.go
- label.go
- main.go
- slider.go
- spinner.go
- structs.go
- tab.go
- textbox.go
- window.go