[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Controls' (#lcl)

TLazAccessibleObject

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Represents an accessible object with which the user of a accessibility tool can interact.

Declaration

Source position: controls.pp line 987

type TLazAccessibleObject = class end;

protected

  FChildrenSortedForDataObject: TAvlTree;

  FAccessibleDescription: TCaption;

  FAccessibleValue: TCaption;

  FAccessibleRole: TLazAccessibilityRole;

  class procedure WSRegisterClass; virtual;

  function GetAccessibleValue; virtual;

public

  OwnerControl: TControl;

  

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: TLazAccessibleObject;

  

The parent TLazAccessibleObject of this accessible object

  DataObject: TObject;

  

Available to be used to connect to an object

  SecondaryHandle: PtrInt;

  

Available for Widgetsets to use

  constructor Create(); virtual;

  destructor Destroy; override;

  function HandleAllocated;

  

Returns if the handle of this object was already allocated or not

  procedure InitializeHandle; virtual;

  

Utilized to set all properties of this property via widgetset routines when creating the handle

  procedure SetAccessibleDescription();

  

Setter for the property AccessibleDescription

  procedure SetAccessibleValue();

  

Setter for the property AccessibleValue

  procedure SetAccessibleRole();

  

Setter for the property AccessibleRole

  function FindOwnerWinControl;

  

Inspect the tree of accessible objects upwards until it finds a parent which is attached directly to a windowed control, a TWinControl

  function AddChildAccessibleObject; virtual;

  

Creates a new child accessible object and returns it

  procedure InsertChildAccessibleObject();

  

Inserts an already created child accessible object as a child of this one

  procedure ClearChildAccessibleObjects;

  

Removes all children of this control. It will free them if they are not attached to a TControl

  procedure RemoveChildAccessibleObject();

  

Removes a child accessible object

  function GetChildAccessibleObjectWithDataObject();

  

Obtains a child accessible object by its DataObject property

  function GetChildAccessibleObjectsCount;

  

Returns the number of direct children that this accessible object has

  function GetChildAccessibleObject();

  

Obtains a child accessible object by its index

  function GetFirstChildAccessibleObject;

  function GetNextChildAccessibleObject;

  function GetSelectedChildAccessibleObject; virtual;

  

Returns the currently selected child accessible object or nil if none are selected. Override this method in your sub class.

  function GetChildAccessibleObjectAtPos(); virtual;

  

Returns the child of this control located at a particular position given as a client position of the control

  property AccessibleDescription: TCaption; [rw]

  

The description of this accessible object

  property AccessibleValue: TCaption; [rw]

  

The value of this accessible object

  property AccessibleRole: TLazAccessibilityRole; [rw]

  

The role of this accessible object

  property Position: TPoint; [rw]

  

The position of this accessible object

  property Size: TSize; [rw]

  

The size of this accessible object

  property Handle: PtrInt; [rw]

  

The widgetset handle of this accessible object

  function GetEnumerator;

  

Default enumerator for the children

Inheritance

TLazAccessibleObject

  

Represents an accessible object with which the user of a accessibility tool can interact.

|

TObject

Description

Every TControl has a TLazAccessibleObject instace 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 utilized, while TCustomControl descendents will have their accessibility taken care by the LCL itself. User applications should add accessibility for their own TCustomControl descendent classes and also possibly customize the descriptions of some elements. It is also possible to make an accessible object invisible for user, which is done by setting its AccessibleRole property to larIgnored.

Accessibility support in Lazarus is also documented in the wiki in http://wiki.lazarus.freepascal.org/LCL_Accessibility

See also

TControl

  

The base class for visible controls.

TControl.AccessibleRole

  

The accessible role of the control which classifies what kind of object this is. See TLazAccessibilityRole for a list of possible values

TControl.AccessibleDescription

  

The accessible description of the control.This should describe the role of the control, for example for TLabel it could be "a text caption".

TControl.AccessibleValue

  

The accessible value of the control. For example, for a TLabel it would be the same as the Caption property of the label.

TLazAccessibilityRole

  

Indicates the role which a accessible object takes in the user interface

The latest version of this document can be found at lazarus-ccr.sourceforge.net.