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

Method StateIs

core/flags.go:15–17  ·  view source on GitHub ↗

StateIs returns whether the widget has the given [states.States] flag set.

(state states.States)

Source from the content-addressed store, hash-verified

13
14// StateIs returns whether the widget has the given [states.States] flag set.
15func (wb *WidgetBase) StateIs(state states.States) bool {
16 return wb.Styles.State.HasFlag(state)
17}
18
19// AbilityIs returns whether the widget has the given [abilities.Abilities] flag set.
20func (wb *WidgetBase) AbilityIs(able abilities.Abilities) bool {

Callers 15

IsVisibleMethod · 0.95
handleWidgetClickMethod · 0.95
IsDisabledMethod · 0.95
IsReadOnlyMethod · 0.95
RowGrabFocusMethod · 0.80
newMenuSceneFunction · 0.80
InitMethod · 0.80
RenderWidgetMethod · 0.80
SelectMethod · 0.80
UnselectMethod · 0.80
selectUpdateMethod · 0.80
UnselectEventMethod · 0.80

Calls 1

HasFlagMethod · 0.65

Tested by

no test coverage detected