Documentation ¶
Index ¶
- func Hide()
- func NewTab(name string, handle ValueControl)
- func Register(name string, config interface{}) error
- func Show()
- func Start(windowname string, width, height int)
- func StartDefaults()
- func Stop()
- type CloseFunc
- type ControlCloseWrapper
- func (c *ControlCloseWrapper) AddClosers(closer ...io.Closer)
- func (c ControlCloseWrapper) Destroy()
- func (c ControlCloseWrapper) Disable()
- func (c ControlCloseWrapper) Enable()
- func (c ControlCloseWrapper) Enabled() bool
- func (c ControlCloseWrapper) Handle() uintptr
- func (c ControlCloseWrapper) Hide()
- func (c ControlCloseWrapper) LibuiControl() uintptr
- func (c ControlCloseWrapper) Show()
- func (c ControlCloseWrapper) Visible() bool
- type Label
- type LabeledGuiField
- type StrictValueControlFunc
- type StructTagProperties
- type UpdateNotifier
- type ValueControl
- type ValueControlFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTab ¶
func NewTab(name string, handle ValueControl)
NewTab creates a new tab in the configuration window
Types ¶
type CloseFunc ¶
type CloseFunc func() error
CloseFunc is a function type implementing the io.Closer interface
type ControlCloseWrapper ¶
ControlCloseWrapper acts as a ui.Control and supports close functions. This can be used to wrap a control and run a close function when the control gets destroyed.
func NewControlCloseWrapper ¶
func NewControlCloseWrapper(child ui.Control) *ControlCloseWrapper
NewControlCloseWrapper creates a ControlCloseWrapper with the given control type as child element
func (*ControlCloseWrapper) AddClosers ¶
func (c *ControlCloseWrapper) AddClosers(closer ...io.Closer)
AddClosers adds the given io.Closer objects to the ControlCloseWrapper container
func (ControlCloseWrapper) Destroy ¶
func (c ControlCloseWrapper) Destroy()
func (ControlCloseWrapper) Disable ¶
func (c ControlCloseWrapper) Disable()
func (ControlCloseWrapper) Enable ¶
func (c ControlCloseWrapper) Enable()
func (ControlCloseWrapper) Enabled ¶
func (c ControlCloseWrapper) Enabled() bool
func (ControlCloseWrapper) Handle ¶
func (c ControlCloseWrapper) Handle() uintptr
func (ControlCloseWrapper) Hide ¶
func (c ControlCloseWrapper) Hide()
func (ControlCloseWrapper) LibuiControl ¶
func (c ControlCloseWrapper) LibuiControl() uintptr
func (ControlCloseWrapper) Show ¶
func (c ControlCloseWrapper) Show()
func (ControlCloseWrapper) Visible ¶
func (c ControlCloseWrapper) Visible() bool
type LabeledGuiField ¶
type LabeledGuiField struct { Label ValueControl Factory ValueControl }
func (LabeledGuiField) Create ¶
func (l LabeledGuiField) Create() ui.Control
type StrictValueControlFunc ¶
StrictValueControlFunc is a variant of ValueControlFunc which panics when the function returns an error
func (StrictValueControlFunc) Create ¶
func (s StrictValueControlFunc) Create() ui.Control
Create implements ValueControl
type StructTagProperties ¶
type StructTagProperties struct { Name Label `json:"name,omitempty"` Type string `json:"type,omitempty"` Min int `json:"min,omitempty"` Max int `json:"max,omitempty"` Resolution int `json:"resolution,omitempty"` Horizontal bool `json:"horizontal,omitempty"` Index int `json:"index,omitempty"` Labels []Label `json:"labels,omitempty"` }
StructTagProperties represents the values supported in a uiconf struct tag
func DefaultProperties ¶
func DefaultProperties() StructTagProperties
func ParseStructTag ¶
func ParseStructTag(tag string) (properties StructTagProperties, err error)
ParseStructTag returns a new StructTagProperties object with the contents from tag
func (*StructTagProperties) Parse ¶
func (properties *StructTagProperties) Parse(tag string) error
Parse decodes the json format tag string into the current properties pointer
type UpdateNotifier ¶
type UpdateNotifier interface {
// OnValueChanged will be called when the user changes the value using the graphical interface
OnValueChanged()
}
UpdateNotifier is an interface type a user can implement to get notified when a value changes
type ValueControl ¶
ValueControl specifies an object which can create a ui.Control
func MakeValueControl ¶
func MakeValueControl(object interface{}) (ValueControl, error)
func MakeValueControlFromValue ¶
func MakeValueControlFromValue(value reflect.Value, properties StructTagProperties) (ValueControl, error)
type ValueControlFunc ¶
ValueControlFunc accepts functions that create ui.Control objects the wrapping functions will be run in the ui thread
func (ValueControlFunc) Create ¶
func (v ValueControlFunc) Create() ui.Control
Create implements ValueControl