2010-10-27 13:11:31 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-21 14:30:25 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2004-08-02 16:46:59 +00:00
|
|
|
|
2013-10-28 03:41:20 +01:00
|
|
|
#ifndef INCLUDED_SVX_SOURCE_INC_ACCESSIBLEFRAMESELECTOR_HXX
|
|
|
|
#define INCLUDED_SVX_SOURCE_INC_ACCESSIBLEFRAMESELECTOR_HXX
|
2004-08-02 16:46:59 +00:00
|
|
|
|
|
|
|
#include <com/sun/star/lang/XServiceInfo.hpp>
|
|
|
|
#include <com/sun/star/beans/XPropertyChangeListener.hpp>
|
|
|
|
#include <com/sun/star/awt/XFocusListener.hpp>
|
|
|
|
#include <com/sun/star/accessibility/XAccessible.hpp>
|
|
|
|
#include <com/sun/star/accessibility/XAccessibleContext.hpp>
|
|
|
|
#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
|
2008-07-07 12:03:45 +00:00
|
|
|
#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
|
2012-01-06 23:21:01 +01:00
|
|
|
#include <tools/link.hxx>
|
2004-08-02 16:46:59 +00:00
|
|
|
#include <tools/resary.hxx>
|
2012-01-03 15:12:33 +01:00
|
|
|
#include <tools/rc.hxx>
|
2008-07-07 12:03:45 +00:00
|
|
|
#include <cppuhelper/implbase5.hxx>
|
2004-08-02 16:46:59 +00:00
|
|
|
#include <cppuhelper/interfacecontainer.hxx>
|
2008-07-07 12:03:45 +00:00
|
|
|
#include <comphelper/accessibleeventnotifier.hxx>
|
2007-06-27 17:21:06 +00:00
|
|
|
#include <svx/framebordertype.hxx>
|
2015-03-09 14:29:30 +02:00
|
|
|
#include <vcl/vclptr.hxx>
|
2004-08-02 16:46:59 +00:00
|
|
|
|
2008-07-07 12:03:45 +00:00
|
|
|
class VclSimpleEvent;
|
|
|
|
class VclWindowEvent;
|
|
|
|
|
2004-08-02 16:46:59 +00:00
|
|
|
namespace svx {
|
|
|
|
|
|
|
|
class FrameSelector;
|
|
|
|
|
|
|
|
namespace a11y {
|
|
|
|
|
2014-02-25 20:51:35 +01:00
|
|
|
|
2004-08-02 16:46:59 +00:00
|
|
|
|
|
|
|
class AccFrameSelector :
|
2008-07-07 12:03:45 +00:00
|
|
|
public ::cppu::WeakImplHelper5<
|
2004-08-02 16:46:59 +00:00
|
|
|
::com::sun::star::accessibility::XAccessible,
|
|
|
|
::com::sun::star::accessibility::XAccessibleContext,
|
|
|
|
::com::sun::star::accessibility::XAccessibleComponent,
|
2008-07-07 12:03:45 +00:00
|
|
|
::com::sun::star::accessibility::XAccessibleEventBroadcaster,
|
2004-08-02 16:46:59 +00:00
|
|
|
::com::sun::star::lang::XServiceInfo
|
|
|
|
>,
|
|
|
|
public Resource
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
explicit AccFrameSelector( FrameSelector& rFrameSel, FrameBorderType eBorder );
|
|
|
|
|
|
|
|
virtual ~AccFrameSelector();
|
|
|
|
|
|
|
|
//XAccessible
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2004-08-02 16:46:59 +00:00
|
|
|
|
|
|
|
//XAccessibleContext
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual sal_Int32 SAL_CALL getAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
|
|
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
|
|
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
|
|
virtual sal_Int32 SAL_CALL getAccessibleIndexInParent( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
|
|
virtual sal_Int16 SAL_CALL getAccessibleRole( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
|
|
virtual OUString SAL_CALL getAccessibleDescription( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
|
|
virtual OUString SAL_CALL getAccessibleName( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
|
|
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
|
|
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
|
|
virtual ::com::sun::star::lang::Locale SAL_CALL getLocale( ) throw (::com::sun::star::accessibility::IllegalAccessibleComponentStateException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2004-08-02 16:46:59 +00:00
|
|
|
|
|
|
|
//XAccessibleComponent
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual sal_Bool SAL_CALL containsPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
|
|
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
|
|
virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
|
|
virtual ::com::sun::star::awt::Point SAL_CALL getLocation( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
|
|
virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
|
|
virtual ::com::sun::star::awt::Size SAL_CALL getSize( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
|
|
virtual void SAL_CALL grabFocus( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
|
|
virtual sal_Int32 SAL_CALL getForeground( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
|
|
virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2004-08-02 16:46:59 +00:00
|
|
|
|
2008-07-07 12:03:45 +00:00
|
|
|
// XAccessibleEventBroadcaster
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual void SAL_CALL addAccessibleEventListener ( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
|
|
virtual void SAL_CALL removeAccessibleEventListener ( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2008-07-07 12:03:45 +00:00
|
|
|
|
2004-08-02 16:46:59 +00:00
|
|
|
//XServiceInfo
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
|
|
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
|
|
|
virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
2004-08-02 16:46:59 +00:00
|
|
|
|
|
|
|
void Invalidate();
|
2014-04-14 16:15:22 +02:00
|
|
|
void NotifyFocusListeners(bool bGetFocus);
|
2013-11-27 13:03:45 +00:00
|
|
|
void NotifyAccessibleEvent( const sal_Int16 _nEventId, const ::com::sun::star::uno::Any& _rOldValue, const ::com::sun::star::uno::Any& _rNewValue );
|
2004-08-02 16:46:59 +00:00
|
|
|
|
2008-07-07 12:03:45 +00:00
|
|
|
protected:
|
|
|
|
DECL_LINK( WindowEventListener, VclSimpleEvent* );
|
|
|
|
|
2015-01-20 12:38:10 +02:00
|
|
|
void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent );
|
2008-07-07 12:03:45 +00:00
|
|
|
|
2004-08-02 16:46:59 +00:00
|
|
|
private:
|
|
|
|
void IsValid() throw (::com::sun::star::uno::RuntimeException);
|
2012-09-09 14:38:51 +03:00
|
|
|
void RemoveFrameSelEventListener();
|
2004-08-02 16:46:59 +00:00
|
|
|
|
2015-03-09 14:29:30 +02:00
|
|
|
VclPtr<FrameSelector> mpFrameSel;
|
2004-08-02 16:46:59 +00:00
|
|
|
::osl::Mutex maFocusMutex;
|
|
|
|
::osl::Mutex maPropertyMutex;
|
|
|
|
|
|
|
|
FrameBorderType meBorder;
|
|
|
|
|
|
|
|
::cppu::OInterfaceContainerHelper maFocusListeners;
|
|
|
|
::cppu::OInterfaceContainerHelper maPropertyListeners;
|
|
|
|
|
|
|
|
ResStringArray maNames;
|
|
|
|
ResStringArray maDescriptions;
|
2008-07-07 12:03:45 +00:00
|
|
|
|
|
|
|
::comphelper::AccessibleEventNotifier::TClientId mnClientId;
|
2004-08-02 16:46:59 +00:00
|
|
|
};
|
|
|
|
|
2014-02-25 20:51:35 +01:00
|
|
|
|
2004-08-02 16:46:59 +00:00
|
|
|
|
2015-05-15 13:27:19 +02:00
|
|
|
}
|
|
|
|
}
|
2004-08-02 16:46:59 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2010-10-27 13:11:31 +01:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|