类型 NativeSelectSnapshot

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

type NativeSelectSnapshot struct {
	ID          ui.ID
	Label       string
	Options     []NativeSelectOption
	Selection   NativeSelectSelection
	Value       string
	Display     string
	Placeholder string
	Hint        string
	Size        NativeSelectSize
	Open        bool
	Disabled    bool
	ReadOnly    bool
	Invalid     bool
	Focused     bool
}

NativeSelectSnapshot describes a closed or OS-open native select trigger. The application/platform owns options, selection, popup lifecycle, and input.

方法

SelectedOption#

func (snapshot NativeSelectSnapshot) SelectedOption() (NativeSelectOption, bool)

SelectedOption resolves the explicit caller-owned selection snapshot.

Semantics#

func (snapshot NativeSelectSnapshot) Semantics() NativeSelectSemantics

Semantics returns the allocation-free semantic state used by PaintNativeSelectSemantics and by platform adapters that need richer typed state than ui.Hit currently carries.