1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 #include <com/sun/star/accessibility/XAccessibleEventListener.hpp>
23 #include <com/sun/star/accessibility/XAccessible.hpp>
25 #include <cppuhelper/implbase.hxx>
27 class AccObjectWinManager
;
30 * AccEventListener is the general event listener for all controls. It defines the
31 * procedure of all the event handling and provides the basic support for some simple
34 class AccEventListener
: public ::cppu::WeakImplHelper
<css::accessibility::XAccessibleEventListener
>
37 //accessible owner's pointer
38 css::uno::Reference
<css::accessibility::XAccessible
> m_xAccessible
;
39 // reference to object's manager
40 AccObjectWinManager
& m_rObjManager
;
43 AccEventListener(css::accessibility::XAccessible
* pAcc
, AccObjectWinManager
& rManager
);
44 virtual ~AccEventListener() override
;
47 virtual void SAL_CALL
disposing(const css::lang::EventObject
& Source
) override
;
49 // XAccessibleEventListener
51 notifyEvent(const css::accessibility::AccessibleEventObject
& aEvent
) override
;
53 virtual void HandleNameChangedEvent();
55 virtual void HandleChildChangedEvent(css::uno::Any oldValue
, css::uno::Any newValue
);
56 virtual void HandleDescriptionChangedEvent();
58 //for state changed event
59 virtual void HandleStateChangedEvent(css::uno::Any oldValue
, css::uno::Any newValue
);
60 virtual void SetComponentState(sal_Int64 state
, bool enable
);
61 virtual void FireStatePropertyChange(sal_Int64 state
, bool set
);
62 virtual void FireStateFocusedChange(bool enable
);
64 //for bound rect changed event
65 virtual void HandleBoundrectChangedEvent();
67 //for visible data changed event
68 virtual void HandleVisibleDataChangedEvent();
70 // get the accessible role of m_xAccessible
71 virtual short GetRole();
72 //get the accessible parent's role
73 virtual short GetParentRole();
75 void RemoveMeFromBroadcaster(bool isNotifyDestroy
);
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */