LibreOffice Module svx (master) 1
Public Member Functions | Public Attributes | List of all members
accessibility::ChildDescriptor Class Reference

A child descriptor holds a reference to a UNO shape and the corresponding accessible object. More...

#include <ChildrenManagerImpl.hxx>

Collaboration diagram for accessibility::ChildDescriptor:
[legend]

Public Member Functions

AccessibleShapeGetAccessibleShape () const
 Return a pointer to the implementation object of the accessible shape of this descriptor. More...
 
void setIndexAtAccessibleShape (sal_Int32 _nIndex)
 set the index _nIndex at the accessible shape More...
 
 ChildDescriptor (const css::uno::Reference< css::drawing::XShape > &xShape)
 Create a new descriptor for the specified shape with empty reference to accessible object. More...
 
 ChildDescriptor (const rtl::Reference< AccessibleShape > &rxAccessibleShape)
 Create a new descriptor for the specified shape with empty reference to the original shape. More...
 
void disposeAccessibleObject (AccessibleContextBase &rParent)
 Dispose the accessible object of this descriptor. More...
 
bool operator== (const ChildDescriptor &aDescriptor) const
 Compare two child descriptors. More...
 

Public Attributes

css::uno::Reference< css::drawing::XShape > mxShape
 Reference to a (partially) visible shape. More...
 
rtl::Reference< AccessibleShapemxAccessibleShape
 The corresponding accessible object. More...
 
bool mbCreateEventPending
 This flag is set during the visibility calculation and indicates that at one time in this process an event is sent that informs the listeners of the creation of a new accessible object. More...
 

Detailed Description

A child descriptor holds a reference to a UNO shape and the corresponding accessible object.

There are two use cases:

  1. The accessible object is only created on demand and is then initially empty.
  2. There is no UNO shape. The accessible object is given as argument to the constructor.

In both cases the child descriptor assumes ownership over the accessible object.

Definition at line 421 of file ChildrenManagerImpl.hxx.

Constructor & Destructor Documentation

◆ ChildDescriptor() [1/2]

accessibility::ChildDescriptor::ChildDescriptor ( const css::uno::Reference< css::drawing::XShape > &  xShape)
explicit

Create a new descriptor for the specified shape with empty reference to accessible object.

◆ ChildDescriptor() [2/2]

accessibility::ChildDescriptor::ChildDescriptor ( const rtl::Reference< AccessibleShape > &  rxAccessibleShape)
explicit

Create a new descriptor for the specified shape with empty reference to the original shape.

Definition at line 1058 of file ChildrenManagerImpl.cxx.

References GetAccessibleShape(), and accessibility::AccessibleShape::SetState().

Member Function Documentation

◆ disposeAccessibleObject()

void accessibility::ChildDescriptor::disposeAccessibleObject ( AccessibleContextBase rParent)

Dispose the accessible object of this descriptor.

If that object does not exist then do nothing.

Parameters
rParentThe parent of the accessible object to dispose. A child event is sent in its name.

Definition at line 1076 of file ChildrenManagerImpl.cxx.

References accessibility::AccessibleContextBase::CommitChange(), and mxAccessibleShape.

◆ GetAccessibleShape()

AccessibleShape * accessibility::ChildDescriptor::GetAccessibleShape ( ) const
inline

Return a pointer to the implementation object of the accessible shape of this descriptor.

Returns
The result is NULL if either the UNO reference to the accessible shape is empty or it can not be transformed into a pointer to the desired class.

Definition at line 441 of file ChildrenManagerImpl.hxx.

Referenced by ChildDescriptor(), and setIndexAtAccessibleShape().

◆ operator==()

bool accessibility::ChildDescriptor::operator== ( const ChildDescriptor aDescriptor) const
inline

Compare two child descriptors.

Take into account that a child descriptor may be based on a UNO shape or, already, on an accessible shape.

Definition at line 479 of file ChildrenManagerImpl.hxx.

References mxAccessibleShape, mxShape, and mxShape.

◆ setIndexAtAccessibleShape()

void accessibility::ChildDescriptor::setIndexAtAccessibleShape ( sal_Int32  _nIndex)

set the index _nIndex at the accessible shape

Parameters
_nIndexThe new index in parent.

Definition at line 1068 of file ChildrenManagerImpl.cxx.

References GetAccessibleShape(), and accessibility::AccessibleShape::setIndexInParent().

Member Data Documentation

◆ mbCreateEventPending

bool accessibility::ChildDescriptor::mbCreateEventPending

This flag is set during the visibility calculation and indicates that at one time in this process an event is sent that informs the listeners of the creation of a new accessible object.

This flags is not reset afterwards. Don't use it unless you know exactly what you are doing.

Definition at line 455 of file ChildrenManagerImpl.hxx.

◆ mxAccessibleShape

rtl::Reference<AccessibleShape> accessibility::ChildDescriptor::mxAccessibleShape

The corresponding accessible object.

This reference is initially empty and only replaced by a reference to a new object when that is requested from the outside.

Definition at line 432 of file ChildrenManagerImpl.hxx.

Referenced by accessibility::ChildrenManagerImpl::AddShape(), disposeAccessibleObject(), accessibility::ChildrenManagerImpl::GetChild(), and operator==().

◆ mxShape

css::uno::Reference<css::drawing::XShape> accessibility::ChildDescriptor::mxShape

Reference to a (partially) visible shape.

Definition at line 426 of file ChildrenManagerImpl.hxx.

Referenced by accessibility::ChildrenManagerImpl::GetChild(), and operator==().


The documentation for this class was generated from the following files: