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 // pointer for object's manager
40 AccObjectWinManager
* m_pObjManager
;
43 AccEventListener(css::accessibility::XAccessible
* pAcc
, AccObjectWinManager
* pManager
);
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 //for name changed event
54 virtual void HandleNameChangedEvent(css::uno::Any name
);
56 virtual void HandleChildChangedEvent(css::uno::Any oldValue
, css::uno::Any newValue
);
57 virtual void HandleDescriptionChangedEvent();
59 //for state changed event
60 virtual void HandleStateChangedEvent(css::uno::Any oldValue
, css::uno::Any newValue
);
61 virtual void SetComponentState(sal_Int64 state
, bool enable
);
62 virtual void FireStatePropertyChange(sal_Int64 state
, bool set
);
63 virtual void FireStateFocusedChange(bool enable
);
65 //for bound rect changed event
66 virtual void HandleBoundrectChangedEvent();
68 //for visible data changed event
69 virtual void HandleVisibleDataChangedEvent();
71 // get the accessible role of m_xAccessible
72 virtual short GetRole();
73 //get the accessible parent's role
74 virtual short GetParentRole();
76 void RemoveMeFromBroadcaster(bool isNotifyDestroy
);
79 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */