type ColorSwatch struct {
// contains filtered or unexported fields
}
ColorSwatch is a circular color choice. The caller owns its selection and
supplies a stable ID and accessible name. A transparent color means no color.
Constructors
BeginColorSwatch#
func BeginColorSwatch(canvas *ui.Canvas, theme ui.Theme, id ui.ID, bounds ui.Rect, color ui.Color) ColorSwatch
BeginColorSwatch centers a color disc inside bounds, leaving room for its
selection and keyboard focus rings. The full bounds are the hit target.
Methods
Disabled#
func (s ColorSwatch) Disabled() ColorSwatch
Label#
func (s ColorSwatch) Label(label string) ColorSwatch
Paint#
func (s ColorSwatch) Paint() ColorSwatchResult
Paint declares a keyboard-accessible radio choice. Its ring communicates
selection independently of the color, including the no-color choice.
Selected#
func (s ColorSwatch) Selected(selected bool) ColorSwatch
TabStop#
func (s ColorSwatch) TabStop(tabStop bool) ColorSwatch
TabStop says whether Tab may enter this choice. A radio set gives its
selected choice the tab stop, marks the others false, and uses
RadioGroupKeyDown for arrow navigation.