LibreOffice: XAccessibleContext Interface Reference

LibreOffice LibreOffice 7.6 SDK API Reference

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

## 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] hyper | 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()

hyper 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()

hyper getAccessibleIndexInParent | ( |  | ) |

Returns the index of this object in its accessible parent.

If you call getAccessibleChild 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()

hyper getAccessibleStateSet | ( |  | ) |

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

See the documentation of AccessibleStateType for a description of the individual states.

See also
  AccessibleStateType

## ◆ 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