Tizen Native API
Dali::Toolkit::AccessibilityManager Class Reference

Manages registration of actors in an accessibility focus chain and changing the focused actor within that chain. More...

Inheritance diagram for Dali::Toolkit::AccessibilityManager:
Dali::BaseHandle

Public Types

enum  AccessibilityAttribute
 Accessibility needs four information which will be read by screen-reader. More...
enum  FocusOvershotDirection
 Overshoot direction. More...
typedef Signal< bool(AccessibilityManager &) > AccessibilityActionSignalType
 General accessibility action signal.
typedef Signal< bool(AccessibilityManager
&, const Dali::TouchEvent &)> 
AccessibilityActionScrollSignalType
 Scroll accessibility action signal.
typedef Signal< void(Actor,
Actor) > 
FocusChangedSignalType
 Focus changed signal.
typedef Signal< void(Actor,
FocusOvershotDirection) > 
FocusOvershotSignalType
 Focus overshooted signal.
typedef Signal< void(Actor) > FocusedActorActivatedSignalType
 Focused actor activated signal.

Public Member Functions

 AccessibilityManager ()
 Create a AccessibilityManager handle; this can be initialised with AccessibilityManager::New().
 ~AccessibilityManager ()
 Destructor.
void SetAccessibilityAttribute (Actor actor, AccessibilityAttribute type, const std::string &text)
 Set the information of the specified actor's accessibility attribute.
std::string GetAccessibilityAttribute (Actor actor, AccessibilityAttribute type) const
 Get the text of the specified actor's accessibility attribute.
void SetFocusOrder (Actor actor, const unsigned int order)
 Set the focus order of the actor.
unsigned int GetFocusOrder (Actor actor) const
 Get the focus order of the actor.
unsigned int GenerateNewFocusOrder () const
 Generates a new focus order number which can be used to assign to actors which need to be appended to the end of the current focus order chain.
Actor GetActorByFocusOrder (const unsigned int order)
 Get the actor that has the specified focus order.
bool SetCurrentFocusActor (Actor actor)
 Move the focus to the specified actor.
Actor GetCurrentFocusActor ()
 Get the current focused actor.
Actor GetCurrentFocusGroup ()
 Get the focus group of current focused actor.
unsigned int GetCurrentFocusOrder ()
 Get the focus order of currently focused actor.
bool MoveFocusForward ()
 Move the focus to the next focusable actor in the focus chain (according to the focus traversal order).
bool MoveFocusBackward ()
 Move the focus to the previous focusable actor in the focus chain (according to the focus traversal order).
void ClearFocus ()
 Clear the focus from the current focused actor if any, so that no actor is focused in the focus chain.
void Reset ()
 Clear the every registered focusable actor from focus-manager.
void SetFocusGroup (Actor actor, bool isFocusGroup)
 Set whether an actor is a focus group that can limit the scope of focus movement to its child actors in the focus chain.
bool IsFocusGroup (Actor actor) const
 Check whether the actor is set as a focus group or not.
void SetGroupMode (bool enabled)
 Set whether the group mode is enabled or not.
bool GetGroupMode () const
 Get whether the group mode is enabled or not.
void SetWrapMode (bool wrapped)
 Set whether focus will be moved to the beginning of the focus chain when it reaches the end or vice versa.
bool GetWrapMode () const
 Get whether the wrap mode is enabled or not.
void SetFocusIndicatorActor (Actor indicator)
 Set the focus indicator actor.
Actor GetFocusIndicatorActor ()
 Get the focus indicator actor.
Actor GetFocusGroup (Actor actor)
 Returns the closest ancestor of the given actor that is a focus group.
Vector2 GetReadPosition () const
 Returns the current position of the read action.
FocusChangedSignalTypeFocusChangedSignal ()
 This signal is emitted when the current focused actor is changed.
FocusOvershotSignalTypeFocusOvershotSignal ()
 This signal is emitted when there is no way to move focus further.
FocusedActorActivatedSignalTypeFocusedActorActivatedSignal ()
 This signal is emitted when the current focused actor is activated.
AccessibilityActionSignalTypeStatusChangedSignal ()
 This is emitted when accessibility(screen-reader) feature turned on or off.
AccessibilityActionSignalTypeActionNextSignal ()
 This is emitted when accessibility action is received to move focus to the next focusable actor (by one finger flick down).
AccessibilityActionSignalTypeActionPreviousSignal ()
 This is emitted when accessibility action is received to move focus to the previous focusable actor (by one finger flick up).
AccessibilityActionSignalTypeActionActivateSignal ()
 This is emitted when accessibility action is received to activate the current focused actor (by one finger double tap).
AccessibilityActionSignalTypeActionReadSignal ()
 This is emitted when accessibility action is received to focus and read the actor (by one finger tap).
AccessibilityActionSignalTypeActionOverSignal ()
 This is emitted when accessibility action is received to focus and read the actor (by one finger move).
AccessibilityActionSignalTypeActionReadNextSignal ()
 This is emitted when accessibility action is received to move focus to the next focusable actor (by one finger flick right).
AccessibilityActionSignalTypeActionReadPreviousSignal ()
 This is emitted when accessibility action is received to move focus to the previous focusable actor (by one finger flick left).
AccessibilityActionSignalTypeActionUpSignal ()
 This is emitted when accessibility action is received to change the value when the current focused actor is a slider (by double finger down and move up and right).
AccessibilityActionSignalTypeActionDownSignal ()
 This is emitted when accessibility action is received to change the value when the current focused actor is a slider (by double finger down and move down and left).
AccessibilityActionSignalTypeActionClearFocusSignal ()
 This is emitted when accessibility action is received to clear the focus from the current focused actor if any, so that no actor is focused in the focus chain.
AccessibilityActionSignalTypeActionBackSignal ()
 This is emitted when accessibility action is received to navigate back (by two fingers circle draw).
AccessibilityActionSignalTypeActionScrollUpSignal ()
 This is emitted when accessibility action is received to scroll up the list (by two finger swipe up).
AccessibilityActionSignalTypeActionScrollDownSignal ()
 This is emitted when accessibility action is received to scroll down the list (by two finger swipe down).
AccessibilityActionSignalTypeActionPageLeftSignal ()
 This is emitted when accessibility action is received to scroll left to the previous page (by two finger swipe left).
AccessibilityActionSignalTypeActionPageRightSignal ()
 This is emitted when accessibility action is received to scroll right to the next page (by two finger swipe right).
AccessibilityActionSignalTypeActionPageUpSignal ()
 This is emitted when accessibility action is received to scroll up to the previous page (by one finger swipe left and right).
AccessibilityActionSignalTypeActionPageDownSignal ()
 This is emitted when accessibility action is received to scroll down to the next page (by one finger swipe right and left).
AccessibilityActionSignalTypeActionMoveToFirstSignal ()
 This is emitted when accessibility action is received to move the focus to the first item on the screen (by one finger swipe up and down).
AccessibilityActionSignalTypeActionMoveToLastSignal ()
 This is emitted when accessibility action is received to move the focus to the last item on the screen (by one finger swipe down and up).
AccessibilityActionSignalTypeActionReadFromTopSignal ()
 This is emitted when accessibility action is received to focus and read from the first item on the top continously (by three fingers single tap).
AccessibilityActionSignalTypeActionReadFromNextSignal ()
 This is emitted when accessibility action is received to move the focus to and read from the next item continously (by three fingers double tap).
AccessibilityActionSignalTypeActionZoomSignal ()
 This is emitted when accessibility action is received to zoom (by one finger triple tap).
AccessibilityActionSignalTypeActionReadIndicatorInformationSignal ()
 This is emitted when accessibility action is received to read the information in the indicator (by two fingers triple tap).
AccessibilityActionSignalTypeActionReadPauseResumeSignal ()
 This is emitted when accessibility action is received to pause/resume the current speech (by two fingers single tap).
AccessibilityActionSignalTypeActionStartStopSignal ()
 This is emitted when accessibility action is received to start/stop the current action (by two fingers double tap).
AccessibilityActionScrollSignalTypeActionScrollSignal ()
 This is emitted when accessibility action is received to handle scroll event (by two fingers drag).

Static Public Member Functions

static AccessibilityManager Get ()
 Get the singleton of AccessibilityManager object.

Detailed Description

Manages registration of actors in an accessibility focus chain and changing the focused actor within that chain.

This class provides the functionality of registering the focus order and description of actors and maintaining the focus chain.

It provides functionality of setting the focus and moving the focus forward and backward. It also draws a highlight for the focused actor and emits a signal when the focus is changed.

Since :
2.4

Member Typedef Documentation

Scroll accessibility action signal.

The connected signal callback should return true if handled.

Since :
2.4

General accessibility action signal.

The connected signal callback should return true if handled.

Since :
2.4

Focus changed signal.

Since :
2.4

Focused actor activated signal.

Since :
2.4

Focus overshooted signal.

Since :
2.4

Member Enumeration Documentation

Accessibility needs four information which will be read by screen-reader.

Reading order : Label -> Trait -> Optional (Value and Hint)

Since :
2.4
Enumerator:
ACCESSIBILITY_LABEL 

Simple text which contained in ui-control.

Since :
2.4
ACCESSIBILITY_TRAIT 

Description of ui-control trait.

Since :
2.4
ACCESSIBILITY_VALUE 

Current value of ui-control (Optional)

Since :
2.4
ACCESSIBILITY_HINT 

Hint for action (Optional)

Since :
2.4
ACCESSIBILITY_ATTRIBUTE_NUM 

Number of attributes.

Since :
2.4

Overshoot direction.

Since :
2.4
Enumerator:
OVERSHOT_PREVIOUS 

Try to move previous of the first actor.

Since :
2.4
OVERSHOT_NEXT 

Try to move next of the last actor.

Since :
2.4

Constructor & Destructor Documentation

Create a AccessibilityManager handle; this can be initialised with AccessibilityManager::New().

Calling member functions with an uninitialised handle is not allowed.

Since :
2.4

Destructor.

This is non-virtual since derived Handle types must not contain data or virtual methods.

Since :
2.4

Member Function Documentation

This is emitted when accessibility action is received to activate the current focused actor (by one finger double tap).

A callback of the following type may be connected:

   bool YourCallback( AccessibilityManager& manager );
Since :
2.4
Returns:
The signal to connect to

This is emitted when accessibility action is received to navigate back (by two fingers circle draw).

A callback of the following type may be connected:

   bool YourCallback( AccessibilityManager& manager );
Since :
2.4
Returns:
The signal to connect to

This is emitted when accessibility action is received to clear the focus from the current focused actor if any, so that no actor is focused in the focus chain.

A callback of the following type may be connected:

   bool YourCallback( AccessibilityManager& manager );
Since :
2.4
Returns:
The signal to connect to

This is emitted when accessibility action is received to change the value when the current focused actor is a slider (by double finger down and move down and left).

A callback of the following type may be connected:

   bool YourCallback( AccessibilityManager& manager );
Since :
2.4
Returns:
The signal to connect to

This is emitted when accessibility action is received to move the focus to the first item on the screen (by one finger swipe up and down).

A callback of the following type may be connected:

   bool YourCallback( AccessibilityManager& manager );
Since :
2.4
Returns:
The signal to connect to

This is emitted when accessibility action is received to move the focus to the last item on the screen (by one finger swipe down and up).

A callback of the following type may be connected:

   bool YourCallback( AccessibilityManager& manager );
Since :
2.4
Returns:
The signal to connect to

This is emitted when accessibility action is received to move focus to the next focusable actor (by one finger flick down).

A callback of the following type may be connected:

   bool YourCallback( AccessibilityManager& manager );
Since :
2.4
Returns:
The signal to connect to

This is emitted when accessibility action is received to focus and read the actor (by one finger move).

A callback of the following type may be connected:

   bool YourCallback( AccessibilityManager& manager );
Since :
2.4
Returns:
The signal to connect to

This is emitted when accessibility action is received to scroll down to the next page (by one finger swipe right and left).

A callback of the following type may be connected:

   bool YourCallback( AccessibilityManager& manager );
Since :
2.4
Returns:
The signal to connect to

This is emitted when accessibility action is received to scroll left to the previous page (by two finger swipe left).

A callback of the following type may be connected:

   bool YourCallback( AccessibilityManager& manager );
Since :
2.4
Returns:
The signal to connect to

This is emitted when accessibility action is received to scroll right to the next page (by two finger swipe right).

A callback of the following type may be connected:

   bool YourCallback( AccessibilityManager& manager );
Since :
2.4
Returns:
The signal to connect to

This is emitted when accessibility action is received to scroll up to the previous page (by one finger swipe left and right).

A callback of the following type may be connected:

   bool YourCallback( AccessibilityManager& manager );
Since :
2.4
Returns:
The signal to connect to

This is emitted when accessibility action is received to move focus to the previous focusable actor (by one finger flick up).

A callback of the following type may be connected:

   bool YourCallback( AccessibilityManager& manager );
Since :
2.4
Returns:
The signal to connect to

This is emitted when accessibility action is received to move the focus to and read from the next item continously (by three fingers double tap).

A callback of the following type may be connected:

   bool YourCallback( AccessibilityManager& manager );
Since :
2.4
Returns:
The signal to connect to

This is emitted when accessibility action is received to focus and read from the first item on the top continously (by three fingers single tap).

A callback of the following type may be connected:

   bool YourCallback( AccessibilityManager& manager );
Since :
2.4
Returns:
The signal to connect to

This is emitted when accessibility action is received to read the information in the indicator (by two fingers triple tap).

A callback of the following type may be connected:

   bool YourCallback( AccessibilityManager& manager );
Since :
2.4
Returns:
The signal to connect to

This is emitted when accessibility action is received to move focus to the next focusable actor (by one finger flick right).

A callback of the following type may be connected:

   bool YourCallback( AccessibilityManager& manager );
Since :
2.4
Returns:
The signal to connect to

This is emitted when accessibility action is received to pause/resume the current speech (by two fingers single tap).

A callback of the following type may be connected:

   bool YourCallback( AccessibilityManager& manager );
Since :
2.4
Returns:
The signal to connect to

This is emitted when accessibility action is received to move focus to the previous focusable actor (by one finger flick left).

A callback of the following type may be connected:

   bool YourCallback( AccessibilityManager& manager );
Since :
2.4
Returns:
The signal to connect to

This is emitted when accessibility action is received to focus and read the actor (by one finger tap).

A callback of the following type may be connected:

   bool YourCallback( AccessibilityManager& manager );
Since :
2.4
Returns:
The signal to connect to

This is emitted when accessibility action is received to scroll down the list (by two finger swipe down).

A callback of the following type may be connected:

   bool YourCallback( AccessibilityManager& manager );
Since :
2.4
Returns:
The signal to connect to

This is emitted when accessibility action is received to handle scroll event (by two fingers drag).

A callback of the following type may be connected:

   bool YourCallback( AccessibilityManager& manager, const TouchEvent& event );
Since :
2.4
Returns:
The signal to connect to

This is emitted when accessibility action is received to scroll up the list (by two finger swipe up).

A callback of the following type may be connected:

   bool YourCallback( AccessibilityManager& manager );
Since :
2.4
Returns:
The signal to connect to

This is emitted when accessibility action is received to start/stop the current action (by two fingers double tap).

A callback of the following type may be connected:

   bool YourCallback( AccessibilityManager& manager );
Since :
2.4
Returns:
The signal to connect to

This is emitted when accessibility action is received to change the value when the current focused actor is a slider (by double finger down and move up and right).

A callback of the following type may be connected:

   bool YourCallback( AccessibilityManager& manager );
Since :
2.4
Returns:
The signal to connect to

This is emitted when accessibility action is received to zoom (by one finger triple tap).

A callback of the following type may be connected:

   bool YourCallback( AccessibilityManager& manager );
Since :
2.4
Returns:
The signal to connect to

Clear the focus from the current focused actor if any, so that no actor is focused in the focus chain.

It will emit focus changed signal without current focused actor.

Since :
2.4
Precondition:
The AccessibilityManager has been initialized.

This signal is emitted when the current focused actor is changed.

A callback of the following type may be connected:

   void YourCallbackName(Actor originalFocusedActor, Actor currentFocusedActor);
Since :
2.4
Returns:
The signal to connect to
Precondition:
The Object has been initialized.

This signal is emitted when the current focused actor is activated.

A callback of the following type may be connected:

   void YourCallbackName(Actor activatedActor);
Since :
2.4
Returns:
The signal to connect to
Precondition:
The Object has been initialized.

This signal is emitted when there is no way to move focus further.

A callback of the following type may be connected:

   void YourCallbackName(Actor currentFocusedActor, FocusOvershotDirection direction);
Since :
2.4
Returns:
The signal to connect to
Precondition:
The Object has been initialized.

Generates a new focus order number which can be used to assign to actors which need to be appended to the end of the current focus order chain.

The new number will be an increment over the very last focus order number in the focus chain. If the focus chain is empty then the function returns 1, else the number returned will be FOLast + 1 where FOLast is the focus order of the very last control in the focus chain.

Since :
2.4
Returns:
The focus order of the actor
Precondition:
The AccessibilityManager has been initialized.

Get the singleton of AccessibilityManager object.

Since :
2.4
Returns:
A handle to the AccessibilityManager control

Get the text of the specified actor's accessibility attribute.

Since :
2.4
Parameters:
actorThe actor to be queried
typeThe attribute type to be queried
Returns:
The text of the actor's accessibility information
Precondition:
The AccessibilityManager has been initialized.
The Actor has been initialized.

Get the actor that has the specified focus order.

It will return an empty handle if no actor in the stage has the specified focus order.

Since :
2.4
Parameters:
orderThe focus order of the actor
Returns:
The actor that has the specified focus order or an empty handle if no actor in the stage has the specified focus order.
Precondition:
The AccessibilityManager has been initialized.

Get the current focused actor.

Since :
2.4
Returns:
A handle to the current focused actor or an empty handle if no actor is focused.
Precondition:
The AccessibilityManager has been initialized.

Get the focus group of current focused actor.

Since :
2.4
Returns:
A handle to the immediate parent of the current focused actor which is also a focus group, or an empty handle if no actor is focused.
Precondition:
The AccessibilityManager has been initialized.

Get the focus order of currently focused actor.

Since :
2.4
Returns:
The focus order of the currently focused actor or 0 if no actor is in focus.
Precondition:
The AccessibilityManager has been initialized.

Returns the closest ancestor of the given actor that is a focus group.

Since :
2.4
Parameters:
actorThe actor to be checked for its focus group
Returns:
The focus group the given actor belongs to or an empty handle if the given actor doesn't belong to any focus group.

Get the focus indicator actor.

Since :
2.4
Returns:
A handle to the focus indicator actor
Precondition:
The AccessibilityManager has been initialized.

Get the focus order of the actor.

When the focus order is 0, it means the focus order of the actor is undefined.

Since :
2.4
Parameters:
actorThe actor to be queried
Returns:
The focus order of the actor
Precondition:
The AccessibilityManager has been initialized.
The Actor has been initialized.

Get whether the group mode is enabled or not.

Since :
2.4
Returns:
Whether the group mode is enabled or not.
Precondition:
The AccessibilityManager has been initialized.

Returns the current position of the read action.

Since :
2.4
Returns:
The current event position

Get whether the wrap mode is enabled or not.

Since :
2.4
Returns:
Whether the wrap mode is enabled or not.
Precondition:
The AccessibilityManager has been initialized.

Check whether the actor is set as a focus group or not.

Since :
2.4
Parameters:
actorThe actor to be checked
Returns:
Whether the actor is set as a focus group.
Precondition:
The AccessibilityManager has been initialized.
The Actor has been initialized.

Move the focus to the previous focusable actor in the focus chain (according to the focus traversal order).

When the focus movement is wrapped around, the focus will be moved to the last focusable actor when it reaches the beginning of the focus chain.

Since :
2.4
Returns:
True if the moving was successful
Precondition:
The AccessibilityManager has been initialized.

Move the focus to the next focusable actor in the focus chain (according to the focus traversal order).

When the focus movement is wrapped around, the focus will be moved to the first focusable actor when it reaches the end of the focus chain.

Since :
2.4
Returns:
True if the moving was successful
Precondition:
The AccessibilityManager has been initialized.

Clear the every registered focusable actor from focus-manager.

Since :
2.4
Precondition:
The AccessibilityManager has been initialized.

Reimplemented from Dali::BaseHandle.

Set the information of the specified actor's accessibility attribute.

Since :
2.4
Parameters:
actorThe actor the text to be set with
typeThe attribute type the text to be set with
textThe text for the actor's accessibility information
Precondition:
The AccessibilityManager has been initialized.
The Actor has been initialized.

Move the focus to the specified actor.

Only one actor can be focused at the same time. The actor must have a defined focus order and must be focusable, visible and in the stage.

Since :
2.4
Parameters:
actorThe actor to be focused
Returns:
Whether the focus is successful or not
Precondition:
The AccessibilityManager has been initialized.
The Actor has been initialized.
void Dali::Toolkit::AccessibilityManager::SetFocusGroup ( Actor  actor,
bool  isFocusGroup 
)

Set whether an actor is a focus group that can limit the scope of focus movement to its child actors in the focus chain.

Since :
2.4
Parameters:
actorThe actor to be set as a focus group
isFocusGroupWhether to set the actor to be a focus group or not.
Precondition:
The AccessibilityManager has been initialized.
The Actor has been initialized.

Set the focus indicator actor.

This will replace the default focus indicator actor in AccessibilityManager and will be added to the focused actor as a highlight.

Since :
2.4
Parameters:
indicatorThe indicator actor to be added
Precondition:
The AccessibilityManager has been initialized.
The indicator actor has been initialized.
void Dali::Toolkit::AccessibilityManager::SetFocusOrder ( Actor  actor,
const unsigned int  order 
)

Set the focus order of the actor.

The focus order of each actor in the focus chain is unique. If there is another actor assigned with the same focus order already, the new actor will be inserted to the focus chain with that focus order, and the focus order of the original actor and all the actors followed in the focus chain will be increased accordingly. If the focus order assigned to the actor is 0, it means that actor's focus order is undefined (e.g. the actor has a description but with no focus order being set yet) and therefore that actor is not focusable.

Since :
2.4
Parameters:
actorThe actor the focus order to be set with
orderThe focus order of the actor
Precondition:
The AccessibilityManager has been initialized.
The Actor has been initialized.

Set whether the group mode is enabled or not.

When the group mode is enabled, the focus movement will be limited to the child actors of the current focus group including the current focus group itself. The current focus group is the closest ancestor of the current focused actor that set as a focus group.

Since :
2.4
Parameters:
enabledWhether the group mode is enabled or not.
Precondition:
The AccessibilityManager has been initialized.

Set whether focus will be moved to the beginning of the focus chain when it reaches the end or vice versa.

When both the wrap mode and the group mode are enabled, focus will be wrapped within the current focus group. Focus will not be wrapped in default.

Since :
2.4
Parameters:
wrappedWhether the focus movement is wrapped around or not.
Precondition:
The AccessibilityManager has been initialized.

This is emitted when accessibility(screen-reader) feature turned on or off.

A callback of the following type may be connected:

   bool YourCallback( AccessibilityManager& manager );
Since :
2.4
Returns:
The signal to connect to