Clicked#
func (result ToggleResult) Clicked() boolClicked reports whether this paint is delivering a click on the toggle.
API 文档由 Go 源码生成,内容为英文。
type ToggleResult struct {
// contains filtered or unexported fields
}ToggleResult is what painting a toggle reports back. Clicked is true in the event pass of a click on it (see ui.Canvas.Clicked), so the code that declares a toggle is the code that flips it:
if components.BeginToggle(canvas, theme, bold, bounds, m.bold).Default("B").Clicked() {
m.bold = !m.bold
}Clicked#func (result ToggleResult) Clicked() boolClicked reports whether this paint is delivering a click on the toggle.