BeginCommand#
func BeginCommand(canvas *ui.Canvas, theme ui.Theme, bounds ui.Rect, options CommandOptions) CommandBeginCommand paints the command surface and input row.
API 文档由 Go 源码生成,内容为英文。
type Command struct {
// list lays the results out under the input row, scrolled by options.Scroll.
}Command paints one command snapshot. Filtering, selection, and keyboard movement remain explicit application state.
BeginCommand#func BeginCommand(canvas *ui.Canvas, theme ui.Theme, bounds ui.Rect, options CommandOptions) CommandBeginCommand paints the command surface and input row.
AddEmpty#func (command *Command) AddEmpty(label string) ui.RectAddEmpty paints the official centered empty-result state (`py-6 text-sm`).
AddGroup#func (command *Command) AddGroup(label string) ui.RectAddGroup paints an official compact group heading.
AddItem#func (command *Command) AddItem(item CommandItem) ui.RectAddItem paints one command result with selected, checked, and disabled state. The rectangle is empty when the row is scrolled out of the list.
AddSeparator#func (command *Command) AddSeparator() ui.RectAddSeparator paints the one-pixel group divider.
Bounds#func (command Command) Bounds() ui.RectBounds returns the command surface geometry.
End#func (command *Command) End()End paints the scrollbar of a list whose results did not all fit, after the last result. A list that fits needs no End.
NextItemBounds#func (command Command) NextItemBounds() ui.RectNextItemBounds returns the next result row without mutating paint state.