48 state = state.withCheckable();
51 state = state.withChecked();
83 bool isReadOnly()
const override {
return true; }
84 String getCurrentValueAsString()
const override {
return button.getToggleState() ?
"On" :
"Off"; }
85 void setValueAsString (
const String&)
override {}
94 static bool isRadioButton (
const Button& button)
noexcept
99 static AccessibilityActions getAccessibilityActions (Button& button)
102 [&button] { button.triggerClick(); });
104 if (button.isToggleable())
106 [&button] { button.setToggleState (! button.getToggleState(),
sendNotification); });
111 static Interfaces getAccessibilityInterfaces (Button& button)
113 if (button.isToggleable())
114 return { std::make_unique<ButtonValueInterface> (button) };
Base class for accessible Components.
virtual AccessibleState getCurrentState() const
Returns the current state of the UI element.
virtual String getTitle() const
The title of the UI element.
A value interface that represents a text value.
Represents the state of an accessible UI element.
@ sendNotification
Requests a notification message, either synchronous or not.
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...
@ toggle
Represents a "toggle" action.
@ press
Represents a "press" action.
AccessibilityRole
The list of available roles for an AccessibilityHandler object.