update dev300-m58
[ooovba.git] / sc / source / ui / inc / AccessibleDataPilotControl.hxx
blob0095b389daa6ff2dbb31c08d59c5779934d4e205
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: AccessibleDataPilotControl.hxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
32 #ifndef _SC_ACCESSIBLEDATAPILOTCONTROL_HXX
33 #define _SC_ACCESSIBLEDATAPILOTCONTROL_HXX
35 #include "AccessibleContextBase.hxx"
37 class ScDPFieldWindow;
38 class ScAccessibleDataPilotButton;
40 class ScAccessibleDataPilotControl
41 : public ScAccessibleContextBase
43 public:
44 //===== internal ========================================================
45 ScAccessibleDataPilotControl(
46 const ::com::sun::star::uno::Reference<
47 ::com::sun::star::accessibility::XAccessible>& rxParent,
48 ScDPFieldWindow* pDPFieldWindow);
50 virtual void Init();
52 using ScAccessibleContextBase::disposing;
53 virtual void SAL_CALL disposing();
55 void AddField(sal_Int32 nNewIndex);
56 void RemoveField(sal_Int32 nOldIndex);
57 void FieldFocusChange(sal_Int32 nOldIndex, sal_Int32 nNewIndex);
58 void FieldNameChange(sal_Int32 nIndex);
59 void GotFocus();
60 void LostFocus();
61 protected:
62 virtual ~ScAccessibleDataPilotControl(void);
63 public:
64 ///===== XAccessibleComponent ============================================
66 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
67 SAL_CALL getAccessibleAtPoint(
68 const ::com::sun::star::awt::Point& rPoint )
69 throw (::com::sun::star::uno::RuntimeException);
71 virtual sal_Bool SAL_CALL isVisible( )
72 throw (::com::sun::star::uno::RuntimeException);
74 virtual void SAL_CALL grabFocus( )
75 throw (::com::sun::star::uno::RuntimeException);
77 virtual sal_Int32 SAL_CALL getForeground( )
78 throw (::com::sun::star::uno::RuntimeException);
80 virtual sal_Int32 SAL_CALL getBackground( )
81 throw (::com::sun::star::uno::RuntimeException);
83 ///===== XAccessibleContext ==============================================
85 /// Return the number of currently visible children.
86 virtual sal_Int32 SAL_CALL
87 getAccessibleChildCount(void) throw (::com::sun::star::uno::RuntimeException);
89 /// Return the specified child or NULL if index is invalid.
90 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
91 getAccessibleChild(sal_Int32 nIndex)
92 throw (::com::sun::star::uno::RuntimeException,
93 ::com::sun::star::lang::IndexOutOfBoundsException);
95 /// Return the set of current states.
96 virtual ::com::sun::star::uno::Reference<
97 ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL
98 getAccessibleStateSet(void)
99 throw (::com::sun::star::uno::RuntimeException);
101 ///===== XServiceInfo ====================================================
103 /** Returns an identifier for the implementation of this object.
105 virtual ::rtl::OUString SAL_CALL
106 getImplementationName(void)
107 throw (::com::sun::star::uno::RuntimeException);
109 ///===== XTypeProvider ===================================================
111 /** Returns a implementation id.
113 virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
114 getImplementationId(void)
115 throw (::com::sun::star::uno::RuntimeException);
117 protected:
118 /// Return this object's description.
119 virtual ::rtl::OUString SAL_CALL
120 createAccessibleDescription(void)
121 throw (::com::sun::star::uno::RuntimeException);
123 /// Return the object's current name.
124 virtual ::rtl::OUString SAL_CALL
125 createAccessibleName(void)
126 throw (::com::sun::star::uno::RuntimeException);
128 /// Return the object's current bounding box relative to the desktop.
129 virtual Rectangle GetBoundingBoxOnScreen(void) const
130 throw (::com::sun::star::uno::RuntimeException);
132 /// Return the object's current bounding box relative to the parent object.
133 virtual Rectangle GetBoundingBox(void) const
134 throw (::com::sun::star::uno::RuntimeException);
136 private:
137 ScDPFieldWindow* mpDPFieldWindow;
138 struct AccessibleWeak
140 ::com::sun::star::uno::WeakReference< ::com::sun::star::accessibility::XAccessible > xWeakAcc;
141 ScAccessibleDataPilotButton* pAcc;
142 AccessibleWeak() : pAcc(NULL) {}
144 ::std::vector< AccessibleWeak > maChildren;
148 #endif