JUCE  v6.1.6 (6.0.8-1114)
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::AccessibilityActions Class Reference

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

#include <juce_AccessibilityActions.h>

Collaboration diagram for juce::AccessibilityActions:

Public Member Functions

 AccessibilityActions ()=default
 Constructor. More...
 
AccessibilityActionsaddAction (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...
 

Private Attributes

std::map< AccessibilityActionType, std::function< void()> > actionMap
 

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.

@tags{Accessibility}

Constructor & Destructor Documentation

◆ AccessibilityActions()

juce::AccessibilityActions::AccessibilityActions ( )
default

Constructor.

Creates a default AccessibilityActions object with no action callbacks.

Member Function Documentation

◆ addAction()

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

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.

References juce::gl::type.

◆ contains()

bool juce::AccessibilityActions::contains ( AccessibilityActionType  type) const
inline

Returns true if the specified action is supported.

References juce::gl::type.

◆ invoke()

bool juce::AccessibilityActions::invoke ( AccessibilityActionType  type) const
inline

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

Otherwise, returns false.

References juce::gl::type.

Member Data Documentation

◆ actionMap

std::map<AccessibilityActionType, std::function<void()> > juce::AccessibilityActions::actionMap
private

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