LibreOffice LibreOffice 6.2 SDK API Reference

Public Member Functions | List of all members
XAccessibleContext Interface Reference

Implement this interface for exposing various aspects of a class's content. More...

`import"XAccessibleContext.idl";`

Inheritance diagram for XAccessibleContext:

## Public Member Functions
long | getAccessibleChildCount ()
| Return the number of children. More...
XAccessible | getAccessibleChild ([in] long i) raises (::com::sun::star::lang::IndexOutOfBoundsException)
| Returns the i-th child of this object. More...
XAccessible | getAccessibleParent ()
| Returns the parent of this object. More...
long | getAccessibleIndexInParent ()
| Returns the index of this object in its accessible parent. More...
short | getAccessibleRole ()
| Returns the role of this object. More...
string | getAccessibleDescription ()
| Returns the object's description. More...
string | getAccessibleName ()
| Return the object's localized name. More...
XAccessibleRelationSet | getAccessibleRelationSet ()
| Returns the set of relations defined for this object. More...
XAccessibleStateSet | getAccessibleStateSet ()
| Returns the set of states that are currently active for this object. More...
::com::sun::star::lang::Locale | getLocale () raises (IllegalAccessibleComponentStateException)
| Returns the locale of the component. More...
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object. More...
void | acquire ()
| increases the reference counter by one. More...
void | release ()
| decreases the reference counter by one. More...

## Detailed Description

Implement this interface for exposing various aspects of a class's content.

This interface serves two purposes: On the one hand it gives access to the tree structure in which all accessible objects are organized. Each node in this tree supports this interface. On the other hand it gives access to objects that expose the represented content. That are role, state, name, description, and relations to other objects. Take an OK button of a dialog as an example. Its role is AccessibleRole::BUTTON, its name is "OK", and its description is something like "Accepts all changes made in the dialog".

Since
  OOo 1.1.2

## Member Function Documentation

## ◆ getAccessibleChild()

XAccessible getAccessibleChild | ( | [in] long | i | ) |
raises | ( | ::com::sun::star::lang::IndexOutOfBoundsException
| ) |  |

Returns the i-th child of this object.

The order in which the children are enumerated is implementation dependent.

Parameters

  i | The index may have any value. If it is outside the range from 0 to n-1, with n being the number of children as returned by XAccessibleContext::getAccessibleChild() an empty reference is returned.

Returns
  If the object has an i-th child the returned value is a reference to that child. Otherwise an empty reference is returned.

Exceptions

  com::sun::star::lang::IndexOutOfBoundsException | If no child with the given index exists then an com::sun::star::lang::IndexOutOfBoundsException exception is thrown.

## ◆ getAccessibleChildCount()

long getAccessibleChildCount | ( |  | ) |

Return the number of children.

Returns the number of accessible children of the object.

Returns
  The returned value is non-negative.

## ◆ getAccessibleDescription()

string getAccessibleDescription | ( |  | ) |

Returns the object's description.

Returns the object's localized description. The description should complement the more generic descriptions given by an object's role and name.

Returns
  The returned string is the object's localized description.

## ◆ getAccessibleIndexInParent()

long getAccessibleIndexInParent | ( |  | ) |

Returns the index of this object in its accessible parent.

If you call getAccessibeChild on the object's parent with the index returned by this function you get a reference to this object.

Returns
  The returned index is zero based.

## ◆ getAccessibleName()

string getAccessibleName | ( |  | ) |

Return the object's localized name.

See XAccessibleContext::getAccessibleRole()'s documentation for the relation between an object's name and role. Names should be unique, at least between children of the same parent, although the uniqueness is neither enforced nor used inside the API.

Returns
  The returned string is the object's localized name.

## ◆ getAccessibleParent()

XAccessible getAccessibleParent | ( |  | ) |

Returns the parent of this object.

This function may be called for every node, including the root node, of the accessible tree.

Returns
  The returned reference points to a valid object for all but the root node. If called for the root node an empty reference is returned.

## ◆ getAccessibleRelationSet()

XAccessibleRelationSet getAccessibleRelationSet | ( |  | ) |

Returns the set of relations defined for this object.

The returned set of relations is a copy of this object's relation set: changing the returned object does not change this object's relations.

There are two ways to represent an empty list of relations: Return an empty reference or return a valid object that contains an empty list.

Returns
  The returned value is either an empty reference or a reference to a valid object that represents a copy of the objects list of relations.

## ◆ getAccessibleRole()

short getAccessibleRole | ( |  | ) |

Returns the role of this object.

The role is a generic description of an objects function. The relation between role and name is similar to the relation between class and object.

Returns
  The returned value is a role defined in the enumeration AccessibleRole.

See also
  AccessibleRole for a list of the available roles.

## ◆ getAccessibleStateSet()

XAccessibleStateSet getAccessibleStateSet | ( |  | ) |

Returns the set of states that are currently active for this object.

The returned state set is a copy: Changing the returned state set will not be reflected by changing the object's set of states. See the documentation of XAccessibleStateSet for a description of the individual states.

Returns
  A reference to this object's state set or an empty reference if states are not supported.

See also
  XAccessibleStateSet

## ◆ getLocale()

::com::sun::star::lang::Locale getLocale | ( |  | ) |
raises | ( | IllegalAccessibleComponentStateException
| ) |  |

Returns the locale of the component.

This locale is used for example to determine the language to use for the name and description texts.

Returns
  If this object does not have a locale, the locale of its parent is returned. If it does not have (yet) a parent it throws the exception IllegalAccessibleComponentStateException.

Exceptions

  IllegalAccessibleComponentStateException | when this object does not (yet) have a parent.

The documentation for this interface was generated from the following file:

- com/sun/star/accessibility/XAccessibleContext.idl