namespace com::sun::star::uno { class XComponentContext; }
namespace accessibility
{
//= OAccessibleWrapper
class OAccessibleContextWrapper; class OWrappedAccessibleChildrenManager;
using OAccessibleWrapper_Base = cppu::ImplHelper1<css::accessibility::XAccessible>;
/** a class which aggregates a proxy for an XAccessible, and wrapping the context returned by this XAccessible.
*/ class OAccessibleWrapper final : public OAccessibleWrapper_Base, public OComponentProxyAggregation
@seealsoOAccessibleContextWrapper
*/ class OAccessibleContextWrapperHelper : private OComponentProxyAggregationHelper, public OAccessibleContextWrapperHelper_Base
{ protected: /// the context we're wrapping (properly typed, in opposite to OComponentProxyAggregationHelper::m_xInner)
css::uno::Reference< css::accessibility::XAccessibleContext >
m_xInnerContext; /// the XAccessible which created this context
css::uno::Reference< css::accessibility::XAccessible >
m_xOwningAccessible; /// the XAccessible which is to be returned in getAccessibleParent
css::uno::Reference< css::accessibility::XAccessible >
m_xParentAccessible;
rtl::Reference<OWrappedAccessibleChildrenManager> m_xChildMapper; // for mapping children from our inner context to our callers
/// to be called from within your ctor - does the aggregation of a proxy for m_xInnerContext void aggregateProxy(
oslInterlockedCount& _rRefCount,
::cppu::OWeakObject& _rDelegator
);
class OAccessibleContextWrapper final : public cppu::BaseMutex, public OAccessibleContextWrapper_CBase, public OAccessibleContextWrapperHelper
{ private:
::comphelper::AccessibleEventNotifier::TClientId m_nNotifierClient; // for notifying AccessibleEvents
typedef ::std::map < css::uno::Reference< css::accessibility::XAccessible >
, rtl::Reference<OAccessibleWrapper >
> AccessibleMap; // TODO: think about if we should hold these objects weak
typedef ::cppu::WeakImplHelper< css::lang::XEventListener
> OWrappedAccessibleChildrenManager_Base; /** manages wrapping XAccessible's to XAccessible's
*/ class OWrappedAccessibleChildrenManager final : public OWrappedAccessibleChildrenManager_Base
{
css::uno::Reference< css::uno::XComponentContext >
m_xContext;
css::uno::WeakReference< css::accessibility::XAccessible >
m_aOwningAccessible; // the XAccessible which belongs to the XAccessibleContext which we work for
AccessibleMap m_aChildrenMap; // for caching children bool m_bTransientChildren; // are we prohibited to cache our children?
/** specifies if the children are to be considered transient (i.e.: not cached) <p>tobecalledonlyonceperlifetime</p>
*/ void setTransientChildren( bool _bSet );
/** sets the XAccessible which belongs to the XAccessibleContext which we work for <p>tobecalledonlyonceperlifetime</p>
*/ void setOwningAccessible( const css::uno::Reference< css::accessibility::XAccessible >& _rxAcc );
/// retrieves a wrapper for the given accessible
css::uno::Reference< css::accessibility::XAccessible >
getAccessibleWrapperFor( const css::uno::Reference< css::accessibility::XAccessible >& _rxKey
);
/// erases the given key from the map (if it is present there) void removeFromCache( const css::uno::Reference< css::accessibility::XAccessible >& _rxKey );
/// invalidates (i.e. empties) the map void invalidateAll( );
/** handles a notification as got from the parent of the children we're managing <p>Thisappliesonlytothenotificationswhichhaveadirectimpactonourmap.</p>
*/ void handleChildNotification( const css::accessibility::AccessibleEventObject& _rEvent );
/** translates events as got from the parent of the children we're managing <p>Thisappliesonlytothenotificationswhichdealwithchildobjectswhichwemanage.</p>
*/ void translateAccessibleEvent( const css::accessibility::AccessibleEventObject& _rEvent,
css::accessibility::AccessibleEventObject& _rTranslatedEvent
);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.