126 bool isCheckable() const noexcept {
return isFlagSet (Flags::checkable); }
132 bool isChecked() const noexcept {
return isFlagSet (Flags::checked); }
138 bool isCollapsed() const noexcept {
return isFlagSet (Flags::collapsed); }
144 bool isExpandable() const noexcept {
return isFlagSet (Flags::expandable); }
150 bool isExpanded() const noexcept {
return isFlagSet (Flags::expanded); }
156 bool isFocusable() const noexcept {
return isFlagSet (Flags::focusable); }
162 bool isFocused() const noexcept {
return isFlagSet (Flags::focused); }
168 bool isIgnored() const noexcept {
return isFlagSet (Flags::ignored); }
180 bool isSelectable() const noexcept {
return isFlagSet (Flags::selectable); }
186 bool isSelected() const noexcept {
return isFlagSet (Flags::selected); }
197 checkable = (1 << 0),
199 collapsed = (1 << 2),
200 expandable = (1 << 3),
202 focusable = (1 << 5),
205 multiSelectable = (1 << 8),
206 selectable = (1 << 9),
207 selected = (1 << 10),
208 accessibleOffscreen = (1 << 11)
211 [[nodiscard]] AccessibleState withFlag (
int flag)
const noexcept
219 bool isFlagSet (
int flag)
const noexcept
221 return (flags & flag) != 0;
Represents the state of an accessible UI element.
bool isCollapsed() const noexcept
Returns true if the UI element is collapsed.
bool isExpandable() const noexcept
Returns true if the UI element is expandable.
bool isAccessibleOffscreen() const noexcept
Returns true if the UI element is accessible offscreen.
AccessibleState withFocusable() const noexcept
Sets the focusable flag and returns the new state.
bool isMultiSelectable() const noexcept
Returns true if the UI element supports multiple item selection.
bool isChecked() const noexcept
Returns true if the UI element is checked.
bool isFocusable() const noexcept
Returns true if the UI element is focusable.
AccessibleState withExpandable() const noexcept
Sets the expandable flag and returns the new state.
AccessibleState withCheckable() const noexcept
Sets the checkable flag and returns the new state.
AccessibleState withAccessibleOffscreen() const noexcept
Sets the accessible offscreen flag and returns the new state.
bool isSelectable() const noexcept
Returns true if the UI element is selectable.
AccessibleState withSelectable() const noexcept
Sets the selectable flag and returns the new state.
AccessibleState withSelected() const noexcept
Sets the selected flag and returns the new state.
AccessibleState withFocused() const noexcept
Sets the focused flag and returns the new state.
AccessibleState withExpanded() const noexcept
Sets the expanded flag and returns the new state.
AccessibleState()=default
Constructor.
AccessibleState withChecked() const noexcept
Sets the checked flag and returns the new state.
bool isFocused() const noexcept
Returns true if the UI element is focused.
bool isExpanded() const noexcept
Returns true if the UI element is expanded.
bool isSelected() const noexcept
Returns true if the UI element is selected.
bool isIgnored() const noexcept
Returns true if the UI element is ignored.
AccessibleState withIgnored() const noexcept
Sets the ignored flag and returns the new state.
AccessibleState withCollapsed() const noexcept
Sets the collapsed flag and returns the new state.
AccessibleState withMultiSelectable() const noexcept
Sets the multiSelectable flag and returns the new state.
bool isCheckable() const noexcept
Returns true if the UI element is checkable.