Navigation
API > API/Runtime > API/Runtime/ApplicationCore
Platform and application-agnostic messaging system for accessible events. The message handler lives in GenericApplication and any subclass that wishes to support accessibility should subclass this and use GenericAppliation::SetAccessibleMessageHandler to enable functionality.
GetAccessibleWindow() is the entry point to all accessible widgets. Once the window is retrieved, it can be queried for children in various ways. RaiseEvent() allows messages to bubble back up to the native OS through anything bound to the AccessibleEventDelegate.
Callers can use ApplicationIsAccessible() to see if accessibility is supported or not. Alternatively, calling GetAccessibleWindow and seeing if the result is valid should provide the same information.
Callers should also use GetAccessibleUserRegistry() to register and interact with accessible users. Accessible users must be registered with the set accessible user registry for the rest of the application to be able to retrieve and interact with the accessible users.
| Name | FGenericAccessibleMessageHandler |
| Type | class |
| Header File | /Engine/Source/Runtime/ApplicationCore/Public/GenericPlatform/Accessibility/GenericAccessibleInterfaces.h |
| Include Path | #include "GenericPlatform/Accessibility/GenericAccessibleInterfaces.h" |
Syntax
class FGenericAccessibleMessageHandler
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FGenericAccessibleMessageHandler() |
GenericPlatform/Accessibility/GenericAccessibleInterfaces.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FGenericAccessibleMessageHandler() |
GenericPlatform/Accessibility/GenericAccessibleInterfaces.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FAccessibleEvent | TBaseDelegate_OneParam< void, const FAccessibleEventArgs & > | A delegate accessible event handlers such as platform accessibility APIs can listen for accessibility events raised by widgets. | GenericPlatform/Accessibility/GenericAccessibleInterfaces.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AccessibleEventDelegate | FAccessibleEvent | Delegate for the platform layer to listen to widget events | GenericPlatform/Accessibility/GenericAccessibleInterfaces.h | |
| AccessibleUserRegistry | TSharedRef< FGenericAccessibleUserRegistry > | Registry for all accessible users in the application. | GenericPlatform/Accessibility/GenericAccessibleInterfaces.h | |
| bIsActive | bool | Whether or not accessibility is currently enabled in the application | GenericPlatform/Accessibility/GenericAccessibleInterfaces.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool ApplicationIsAccessible() |
Subclasses should return true to indicate that they support accessibility. | GenericPlatform/Accessibility/GenericAccessibleInterfaces.h | |
| Retrieves the accessible user registry. | GenericPlatform/Accessibility/GenericAccessibleInterfaces.h | ||
| Retrieves the accessible user registry. | GenericPlatform/Accessibility/GenericAccessibleInterfaces.h | ||
virtual TSharedPtr< IAccessibleWidget > GetAccessibleWidgetFromId
(
AccessibleWidgetId Id |
Retrieves an accessible widget that matches the given identifier. | GenericPlatform/Accessibility/GenericAccessibleInterfaces.h | |
virtual TSharedPtr< IAccessibleWidget > GetAccessibleWindow
(
const TSharedRef< FGenericWindow >& InWindow |
Creates or retrieves an accessible object for a native OS window. | GenericPlatform/Accessibility/GenericAccessibleInterfaces.h | |
virtual AccessibleWidgetId GetAccessibleWindowId
(
const TSharedRef< FGenericWindow >& InWindow |
Creates or retrieves the identifier for an accessible object for a native OS window. | GenericPlatform/Accessibility/GenericAccessibleInterfaces.h | |
bool IsActive () |
Checks if accessibility is enabled in the application. | GenericPlatform/Accessibility/GenericAccessibleInterfaces.h | |
virtual void MakeAccessibleAnnouncement
(
const FString& AnnouncementString |
Request a string to be announced to the user. | GenericPlatform/Accessibility/GenericAccessibleInterfaces.h | |
void RaiseEvent
(
const FAccessibleEventArgs& Args |
Push an event from an accessible widget back to the platform layer. | GenericPlatform/Accessibility/GenericAccessibleInterfaces.h | |
virtual void RunInThread
(
const TFunction< void()>& Function, |
Request a function to be run in a particular thread. | GenericPlatform/Accessibility/GenericAccessibleInterfaces.h | |
void SetAccessibleEventDelegate
(
const FAccessibleEvent& Delegate |
Assign a function to be called whenever an accessible event is raised. | GenericPlatform/Accessibility/GenericAccessibleInterfaces.h | |
void SetAccessibleUserRegistry
(
const TSharedRef< FGenericAccessibleUserRegistry >& InAccessibleUserRegistry |
Sets a new accessible user registry for the application. | GenericPlatform/Accessibility/GenericAccessibleInterfaces.h | |
void SetActive
(
bool bActive |
Notify the application to start or stop processing accessible messages from the platform layer. | GenericPlatform/Accessibility/GenericAccessibleInterfaces.h | |
void UnbindAccessibleEventDelegate() |
Unbinds the delegate called during accessible events if it is bound. | GenericPlatform/Accessibility/GenericAccessibleInterfaces.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void OnActivate() |
Triggered when bIsActive changes from false to true. | GenericPlatform/Accessibility/GenericAccessibleInterfaces.h | |
virtual void OnDeactivate() |
Triggered when bIsActive changes from true to false. | GenericPlatform/Accessibility/GenericAccessibleInterfaces.h |