MCPcopy Create free account
hub / github.com/cogentcore/core / AbilityIs

Method AbilityIs

core/flags.go:20–22  ·  view source on GitHub ↗

AbilityIs returns whether the widget has the given [abilities.Abilities] flag set.

(able abilities.Abilities)

Source from the content-addressed store, hash-verified

18
19// AbilityIs returns whether the widget has the given [abilities.Abilities] flag set.
20func (wb *WidgetBase) AbilityIs(able abilities.Abilities) bool {
21 return wb.Styles.Abilities.HasFlag(able)
22}
23
24// SetState sets the given [states.State] flags to the given value.
25func (wb *WidgetBase) SetState(on bool, state ...states.States) *WidgetBase {

Callers 13

InitMethod · 0.95
handleWidgetClickMethod · 0.95
SetFocusMethod · 0.95
SetFocusEventMethod · 0.95
focusableInThisMethod · 0.45
handlePosEventMethod · 0.45
topLongHoverMethod · 0.45
FocusNextFromMethod · 0.45
focusOnOrNextMethod · 0.45
focusOnOrPrevMethod · 0.45

Calls 1

HasFlagMethod · 0.65

Tested by

no test coverage detected