Files
libreoffice/svx/source/inc/svxrectctaccessiblecontext.hxx

611 lines
24 KiB
C++
Raw Normal View History

2002-03-06 08:46:48 +00:00
/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
2002-03-06 08:46:48 +00:00
*
* $RCSfile: svxrectctaccessiblecontext.hxx,v $
2002-03-06 08:46:48 +00:00
*
* $Revision: 1.11 $
2002-03-06 08:46:48 +00:00
*
* last change: $Author: hr $ $Date: 2006-04-19 13:50:25 $
2002-03-06 08:46:48 +00:00
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
2002-03-06 08:46:48 +00:00
*
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2005 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
2002-03-06 08:46:48 +00:00
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
2002-03-06 08:46:48 +00:00
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
2002-03-06 08:46:48 +00:00
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
2002-03-06 08:46:48 +00:00
*
************************************************************************/
#ifndef _SVXRECTACCESSIBLECONTEXT_HXX
#define _SVXRECTACCESSIBLECONTEXT_HXX
#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_HPP_
#include <com/sun/star/accessibility/XAccessible.hpp>
2002-03-06 08:46:48 +00:00
#endif
#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLECOMPONENT_HPP_
#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
2002-03-06 08:46:48 +00:00
#endif
#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLECONTEXT_HPP_
#include <com/sun/star/accessibility/XAccessibleContext.hpp>
2002-03-06 08:46:48 +00:00
#endif
#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLEEVENTBROADCASTER_HPP_
#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
2002-03-06 08:46:48 +00:00
#endif
#ifndef _COM_SUN_STAR_ACCESSIBILITY_ILLEGALACCESSIBLECOMPONENTSTATEEXCEPTION_HPP_
#include <com/sun/star/accessibility/IllegalAccessibleComponentStateException.hpp>
2002-03-06 08:46:48 +00:00
#endif
#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLESELECTION_HPP_
#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
2002-03-06 08:46:48 +00:00
#endif
#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLEVALUE_HPP_
#include <com/sun/star/accessibility/XAccessibleValue.hpp>
2002-03-19 07:55:56 +00:00
#endif
2002-03-06 08:46:48 +00:00
#ifndef _COM_SUN_STAR_BEANS_XPROPERTYCHANGELISTENER_HPP_
#include <com/sun/star/beans/XPropertyChangeListener.hpp>
#endif
#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_
#include <com/sun/star/uno/Reference.hxx>
#endif
#ifndef _CPPUHELPER_WEAK_HXX_
#include <cppuhelper/weak.hxx>
#endif
#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
#endif
#ifndef _COM_SUN_STAR_LANG_XTYPEPROVIDER_HPP_
#include <com/sun/star/lang/XTypeProvider.hpp>
#endif
#ifndef _COM_SUN_STAR_LANG_XSERVICENAME_HPP_
#include <com/sun/star/lang/XServiceName.hpp>
#endif
#ifndef _COM_SUN_STAR_LANG_INDEXOUTOFBOUNDSEXCEPTION_HPP_
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#endif
2002-03-19 07:55:56 +00:00
#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
#include <com/sun/star/lang/DisposedException.hpp>
#endif
2002-03-06 08:46:48 +00:00
#ifndef _VOS_MUTEX_HXX_
#include <vos/mutex.hxx>
#endif
#ifndef _CPPUHELPER_INTERFACECONTAINER_H_
#include <cppuhelper/interfacecontainer.h>
#endif
2002-03-19 07:55:56 +00:00
#ifndef _CPPUHELPER_COMPBASE6_HXX_
2002-03-06 08:46:48 +00:00
#include <cppuhelper/compbase6.hxx>
#endif
2002-03-19 07:55:56 +00:00
//#ifndef _CPPUHELPER_COMPBASE7_HXX_
//#include <cppuhelper/compbase7.hxx>
//#endif
2002-03-06 08:46:48 +00:00
#ifndef _COMPHELPER_BROADCASTHELPER_HXX_
#include <comphelper/broadcasthelper.hxx>
#endif
2002-03-19 07:55:56 +00:00
#ifndef _CPPUHELPER_IMPLBASE6_HXX_
2002-03-06 08:46:48 +00:00
#include <cppuhelper/implbase6.hxx>
2002-03-19 07:55:56 +00:00
#endif
#ifndef _UTL_SERVICEHELPER_HXX_
2002-03-06 08:46:48 +00:00
#include <unotools/servicehelper.hxx>
2002-03-19 07:55:56 +00:00
#endif
2002-03-06 08:46:48 +00:00
#ifndef _SVX_RECTENUM_HXX //autogen
#include <rectenum.hxx>
2002-03-06 08:46:48 +00:00
#endif
namespace com { namespace sun { namespace star { namespace awt {
struct Point;
struct Rectangle;
struct Size;
class XFocusListener;
} } } };
class Rectangle;
class SvxRectCtl;
class SvxRectCtlChildAccessibleContext;
class Window;
2002-03-19 07:55:56 +00:00
typedef ::cppu::WeakAggComponentImplHelper6<
::com::sun::star::accessibility::XAccessible,
::com::sun::star::accessibility::XAccessibleComponent,
::com::sun::star::accessibility::XAccessibleContext,
::com::sun::star::accessibility::XAccessibleEventBroadcaster,
::com::sun::star::accessibility::XAccessibleSelection,
2002-03-19 07:55:56 +00:00
::com::sun::star::lang::XServiceInfo >
SvxRectCtlAccessibleContext_Base;
2002-03-19 13:15:54 +00:00
class SvxRectCtlAccessibleContext : public ::comphelper::OBaseMutex, public SvxRectCtlAccessibleContext_Base
2002-03-06 08:46:48 +00:00
{
public:
//===== internal ========================================================
SvxRectCtlAccessibleContext(
const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible>& rxParent,
2002-03-06 08:46:48 +00:00
SvxRectCtl& rRepresentation,
const ::rtl::OUString* pName = NULL,
const ::rtl::OUString* pDescription = NULL );
protected:
virtual ~SvxRectCtlAccessibleContext();
public:
//===== XAccessible =====================================================
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext> SAL_CALL
2002-03-19 07:55:56 +00:00
getAccessibleContext( void ) throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
//===== XAccessibleComponent ============================================
2002-03-19 07:55:56 +00:00
virtual sal_Bool SAL_CALL
containsPoint( const ::com::sun::star::awt::Point& rPoint ) throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
getAccessibleAtPoint( const ::com::sun::star::awt::Point& rPoint ) throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
virtual ::com::sun::star::awt::Rectangle SAL_CALL
getBounds() throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
virtual ::com::sun::star::awt::Point SAL_CALL
getLocation() throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
virtual ::com::sun::star::awt::Point SAL_CALL
getLocationOnScreen() throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
virtual ::com::sun::star::awt::Size SAL_CALL
getSize() throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
virtual sal_Bool SAL_CALL
isShowing() throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
virtual sal_Bool SAL_CALL
isVisible() throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
virtual sal_Bool SAL_CALL
isFocusTraversable() throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
virtual void SAL_CALL
addFocusListener(
const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener )
throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
virtual void SAL_CALL
removeFocusListener(
const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener )
throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
virtual void SAL_CALL
grabFocus() throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
virtual ::com::sun::star::uno::Any SAL_CALL
getAccessibleKeyBinding() throw( ::com::sun::star::uno::RuntimeException );
virtual sal_Int32 SAL_CALL
getForeground( ) throw (::com::sun::star::uno::RuntimeException);
virtual sal_Int32 SAL_CALL
getBackground( ) throw (::com::sun::star::uno::RuntimeException);
2002-03-06 08:46:48 +00:00
//===== XAccessibleContext ==============================================
virtual sal_Int32 SAL_CALL
2002-03-19 07:55:56 +00:00
getAccessibleChildCount( void ) throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
getAccessibleChild( sal_Int32 nIndex )
2002-03-19 07:55:56 +00:00
throw( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IndexOutOfBoundsException );
2002-03-06 08:46:48 +00:00
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
2002-03-19 07:55:56 +00:00
getAccessibleParent( void ) throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
virtual sal_Int32 SAL_CALL
2002-03-19 07:55:56 +00:00
getAccessibleIndexInParent( void ) throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
virtual sal_Int16 SAL_CALL
2002-03-19 07:55:56 +00:00
getAccessibleRole( void ) throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
virtual ::rtl::OUString SAL_CALL
2002-03-19 07:55:56 +00:00
getAccessibleDescription( void ) throw (::com::sun::star::uno::RuntimeException);
2002-03-06 08:46:48 +00:00
virtual ::rtl::OUString SAL_CALL
2002-03-19 07:55:56 +00:00
getAccessibleName( void ) throw (::com::sun::star::uno::RuntimeException);
2002-03-06 08:46:48 +00:00
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL
2002-03-19 07:55:56 +00:00
getAccessibleRelationSet( void ) throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL
2002-03-19 07:55:56 +00:00
getAccessibleStateSet( void ) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::lang::Locale SAL_CALL
getLocale( void )
throw( ::com::sun::star::uno::RuntimeException,
::com::sun::star::accessibility::IllegalAccessibleComponentStateException );
2002-03-06 08:46:48 +00:00
//===== XAccessibleEventBroadcaster =====================================
virtual void SAL_CALL
2002-03-19 07:55:56 +00:00
addEventListener(
const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener )
2002-03-19 07:55:56 +00:00
throw( com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
virtual void SAL_CALL
2002-03-19 07:55:56 +00:00
removeEventListener(
const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener )
2002-03-19 07:55:56 +00:00
throw( com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
//===== XServiceInfo ====================================================
virtual ::rtl::OUString SAL_CALL
2002-03-19 07:55:56 +00:00
getImplementationName( void ) throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
virtual sal_Bool SAL_CALL
2002-03-19 07:55:56 +00:00
supportsService( const ::rtl::OUString& sServiceName ) throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
2002-03-19 07:55:56 +00:00
getSupportedServiceNames( void ) throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
//===== XTypeProvider ===================================================
virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
2002-03-19 07:55:56 +00:00
getImplementationId( void ) throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
//===== XAccessibleSelection =============================================
virtual void SAL_CALL
selectAccessibleChild( sal_Int32 nChildIndex )
2002-03-19 07:55:56 +00:00
throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
virtual sal_Bool SAL_CALL
isAccessibleChildSelected( sal_Int32 nChildIndex )
2002-03-19 07:55:56 +00:00
throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
virtual void SAL_CALL
2002-03-19 07:55:56 +00:00
clearAccessibleSelection() throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
virtual void SAL_CALL
selectAllAccessibleChildren() throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
virtual sal_Int32 SAL_CALL
2002-03-19 07:55:56 +00:00
getSelectedAccessibleChildCount() throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
2002-03-06 08:46:48 +00:00
getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex )
2002-03-19 07:55:56 +00:00
throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
virtual void SAL_CALL
deselectAccessibleChild( sal_Int32 nSelectedChildIndex )
2002-03-19 07:55:56 +00:00
throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
protected:
//===== internals ========================================================
2002-03-19 07:55:56 +00:00
void checkChildIndex( long nIndexOfChild ) throw( ::com::sun::star::lang::IndexOutOfBoundsException );
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
void checkChildIndexOnSelection( long nIndexOfChild ) throw( ::com::sun::star::lang::IndexOutOfBoundsException );
2002-03-06 08:46:48 +00:00
/** Selects a new child by index.
<p>If the child was not selected before, the state of the child will
be updated. If the index is invalid, the index will internaly set to NOCHILDSELECTED</p>
@param nIndexOfChild
Index of the new child which should be selected.
*/
void selectChild( long nIndexOfChild );
public:
/** Selects a new child by point.
<p>If the child was not selected before, the state of the child will
be updated. If the point is not invalid, the index will internaly set to NOCHILDSELECTED</p>
@param eButton
Button which belongs to the child which should be selected.
*/
void selectChild( RECT_POINT ePoint );
/// Sets the name
void setName( const ::rtl::OUString& rName );
/// Sets the description
void setDescription( const ::rtl::OUString& rDescr );
private:
static ::com::sun::star::uno::Sequence< sal_Int8 > getUniqueId( void );
protected:
2002-03-19 07:55:56 +00:00
/// @Return the object's current bounding box relative to the desktop.
virtual Rectangle GetBoundingBoxOnScreen( void ) throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
/// @Return the object's current bounding box relative to the parent object.
virtual Rectangle GetBoundingBox( void ) throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
/// Calls all Listener to tell they the change.
void CommitChange( const com::sun::star::accessibility::AccessibleEventObject& rEvent );
2002-03-06 08:46:48 +00:00
virtual void SAL_CALL disposing();
2002-03-19 07:55:56 +00:00
/// @returns true if it's disposed or in disposing
inline sal_Bool IsAlive( void ) const;
/// @returns true if it's not disposed and no in disposing
inline sal_Bool IsNotAlive( void ) const;
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
/// throws the exception DisposedException if it's not alive
void ThrowExceptionIfNotAlive( void ) throw( ::com::sun::star::lang::DisposedException );
private:
2002-03-06 08:46:48 +00:00
/** Description of this object. This is not a constant because it can
be set from the outside.
*/
2002-03-19 07:55:56 +00:00
::rtl::OUString msDescription;
2002-03-06 08:46:48 +00:00
/** Name of this object.
*/
2002-03-19 07:55:56 +00:00
::rtl::OUString msName;
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
/// Reference to the parent object.
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
2002-03-19 07:55:56 +00:00
mxParent;
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
/// pointer to internal representation
SvxRectCtl* mpRepr;
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
/// array for all possible childs
SvxRectCtlChildAccessibleContext** mpChilds;
2002-03-06 08:46:48 +00:00
/// client id in the AccessibleEventNotifier queue
sal_uInt32 mnClientId;
2002-03-06 08:46:48 +00:00
/// actual selected child
2002-03-19 07:55:56 +00:00
long mnSelectedChild;
2002-03-06 08:46:48 +00:00
/// mode of control (true -> 8 points, false -> 9 points)
2002-03-19 07:55:56 +00:00
sal_Bool mbAngleMode;
2002-03-06 08:46:48 +00:00
};
2002-03-19 07:55:56 +00:00
inline sal_Bool SvxRectCtlAccessibleContext::IsAlive( void ) const
{
return !rBHelper.bDisposed && !rBHelper.bInDispose;
}
inline sal_Bool SvxRectCtlAccessibleContext::IsNotAlive( void ) const
{
return rBHelper.bDisposed || rBHelper.bInDispose;
}
2002-03-06 08:46:48 +00:00
typedef ::cppu::WeakAggComponentImplHelper6<
::com::sun::star::accessibility::XAccessible,
::com::sun::star::accessibility::XAccessibleComponent,
::com::sun::star::accessibility::XAccessibleContext,
::com::sun::star::accessibility::XAccessibleEventBroadcaster,
::com::sun::star::accessibility::XAccessibleValue,
2002-03-19 07:55:56 +00:00
::com::sun::star::lang::XServiceInfo >
SvxRectCtlChildAccessibleContext_Base;
2002-03-06 08:46:48 +00:00
class SvxRectCtlChildAccessibleContext : public SvxRectCtlChildAccessibleContext_Base
{
public:
SvxRectCtlChildAccessibleContext(
const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible>& rxParent,
2002-03-06 08:46:48 +00:00
const Window& rParentWindow,
const ::rtl::OUString& rName, const ::rtl::OUString& rDescription,
const Rectangle& rBoundingBox,
long nIndexInParent );
protected:
virtual ~SvxRectCtlChildAccessibleContext();
public:
//===== XAccessible =====================================================
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext> SAL_CALL
2002-03-19 07:55:56 +00:00
getAccessibleContext( void ) throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
//===== XAccessibleComponent ============================================
2002-03-19 07:55:56 +00:00
virtual sal_Bool SAL_CALL
containsPoint( const ::com::sun::star::awt::Point& rPoint ) throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
getAccessibleAtPoint( const ::com::sun::star::awt::Point& rPoint ) throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
virtual ::com::sun::star::awt::Rectangle SAL_CALL
getBounds() throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
virtual ::com::sun::star::awt::Point SAL_CALL
getLocation() throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
virtual ::com::sun::star::awt::Point SAL_CALL
getLocationOnScreen() throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
virtual ::com::sun::star::awt::Size SAL_CALL
getSize() throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
virtual sal_Bool SAL_CALL
isShowing() throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
virtual sal_Bool SAL_CALL
isVisible() throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
virtual sal_Bool SAL_CALL
isFocusTraversable() throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
virtual void SAL_CALL
addFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener )
throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
virtual void SAL_CALL
removeFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener )
throw (::com::sun::star::uno::RuntimeException);
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
virtual void SAL_CALL
grabFocus() throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
virtual ::com::sun::star::uno::Any SAL_CALL
getAccessibleKeyBinding() throw( ::com::sun::star::uno::RuntimeException );
virtual sal_Int32 SAL_CALL
getForeground( ) throw (::com::sun::star::uno::RuntimeException);
virtual sal_Int32 SAL_CALL
getBackground( ) throw (::com::sun::star::uno::RuntimeException);
2002-03-06 08:46:48 +00:00
//===== XAccessibleContext ==============================================
2002-03-19 07:55:56 +00:00
virtual sal_Int32 SAL_CALL
getAccessibleChildCount( void ) throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
2002-03-19 07:55:56 +00:00
getAccessibleChild( sal_Int32 nIndex )
throw( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IndexOutOfBoundsException );
2002-03-06 08:46:48 +00:00
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
2002-03-19 07:55:56 +00:00
getAccessibleParent( void ) throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
virtual sal_Int32 SAL_CALL
2002-03-19 07:55:56 +00:00
getAccessibleIndexInParent( void ) throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
virtual sal_Int16 SAL_CALL
2002-03-19 07:55:56 +00:00
getAccessibleRole( void ) throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
virtual ::rtl::OUString SAL_CALL
2002-03-19 07:55:56 +00:00
getAccessibleDescription( void ) throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
virtual ::rtl::OUString SAL_CALL
2002-03-19 07:55:56 +00:00
getAccessibleName( void ) throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL
2002-03-19 07:55:56 +00:00
getAccessibleRelationSet( void ) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL
2002-03-19 07:55:56 +00:00
getAccessibleStateSet( void ) throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
virtual ::com::sun::star::lang::Locale SAL_CALL
getLocale( void )
throw( ::com::sun::star::uno::RuntimeException, ::com::sun::star::accessibility::IllegalAccessibleComponentStateException );
2002-03-06 08:46:48 +00:00
//===== XAccessibleEventBroadcaster =====================================
virtual void SAL_CALL
2002-03-19 07:55:56 +00:00
addEventListener(
const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener )
2002-03-19 07:55:56 +00:00
throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
virtual void SAL_CALL
2002-03-19 07:55:56 +00:00
removeEventListener(
const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener )
2002-03-19 07:55:56 +00:00
throw( com::sun::star::uno::RuntimeException );
//===== XAccessibleValue ================================================
virtual ::com::sun::star::uno::Any SAL_CALL
getCurrentValue() throw( ::com::sun::star::uno::RuntimeException );
virtual sal_Bool SAL_CALL
setCurrentValue( const ::com::sun::star::uno::Any& aNumber ) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Any SAL_CALL
getMaximumValue() throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Any SAL_CALL
getMinimumValue() throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
//===== XServiceInfo ====================================================
virtual ::rtl::OUString SAL_CALL
2002-03-19 07:55:56 +00:00
getImplementationName( void ) throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
virtual sal_Bool SAL_CALL
2002-03-19 07:55:56 +00:00
supportsService( const ::rtl::OUString& sServiceName ) throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
2002-03-19 07:55:56 +00:00
getSupportedServiceNames( void ) throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
//===== XTypeProvider ===================================================
virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
2002-03-19 07:55:56 +00:00
getImplementationId( void ) throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
//===== internal ==========================================================
2002-03-06 08:46:48 +00:00
/// Sets the checked status
void setStateChecked( sal_Bool bChecked );
2002-03-19 07:55:56 +00:00
2002-03-06 08:46:48 +00:00
protected:
2002-03-19 07:55:56 +00:00
virtual Rectangle GetBoundingBoxOnScreen( void ) throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
virtual Rectangle GetBoundingBox( void ) throw( ::com::sun::star::uno::RuntimeException );
2002-03-06 08:46:48 +00:00
void CommitChange( const com::sun::star::accessibility::AccessibleEventObject& rEvent );
2002-03-06 08:46:48 +00:00
virtual void SAL_CALL disposing();
2002-03-19 07:55:56 +00:00
/// @returns true if it's disposed or in disposing
inline sal_Bool IsAlive( void ) const;
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
/// @returns true if it's not disposed and no in disposing
inline sal_Bool IsNotAlive( void ) const;
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
/// throws the exception DisposedException if it's not alive
void ThrowExceptionIfNotAlive( void ) throw( ::com::sun::star::lang::DisposedException );
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
/// Mutex guarding this object.
::osl::Mutex maMutex;
2002-03-06 08:46:48 +00:00
2002-03-19 07:55:56 +00:00
private:
2002-03-06 08:46:48 +00:00
/** Description of this object. This is not a constant because it can
be set from the outside. Furthermore, it changes according the the
draw page's display mode.
*/
2002-03-19 07:55:56 +00:00
::rtl::OUString msDescription;
2002-03-06 08:46:48 +00:00
/** Name of this object. It changes according the the draw page's
display mode.
*/
2002-03-19 07:55:56 +00:00
::rtl::OUString msName;
/// Reference to the parent object.
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
2002-03-19 07:55:56 +00:00
mxParent;
/// Bounding box
Rectangle* mpBoundingBox;
/// window of parent
const Window& mrParentWindow;
2002-03-06 08:46:48 +00:00
/// client id in the AccessibleEventNotifier queue
sal_uInt32 mnClientId;
2002-03-06 08:46:48 +00:00
/// index of child in parent
2002-03-19 07:55:56 +00:00
long mnIndexInParent;
2002-03-06 08:46:48 +00:00
/// Indicates, if object is checked
2002-03-19 07:55:56 +00:00
sal_Bool mbIsChecked;
2002-03-06 08:46:48 +00:00
};
2002-03-19 07:55:56 +00:00
inline sal_Bool SvxRectCtlChildAccessibleContext::IsAlive( void ) const
{
return !rBHelper.bDisposed && !rBHelper.bInDispose;
}
inline sal_Bool SvxRectCtlChildAccessibleContext::IsNotAlive( void ) const
{
return rBHelper.bDisposed || rBHelper.bInDispose;
}
2002-03-06 08:46:48 +00:00
#endif