类型 Role

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

type Role uint8

Role describes the platform-neutral semantic purpose of an interactive hit.

常量

const (
	RoleButton Role = iota + 1
	RoleLink
	RoleCheckbox
	RoleRadio
	RoleTab
	RoleMenuItem
	RoleCombobox
	RoleSwitch
	RoleTextField
	RoleSlider
	// RoleTerminal is a character-cell terminal. While it has focus the
	// keyboard is raw (see KeyEvent) and the application's text input is a
	// preedit surface at the cursor (see app.TextInput.Terminal).
	RoleTerminal
	// RoleGroup names a non-actionable region that belongs together, such as a
	// scroll viewport or a hover card's body. It can take focus but does not
	// activate with Enter or Space.
	RoleGroup
	// The popup container roles below belong to one surface, not to a control.
	// They are declared with Canvas.Container.
	RoleMenu
	RoleMenubar
	RoleListBox
	RoleOption
	RoleGrid
	RoleGridCell
	RoleHeading
	RoleStatus
	RoleSeparator
)