20#ifndef INCLUDED_SVX_SOURCE_ACCESSIBILITY_CHILDRENMANAGERIMPL_HXX
21#define INCLUDED_SVX_SOURCE_ACCESSIBILITY_CHILDRENMANAGERIMPL_HXX
30#include <com/sun/star/drawing/XShape.hpp>
31#include <com/sun/star/drawing/XShapes.hpp>
32#include <com/sun/star/document/XEventListener.hpp>
33#include <com/sun/star/view/XSelectionChangeListener.hpp>
34#include <com/sun/star/accessibility/XAccessible.hpp>
76 css::document::XEventListener,
77 css::view::XSelectionChangeListener>,
100 css::uno::Reference<css::drawing::XShapes> xShapeList,
165 void Update (
bool bCreateNewObjectsOnDemand);
220 virtual
void SAL_CALL
221 disposing (const css::lang::EventObject& rEventObject) override;
224 virtual
void SAL_CALL
225 notifyEvent (const css::document::EventObject& rEventObject) override;
228 virtual
void SAL_CALL
257 const css::
uno::Reference< css::
drawing::XShape >& _rxShape,
426 css::uno::Reference<css::drawing::XShape>
mxShape;
447 void setIndexAtAccessibleShape(sal_Int32 _nIndex);
482 this == &aDescriptor ||
This class bundles all information that is passed down the tree of accessible shapes so that each sha...
This base class provides a base implementation for all shapes.
A child descriptor holds a reference to a UNO shape and the corresponding accessible object.
AccessibleShape * GetAccessibleShape() const
Return a pointer to the implementation object of the accessible shape of this descriptor.
ChildDescriptor(const css::uno::Reference< css::drawing::XShape > &xShape)
Create a new descriptor for the specified shape with empty reference to accessible object.
css::uno::Reference< css::drawing::XShape > mxShape
Reference to a (partially) visible shape.
bool mbCreateEventPending
This flag is set during the visibility calculation and indicates that at one time in this process an ...
rtl::Reference< AccessibleShape > mxAccessibleShape
The corresponding accessible object.
This class contains the actual implementation of the children manager.
void RemoveShape(const css::uno::Reference< css::drawing::XShape > &xShape)
Remove a single shape.
void CreateAccessibilityObjects(ChildDescriptorListType &raChildList)
If children have to be created immediately and not on demand the create the missing accessible object...
void RemoveNonVisibleChildren(const std::vector< ChildDescriptor * > &rNonVisibleChildren)
From the old list of (former) visible shapes remove those that are not member of the new list.
void AddShape(const css::uno::Reference< css::drawing::XShape > &xShape)
Add a single shape.
ChildrenManagerImpl(css::uno::Reference< css::accessibility::XAccessible > xParent, css::uno::Reference< css::drawing::XShapes > xShapeList, const AccessibleShapeTreeInfo &rShapeTreeInfo, AccessibleContextBase &rContext)
Create a children manager, which manages the children of the given parent.
void UnregisterAsDisposeListener(const css::uno::Reference< css::drawing::XShape > &xShape)
Remove the children manager as dispose listener at the given shape.
virtual ~ChildrenManagerImpl() override
If there still are managed children these are disposed and released.
virtual void SAL_CALL selectionChanged(const css::lang::EventObject &rEvent) override
virtual void SAL_CALL notifyEvent(const css::document::EventObject &rEventObject) override
Listen for new and removed shapes.
void AddAccessibleShape(rtl::Reference< AccessibleShape > const &shape)
Add an accessible shape.
css::uno::Reference< css::drawing::XShapes > mxShapeList
The original list of UNO shapes.
std::vector< rtl::Reference< AccessibleShape > > AccessibleShapeList
This list of additional accessible shapes that can or shall not be created by the shape factory.
void ClearAccessibleShapeList()
Clear the lists of accessible shapes and that of visible accessible shapes.
AccessibleShapeTreeInfo maShapeTreeInfo
Bundle of information passed down the shape tree.
void Init()
Do that part of the initialization that you can not or should not do in the constructor like register...
bool HasFocus() const
Return whether one of the shapes managed by this object has currently the focus.
css::uno::Reference< css::accessibility::XAccessible > GetChild(sal_Int64 nIndex)
Return the requested accessible child or throw and IndexOutOfBoundsException if the given index is in...
AccessibleShape * mpFocusedShape
This member points to the currently focused shape.
std::vector< ChildDescriptor * > MergeAccessibilityInformation(ChildDescriptorListType &raChildList)
Merge the information that is already known about the visible shapes from the old list into the curre...
css::uno::Reference< css::accessibility::XAccessible > mxParent
The parent of the shapes.
AccessibleContextBase & mrContext
Reference to an accessible context object that is used to inform its listeners of new and removed chi...
virtual void ViewForwarderChanged() override
Informs this children manager and its children about a change of one (or more) aspect of the view for...
ChildDescriptorListType maVisibleChildren
This list holds the descriptors of all currently visible shapes and associated accessible object.
void UpdateSelection()
Update the SELECTED and FOCUSED states of all visible children according to the given selection.
virtual AccessibleControlShape * GetAccControlShapeFromModel(css::beans::XPropertySet *pSet) override
void CreateListOfVisibleShapes(ChildDescriptorListType &raChildList)
Three helper functions for the <member>Update</member> method.
const css::uno::Reference< css::drawing::XShape > & GetChildShape(sal_Int64 nIndex)
void RemoveFocus()
When there is a shape that currently has the focus, i.e.
static void SendVisibleAreaEvents(ChildDescriptorListType &raChildList)
If the visible area has changed then send events that signal a change of their bounding boxes for all...
tools::Rectangle maVisibleArea
Rectangle that describes the visible area in which a shape has to lie at least partly,...
sal_Int64 GetChildCount() const noexcept
Return the number of currently visible accessible children.
void Update(bool bCreateNewObjectsOnDemand)
Update the child manager.
virtual void SAL_CALL disposing(const css::lang::EventObject &rEventObject) override
void RegisterAsDisposeListener(const css::uno::Reference< css::drawing::XShape > &xShape)
Add the children manager as dispose listener at the given shape so that the associated accessible obj...
AccessibleShapeList maAccessibleShapes
void SetInfo(const AccessibleShapeTreeInfo &rShapeTreeInfo)
Set a new event shape tree info.
virtual css::uno::Reference< css::accessibility::XAccessible > GetAccessibleCaption(const css::uno::Reference< css::drawing::XShape > &xShape) override
void SetShapeList(const css::uno::Reference< css::drawing::XShapes > &xShapeList)
Set the list of UNO shapes to the given list.
virtual bool ReplaceChild(AccessibleShape *pCurrentChild, const css::uno::Reference< css::drawing::XShape > &_rxShape, const tools::Long _nIndex, const AccessibleShapeTreeInfo &_rShapeTreeInfo) override
Replace the specified child with a replacement.
This interface contains methods missing from the XAccessibleContext interface that allow the modifica...
::std::vector< ChildDescriptor > ChildDescriptorListType
class SAL_NO_VTABLE XPropertySet
uno::Reference< drawing::XShape > const mxShape