类型 SelectOptions

API 文档由 Go 源码生成,内容为英文。

type SelectOptions struct {
	TriggerID   ui.ID
	Label       string
	Value       string
	Placeholder string
	Hint        string
	Open        bool
	Disabled    bool
	Invalid     bool
	Size        SelectSize
	// Icon, when it has any geometry, is painted before the trigger's value. A
	// single-color icon takes the value's color; a multi-color one keeps its own.
	Icon      ui.Icon
	Content   ui.Rect
	Layer     uint16
	Scope     ui.ID
	DismissID ui.ID
	// Viewport, with DismissID, makes the open popup declare a hit over the
	// whole window behind its surface, so pressing anywhere outside it,
	// including the trigger, reports DismissID (Escape reports it too). Leave
	// it empty to dismiss only on Escape and handle outside presses yourself.
	Viewport ui.Rect
	// Scroll is the scroll position of a popup whose items do not all fit its
	// Content (see MenuScroll); without one such a popup shows only the items at
	// its top. Keep it for as long as the popup is open and reset it when it opens.
	Scroll *MenuScroll
}

SelectOptions describes application-owned trigger and popup state.