Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
20 :
21 : #ifndef _SC_ACCESSIBLEDATAPILOTCONTROL_HXX
22 : #define _SC_ACCESSIBLEDATAPILOTCONTROL_HXX
23 :
24 : #include "AccessibleContextBase.hxx"
25 :
26 : class ScDPFieldControlBase;
27 : class ScAccessibleDataPilotButton;
28 :
29 : class ScAccessibleDataPilotControl
30 : : public ScAccessibleContextBase
31 : {
32 : public:
33 : //===== internal ========================================================
34 : ScAccessibleDataPilotControl(
35 : const ::com::sun::star::uno::Reference<
36 : ::com::sun::star::accessibility::XAccessible>& rxParent,
37 : ScDPFieldControlBase* pFieldWindow);
38 :
39 : virtual void Init();
40 :
41 : using ScAccessibleContextBase::disposing;
42 : virtual void SAL_CALL disposing();
43 :
44 : void AddField(sal_Int32 nNewIndex);
45 : void MoveField(sal_Int32 nOldIndex, sal_Int32 nNewIndex);
46 : void RemoveField(sal_Int32 nOldIndex);
47 : void FieldFocusChange(sal_Int32 nOldIndex, sal_Int32 nNewIndex);
48 : void FieldNameChange(sal_Int32 nIndex);
49 : void GotFocus();
50 : void LostFocus();
51 : protected:
52 : virtual ~ScAccessibleDataPilotControl(void);
53 : public:
54 : ///===== XAccessibleComponent ============================================
55 :
56 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
57 : SAL_CALL getAccessibleAtPoint(
58 : const ::com::sun::star::awt::Point& rPoint )
59 : throw (::com::sun::star::uno::RuntimeException);
60 :
61 : virtual sal_Bool SAL_CALL isVisible( )
62 : throw (::com::sun::star::uno::RuntimeException);
63 :
64 : virtual void SAL_CALL grabFocus( )
65 : throw (::com::sun::star::uno::RuntimeException);
66 :
67 : virtual sal_Int32 SAL_CALL getForeground( )
68 : throw (::com::sun::star::uno::RuntimeException);
69 :
70 : virtual sal_Int32 SAL_CALL getBackground( )
71 : throw (::com::sun::star::uno::RuntimeException);
72 :
73 : ///===== XAccessibleContext ==============================================
74 :
75 : /// Return the number of currently visible children.
76 : virtual sal_Int32 SAL_CALL
77 : getAccessibleChildCount(void) throw (::com::sun::star::uno::RuntimeException);
78 :
79 : /// Return the specified child or NULL if index is invalid.
80 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
81 : getAccessibleChild(sal_Int32 nIndex)
82 : throw (::com::sun::star::uno::RuntimeException,
83 : ::com::sun::star::lang::IndexOutOfBoundsException);
84 :
85 : /// Return the set of current states.
86 : virtual ::com::sun::star::uno::Reference<
87 : ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL
88 : getAccessibleStateSet(void)
89 : throw (::com::sun::star::uno::RuntimeException);
90 :
91 : ///===== XServiceInfo ====================================================
92 :
93 : /** Returns an identifier for the implementation of this object.
94 : */
95 : virtual ::rtl::OUString SAL_CALL
96 : getImplementationName(void)
97 : throw (::com::sun::star::uno::RuntimeException);
98 :
99 : ///===== XTypeProvider ===================================================
100 :
101 : /** Returns a implementation id.
102 : */
103 : virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
104 : getImplementationId(void)
105 : throw (::com::sun::star::uno::RuntimeException);
106 :
107 : protected:
108 : /// Return this object's description.
109 : virtual ::rtl::OUString SAL_CALL
110 : createAccessibleDescription(void)
111 : throw (::com::sun::star::uno::RuntimeException);
112 :
113 : /// Return the object's current name.
114 : virtual ::rtl::OUString SAL_CALL
115 : createAccessibleName(void)
116 : throw (::com::sun::star::uno::RuntimeException);
117 :
118 : /// Return the object's current bounding box relative to the desktop.
119 : virtual Rectangle GetBoundingBoxOnScreen(void) const
120 : throw (::com::sun::star::uno::RuntimeException);
121 :
122 : /// Return the object's current bounding box relative to the parent object.
123 : virtual Rectangle GetBoundingBox(void) const
124 : throw (::com::sun::star::uno::RuntimeException);
125 :
126 : private:
127 : ScDPFieldControlBase* mpFieldWindow;
128 0 : struct AccessibleWeak
129 : {
130 : ::com::sun::star::uno::WeakReference< ::com::sun::star::accessibility::XAccessible > xWeakAcc;
131 : ScAccessibleDataPilotButton* pAcc;
132 0 : AccessibleWeak() : pAcc(NULL) {}
133 : };
134 : ::std::vector< AccessibleWeak > maChildren;
135 : };
136 :
137 :
138 : #endif
139 :
140 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|