WxAccessible Class Reference
-
Upload
anonymous-cmuzcnxun -
Category
Documents
-
view
214 -
download
0
Transcript of WxAccessible Class Reference
wxAccessible Class ReferenceMiscellaneous
#include <wx/access.h>
Inheritance diagram for wxAccessible:
[legend]
Detailed DescriptionThe wxAccessible class allows wxWidgets applications, and wxWidgets itself, to return extended information aboutuser interface elements to client applications such as screen readers.
This is the main way in which wxWidgets implements accessibility features.
At present, only Microsoft Active Accessibility is supported by this class.
To use this class, derive from wxAccessible, implement appropriate functions, and associate an object of the classwith a window using wxWindow::SetAccessible.
All functions return an indication of success, failure, or not implemented using values of the wxAccStatus enum type.
If you return wxACC_NOT_IMPLEMENTED from any function, the system will try to implement the appropriatefunctionality. However this will not work with all functions.
Most functions work with an object id, which can be zero to refer to 'this' UI element, or greater than zero to refer tothe nth child element. This allows you to specify elements that don't have a corresponding wxWindow orwxAccessible; for example, the sash of a splitter window.
For details on the semantics of functions and types, please refer to the Microsoft Active Accessibility 1.2documentation.
This class is compiled into wxWidgets only if the wxUSE_ACCESSIBILITY setup symbol is set to 1.
Availability: only available for the wxMSW port.
Library: wxCoreCategory: Miscellaneous
See AlsoAccessibility Sample
Public Member FunctionswxAccessible (wxWindow *win=NULL)Constructor, taking an optional window.
~wxAccessible ()
Generated on Tue Jul 16 2013 19:23:49 for wxWidgets by Doxygen 1.8.2
virtual wxAccStatus DoDefaultAction (int childId)Performs the default action for the object.
virtual wxAccStatus GetChild (int childId, wxAccessible **child)Gets the specified child (starting from 1).
virtual wxAccStatus GetChildCount (int *childCount)Returns the number of children in childCount.
virtual wxAccStatus GetDefaultAction (int childId, wxString *actionName)Gets the default action for this object (0) or a child (greater than 0).
virtual wxAccStatus GetDescription (int childId, wxString *description)Returns the description for this object or a child.
virtual wxAccStatus GetFocus (int *childId, wxAccessible **child)Gets the window with the keyboard focus.
virtual wxAccStatus GetHelpText (int childId, wxString *helpText)Returns help text for this object or a child, similar to tooltip text.
virtual wxAccStatus GetKeyboardShortcut (int childId, wxString *shortcut)Returns the keyboard shortcut for this object or child.
virtual wxAccStatus GetLocation (wxRect &rect, int elementId)Returns the rectangle for this object (id is 0) or a child element (id is greater than 0).
virtual wxAccStatus GetName (int childId, wxString *name)Gets the name of the specified object.
virtual wxAccStatus GetParent (wxAccessible **parent)Returns the parent of this object, or NULL.
virtual wxAccStatus GetRole (int childId, wxAccRole *role)Returns a role constant describing this object.
virtual wxAccStatus GetSelections (wxVariant *selections)Gets a variant representing the selected children of this object.
virtual wxAccStatus GetState (int childId, long *state)Returns a state constant.
virtual wxAccStatus GetValue (int childId, wxString *strValue)Returns a localized string representing the value for the object or child.
wxWindow * GetWindow ()Returns the window associated with this object.
virtual wxAccStatus HitTest (const wxPoint &pt, int *childId, wxAccessible **childObject)Returns a status value and object id to indicate whether the given point was on this or a childobject.
virtual wxAccStatus Navigate (wxNavDir navDir, int fromId, int *toId, wxAccessible **toObject)Navigates from fromId to toId or to toObject.
virtual wxAccStatus Select (int childId, wxAccSelectionFlags selectFlags)Selects the object or child.
void SetWindow (wxWindow *window)Sets the window associated with this object.
Public Member Functions inherited from wxObject
Static Public Member Functionsstatic void NotifyEvent (int eventType, wxWindow *window, wxAccObject objectType, int objectType)
Allows the application to send an event when something changes in an accessible object.
Additional Inherited Members
Constructor & Destructor Documentation
Constructor, taking an optional window.
The object can be associated with a window later.
Destructor.
Member Function Documentation
virtual
Performs the default action for the object.
childId is 0 (the action for this object) or greater than 0 (the action for a child).
ReturnswxACC_NOT_SUPPORTED if there is no default action for this window (e.g. an edit control).
virtual
Gets the specified child (starting from 1).
If child is NULL and the return value is wxACC_OK, this means that the child is a simple element and not anaccessible object.
virtual
Returns the number of children in childCount.
virtual
Gets the default action for this object (0) or a child (greater than 0).
Return wxACC_OK even if there is no action. actionName is the action, or the empty string if there is no action.The retrieved string describes the action that is performed on an object, not what the object does as a result. Forexample, a toolbar button that prints a document has a default action of "Press" rather than "Prints the currentdocument."
virtual
Returns the description for this object or a child.
virtual
Gets the window with the keyboard focus.
If childId is 0 and child is NULL, no object in this subhierarchy has the focus. If this object has the focus, childshould be 'this'.
virtual
Returns help text for this object or a child, similar to tooltip text.
virtual
Returns the keyboard shortcut for this object or child.
Returns e.g. ALT+K.
virtual
Returns the rectangle for this object (id is 0) or a child element (id is greater than 0).
rect is in screen coordinates.
virtual
Gets the name of the specified object.
virtual
Returns the parent of this object, or NULL.
virtual
Returns a role constant describing this object.
See wxAccRole for a list of these roles.
virtual
Gets a variant representing the selected children of this object.
Acceptable values are:
a null variant (IsNull() returns true)a list variant (GetType() == "list")an integer representing the selected child element, or 0 if this object is selected (GetType() == "long")a "void*" pointer to a wxAccessible child object
virtual
Returns a state constant.
See wxAccStatus for a list of these states.
virtual
Returns a localized string representing the value for the object or child.
Returns the window associated with this object.
virtual
Returns a status value and object id to indicate whether the given point was on this or a child object.
Can return either a child object, or an integer representing the child element, starting from 1.
pt is in screen coordinates.
virtual
Navigates from fromId to toId or to toObject.
static
Allows the application to send an event when something changes in an accessible object.
virtual
Selects the object or child.
See wxAccSelectionFlags for a list of the selection actions.
Sets the window associated with this object.