JUCE: AccessibilityActions Class Reference

JUCE

Public Member Functions | List of all members
AccessibilityActions Class Reference
juce_gui_basics » accessibility

A simple wrapper for building a collection of supported accessibility actions and corresponding callbacks for a UI element. More...

`#include <juce_AccessibilityActions.h>`

## Public Member Functions
| AccessibilityActions ()=default
| Constructor. More...
AccessibilityActions & | addAction (AccessibilityActionType type, std::function< void()> actionCallback)
| Adds an action. More...
bool | contains (AccessibilityActionType type) const
| Returns true if the specified action is supported. More...
bool | invoke (AccessibilityActionType type) const
| If an action has been registered for the provided action type, invokes the action and returns true. More...

## Detailed Description

A simple wrapper for building a collection of supported accessibility actions and corresponding callbacks for a UI element.

Pass one of these when constructing an `AccessibilityHandler` to enable users to interact with a UI element via the supported actions.

## Constructor & Destructor Documentation

## ◆ AccessibilityActions()

AccessibilityActions::AccessibilityActions | ( |  | ) |
| default

Constructor.

Creates a default AccessibilityActions object with no action callbacks.

## Member Function Documentation

## ◆ addAction()

AccessibilityActions & AccessibilityActions::addAction | ( | AccessibilityActionType | type,
|  | std::function< void()> | actionCallback
| ) |  |

Adds an action.

When the user performs this action with an accessibility client `actionCallback` will be called.

Returns a reference to itself so that several calls can be chained.

## ◆ contains()

bool AccessibilityActions::contains | ( | AccessibilityActionType | type | ) | const

Returns true if the specified action is supported.

References gl::type.

## ◆ invoke()

bool AccessibilityActions::invoke | ( | AccessibilityActionType | type | ) | const

If an action has been registered for the provided action type, invokes the action and returns true.

Otherwise, returns false.

References gl::type.

The documentation for this class was generated from the following file:

- juce_AccessibilityActions.h