Documentation ¶
Overview ¶
Package gxui contains wrappers to make the gxui library act like a (git.sr.ht/~nelsam/vidar-lib/ui).Creator. This is provided as the default user interface in vidar, but *should* be overrideable.
Index ¶
- Constants
- func New(ctx context.Context, _ pref.Preferences) (ui.Creator, error)
- type Clipboard
- type Creator
- func (c *Creator) Clipboard(context.Context) (ui.Clipboard, error)
- func (c *Creator) Image(_ context.Context, i image.Image) (any, error)
- func (c *Creator) KeyName(_ context.Context, k input.Key) string
- func (c *Creator) Label(context.Context) (ui.Label, error)
- func (c *Creator) Layout(_ context.Context, opts ...ui.LayoutOpt) (ui.Layout, error)
- func (c *Creator) Quit(context.Context) error
- func (c *Creator) Run(ctx context.Context, f func(context.Context))
- func (c *Creator) Start(ctx context.Context, f func(context.Context))
- func (c *Creator) State(context.Context) (ui.State, error)
- func (c *Creator) TextBox(_ context.Context, opts ...ui.TextBoxOpt) (ui.TextBox, error)
- func (c *Creator) Window(ctx context.Context, title string, opts ...ui.WindowOpt) (ui.Window, error)
- type Editor
- func (e *Editor) CreateSuggestionList() gxui.List
- func (e *Editor) DesiredSize(min, max math.Size) math.Size
- func (e *Editor) KeyPress(gxui.KeyboardEvent) bool
- func (e *Editor) KeyStroke(gxui.KeyStrokeEvent) bool
- func (e *Editor) Name() string
- func (e *Editor) Paint(c gxui.Canvas)
- func (e *Editor) Scroll(ctx context.Context, typ ui.ScrollType, pos int) error
- func (e *Editor) SetSelections(_ context.Context, primary caret.Selection, secondary ...caret.Selection) error
- func (e *Editor) SetText(ctx context.Context, spans ...ui.Span) error
- func (e *Editor) Visible(ctx context.Context) ui.Box
- type InputBox
- func (b *InputBox) DesiredSize(min, max math.Size) math.Size
- func (b *InputBox) KeyPress(gxui.KeyboardEvent) bool
- func (b *InputBox) KeyStroke(gxui.KeyStrokeEvent) bool
- func (b *InputBox) Paint(c gxui.Canvas)
- func (b *InputBox) Scroll(ctx context.Context, typ ui.ScrollType, pos int) error
- func (b *InputBox) SetSelections(_ context.Context, primary caret.Selection, secondary ...caret.Selection) error
- func (b *InputBox) SetText(_ context.Context, spans ...ui.Span) error
- func (b *InputBox) Visible(ctx context.Context) ui.Box
- type Label
- type PanelHolder
- type State
- type TextMeta
Constants ¶
View Source
const ( ErrNoKeyHandler = constant.Error("gxui: no KeyHandler was provided to Creator.Window()") ErrNotControl = constant.Error("gxui: element is not a gxui.Control") )
View Source
const TextMetaKey = "vidar|edit-applier"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Creator ¶
type Creator struct {
// contains filtered or unexported fields
}
type Editor ¶
type Editor struct { mixins.CodeEditor // contains filtered or unexported fields }
func (*Editor) CreateSuggestionList ¶
func (*Editor) SetSelections ¶
type PanelHolder ¶
type PanelHolder interface { gxui.PanelHolder SelectedPanel() gxui.Control }
Click to show internal directories.
Click to hide internal directories.