AbilityIs returns whether the widget has the given [abilities.Abilities] flag set.
(able abilities.Abilities)
| 18 | |
| 19 | // AbilityIs returns whether the widget has the given [abilities.Abilities] flag set. |
| 20 | func (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. |
| 25 | func (wb *WidgetBase) SetState(on bool, state ...states.States) *WidgetBase { |
no test coverage detected