AccEventListener.hxx 3.01 KB
Newer Older
1 2 3
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is part of the LibreOffice project.
4
 *
5 6 7
 * 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/.
8
 *
9
 * This file incorporates work covered by the following license notice:
10
 *
11 12 13 14 15 16 17 18
 *   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 .
 */
19

20 21
#ifndef INCLUDED_WINACCESSIBILITY_INC_ACCEVENTLISTENER_HXX
#define INCLUDED_WINACCESSIBILITY_INC_ACCEVENTLISTENER_HXX
22 23 24

#include <com/sun/star/accessibility/XAccessibleEventListener.hpp>
#include <com/sun/star/accessibility/XAccessible.hpp>
25

26
#include <cppuhelper/implbase.hxx>
27

28
class AccObjectManagerAgent;
29

30 31 32 33 34
/**
 * AccEventListener is the general event listener for all controls. It defines the
 * procedure of all the event handling and provides the basic support for some simple
 * methods.
 */
35
class AccEventListener
36
    : public ::cppu::WeakImplHelper<
37
        css::accessibility::XAccessibleEventListener>
38 39 40
{
protected:
    //accessible owner's pointer
41
    css::uno::Reference<css::accessibility::XAccessible> m_xAccessible;
42 43 44
    //agent pointer for objects' manager
    AccObjectManagerAgent* pAgent;
public:
45
    AccEventListener( css::accessibility::XAccessible* pAcc, AccObjectManagerAgent* Agent);
46
    virtual ~AccEventListener() override;
47

48
    // XEventListener
49
    virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
50 51

    // XAccessibleEventListener
52
    virtual void SAL_CALL notifyEvent( const css::accessibility::AccessibleEventObject& aEvent ) override;
53 54

    //for name changed event
55
    virtual void HandleNameChangedEvent(css::uno::Any name);
56 57

    //for description changed event
58
    virtual void HandleDescriptionChangedEvent(css::uno::Any desc);
59 60

    //for state changed event
61
    virtual void HandleStateChangedEvent(
62
            css::uno::Any oldValue, css::uno::Any newValue);
63 64 65
    virtual void SetComponentState(short state, bool enable);
    virtual void FireStatePropertyChange(short state, bool set);
    virtual void FireStateFocusedChange(bool enable);
66 67

    //for bound rect changed event
68
    virtual void HandleBoundrectChangedEvent();
69 70

    //for visible data changed event
71
    virtual void HandleVisibleDataChangedEvent();
72

73
    // get the accessible role of m_xAccessible
74
    virtual short GetRole();
75
    //get the accessible parent's role
76 77 78
    virtual short GetParentRole();

    void RemoveMeFromBroadcaster();
79 80
};

81
#endif // INCLUDED_WINACCESSIBILITY_INC_ACCEVENTLISTENER_HXX
82 83

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */