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 enum class UnoMSAAEvent
;
25 #include "AccEventListener.hxx"
26 #include <com/sun/star/accessibility/XAccessibleEventListener.hpp>
27 #include <com/sun/star/accessibility/XAccessible.hpp>
31 * AccContainerEventListener is inherited from AccEventListener. It handles the events
32 * generated by container controls. The accessible roles are: CANVAS, COMBO_BOX, DOCUMENT,
33 * EMBEDDED_OBJECT, END_NOTE, FILLER, FOOTNOTE, FOOTER, GRAPHIC, HEADER, LAYERED_PANE,
34 * MENU_BAR, POPUP_MENU, OPTION_PANE, PAGE_TAB, PAGE_TAB_LIST, PANEL, SCROLL_PANE, SPLIT_PANE,
35 * STATUS_BAR, TABLE_CELL, TEXT_FRAME, TOOL_BAR, VIEW_PORT.
36 * It defines the procedure of specific event handling related with containers and provides
37 * the detailed support for some related methods.
39 class AccContainerEventListener
: public AccEventListener
42 AccContainerEventListener(css::accessibility::XAccessible
* pAcc
, AccObjectWinManager
& rManager
);
43 virtual ~AccContainerEventListener() override
;
45 //AccessibleEventListener
46 virtual void SAL_CALL
notifyEvent( const css::accessibility::AccessibleEventObject
& aEvent
) override
;
48 //for selection changed event
49 virtual void HandleSelectionChangedEvent(
50 const css::uno::Any
&oldValue
, const css::uno::Any
&newValue
);
52 //for all children changed event
53 virtual void HandleAllChildrenChangedEvent();
55 //for text changed event
56 virtual void HandleTextChangedEvent(
57 css::uno::Any oldValue
, css::uno::Any newValue
);
58 virtual void HandleStateChangedEvent(
59 css::uno::Any oldValue
, css::uno::Any newValue
) override
;
61 //for value changed event
62 virtual void HandleValueChangedEvent(
63 css::uno::Any oldValue
, css::uno::Any newValue
);
66 virtual void SetComponentState(sal_Int64 state
, bool enable
) override
;
67 virtual void FireStatePropertyChange(sal_Int64 state
, bool set
) override
;
68 virtual void FireStateFocusedChange(bool enable
) override
;
69 virtual bool IsEditable(css::uno::Reference
<css::accessibility::XAccessibleContext
> const & xContext
);
71 // update all children's state
72 void UpdateAllChildrenState( css::accessibility::XAccessible
* pXAccessible
);
74 bool NotifyChildEvent(UnoMSAAEvent eWinEvent
, const css::uno::Any
& Value
);
76 virtual void HandleSelectionChangedAddEvent(
77 const css::uno::Any
&oldValue
, const css::uno::Any
&newValue
);
78 virtual void HandleSelectionChangedRemoveEvent(
79 const css::uno::Any
&oldValue
, const css::uno::Any
&newValue
);
80 virtual void HandleSelectionChangedWithinEvent(
81 const css::uno::Any
&oldValue
, const css::uno::Any
&newValue
);
83 virtual void HandlePageChangedEvent(
84 const css::uno::Any
&oldValue
, const css::uno::Any
&newValue
);
86 virtual void HandleSectionChangedEvent(
87 const css::uno::Any
&oldValue
, const css::uno::Any
&newValue
);
88 virtual void HandleColumnChangedEvent(
89 const css::uno::Any
&oldValue
, const css::uno::Any
&newValue
);
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */