TLazAccessibleObject class
Represents an accessibility object for user or accessibility tool interactions.
Declaration
TLazAccessibleObject = classDescription
Every TControl has a TLazAccessibleObject instance
associated with it, which means that every TControl is potentially
accessible. But to actually be usable, the accessible object needs to have
its properties set, the most important of which are the role, description and
value. Native windowed classes should already receive accessibility
properties from the underlying widgetset, while TCustomControl
descendants will use the accessibility properties provided by LCL itself.
User applications should add accessibility for their own
TCustomControl descendant classes, and possibly customize the
descriptions of some elements. It is also possible to make an accessible
object invisible to the user, which is done by setting its AccessibleRole
property to larIgnored.
Accessibility support in Lazarus is also documented on the Wiki at: https://wiki.lazarus.freepascal.org/LCL_Accessibility.
See also
Properties
AccessibleName | public | The name for this accessible object. |
AccessibleDescription | public | The description of this accessible object. |
AccessibleValue | public | The value of this accessible object. |
AccessibleRole | public | The role of this accessible object. |
Position | public | The position of this accessible object. |
Size | public | The size of this accessible object. |
Handle | public | The widgetset handle of this accessible object. |
Methods
WSRegisterClass | protected | Registers this component class with the current WidgetSet. |
GetAccessibleValue | protected | Gets the value for the AccessibleValue property. |
GetHandle | protected | Gets the value for the Handle property. |
Create | public | Constructor for the class instance. |
Destroy | public | Destructor for the class instance. |
HandleAllocated | public | Returns if the handle of this object was already allocated or not. |
InitializeHandle | public | Utilized to set all properties of this property via widgetset routines when creating the handle. |
SetAccessibleName | public | Sets the value for AccessibleName. |
SetAccessibleDescription | public | Setter for the property AccessibleDescription. |
SetAccessibleValue | public | Setter for the property AccessibleValue. |
SetAccessibleRole | public | Setter for the property AccessibleRole. |
FindOwnerWinControl | public | Inspect the tree of accessible objects upwards until it finds a parent which is attached directly to a windowed control, a TWinControl. |
AddChildAccessibleObject | public | Creates and returns a new child accessibility object. |
InsertChildAccessibleObject | public | Inserts an already created child accessible object as a child of this one. |
ClearChildAccessibleObjects | public | Removes all children of this control; freed if they are not attached to a TControl instance. |
RemoveChildAccessibleObject | public | Removes a child accessible object. |
GetChildAccessibleObjectWithDataObject | public | Obtains a child accessible object by its DataObject property. |
GetChildAccessibleObjectsCount | public | Returns the number of direct children that this accessible object has. |
GetChildAccessibleObject | public | Obtains a child accessible object by its index. |
GetFirstChildAccessibleObject | public | Searches in sub-controls for the first child accessibility object. |
GetNextChildAccessibleObject | public | Searches in sub-controls for the next child accessibility object. |
GetSelectedChildAccessibleObject | public | Returns the currently selected child accessible object or Nil if none are selected; Override this method in your sub class. |
GetChildAccessibleObjectAtPos | public | Returns the child of this control located at a particular position given as a client position for the control. |
GetEnumerator | public | Default enumerator for the children. |
Fields
FHandle | protected | Member with the Handle for the accessibility object. |
FChildrenSortedForDataObject | protected | Member with the AVL tree for the sorted child objects. |
FAccessibleName | protected | Member with the value for AccessibleName. |
FAccessibleDescription | protected | Member with the value for AccessibleDescription. |
FAccessibleValue | protected | Member with the value for AccessibleValue. |
FAccessibleRole | protected | Member with the value for AccessibleRole. |
OwnerControl | public | The control that this accessible object is attached to. It might be the main accessible object of this control or it might represent a sub-part of a control. |
Parent | public | The parent TLazAccessibleObject of this accessible object. |
DataObject | public | Available to be used to connect to an object. |
SecondaryHandle | public | Available for Widgetsets to use. |
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
