Documentation
¶
Overview ¶
Package configui derives a guigui settings UI from a plain Go struct.
Index ¶
- type CustomGroup
- type CustomWidget
- type Editor
- func (e *Editor[T]) Build(context *guigui.Context, adder *guigui.ChildAdder) error
- func (e *Editor[T]) IsOpen() bool
- func (e *Editor[T]) Layout(context *guigui.Context, widgetBounds *guigui.WidgetBounds, ...)
- func (e *Editor[T]) OnClose(f func(context *guigui.Context, reason basicwidget.PopupCloseReason))
- func (e *Editor[T]) SetOpen(open bool)
- func (e *Editor[T]) SetTarget(v *T)
- type Enum
- type EnumOption
- type MapTable
- func (t *MapTable) Build(context *guigui.Context, adder *guigui.ChildAdder) error
- func (t *MapTable) ClearSelection()
- func (t *MapTable) Layout(context *guigui.Context, widgetBounds *guigui.WidgetBounds, ...)
- func (t *MapTable) Measure(context *guigui.Context, constraints guigui.Constraints) image.Point
- func (t *MapTable) OnRowSelected(f func(id string))
- func (t *MapTable) SetHeaders(buttonHeader, inputHeader string)
- func (t *MapTable) SetRows(rows []MapTableRow)
- type MapTableRow
- type PadConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomGroup ¶
type CustomGroup interface {
NewConfigWidget() CustomWidget
}
type CustomWidget ¶
type Editor ¶
type Editor[T any] struct { guigui.DefaultWidget // contains filtered or unexported fields }
Editor is a modal settings overlay for a configuration struct T. Open it from a menu (or anywhere else) with Editor.SetOpen. Editing a field in the UI mutates *target directly through reflection.
func (*Editor[T]) Layout ¶
func (e *Editor[T]) Layout(context *guigui.Context, widgetBounds *guigui.WidgetBounds, layouter *guigui.ChildLayouter)
func (*Editor[T]) OnClose ¶
func (e *Editor[T]) OnClose(f func(context *guigui.Context, reason basicwidget.PopupCloseReason))
type Enum ¶
type Enum interface {
EnumOptions() []EnumOption
}
type EnumOption ¶
type MapTable ¶
type MapTable struct {
guigui.DefaultWidget
// contains filtered or unexported fields
}
func (*MapTable) ClearSelection ¶
func (t *MapTable) ClearSelection()
ClearSelection drops the highlighted row. The table reports a click only when the selection changes, so a row left selected cannot be chosen again.
func (*MapTable) Layout ¶
func (t *MapTable) Layout(context *guigui.Context, widgetBounds *guigui.WidgetBounds, layouter *guigui.ChildLayouter)
func (*MapTable) OnRowSelected ¶
func (*MapTable) SetHeaders ¶
func (*MapTable) SetRows ¶
func (t *MapTable) SetRows(rows []MapTableRow)
type MapTableRow ¶
type MapTableRow struct {
ID, Label, Value string
}
Click to show internal directories.
Click to hide internal directories.