1*38d50f7bSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*38d50f7bSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*38d50f7bSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*38d50f7bSAndrew Rist * distributed with this work for additional information 6*38d50f7bSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*38d50f7bSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*38d50f7bSAndrew Rist * "License"); you may not use this file except in compliance 9*38d50f7bSAndrew Rist * with the License. You may obtain a copy of the License at 10*38d50f7bSAndrew Rist * 11*38d50f7bSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*38d50f7bSAndrew Rist * 13*38d50f7bSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*38d50f7bSAndrew Rist * software distributed under the License is distributed on an 15*38d50f7bSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*38d50f7bSAndrew Rist * KIND, either express or implied. See the License for the 17*38d50f7bSAndrew Rist * specific language governing permissions and limitations 18*38d50f7bSAndrew Rist * under the License. 19*38d50f7bSAndrew Rist * 20*38d50f7bSAndrew Rist *************************************************************/ 21*38d50f7bSAndrew Rist 22*38d50f7bSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir 25cdf0e10cSrcweir #ifndef _SC_ACCESSIBLEDATAPILOTCONTROL_HXX 26cdf0e10cSrcweir #define _SC_ACCESSIBLEDATAPILOTCONTROL_HXX 27cdf0e10cSrcweir 28cdf0e10cSrcweir #include "AccessibleContextBase.hxx" 29cdf0e10cSrcweir 30cdf0e10cSrcweir class ScPivotFieldWindow; 31cdf0e10cSrcweir class ScAccessibleDataPilotButton; 32cdf0e10cSrcweir 33cdf0e10cSrcweir class ScAccessibleDataPilotControl 34cdf0e10cSrcweir : public ScAccessibleContextBase 35cdf0e10cSrcweir { 36cdf0e10cSrcweir public: 37cdf0e10cSrcweir //===== internal ======================================================== 38cdf0e10cSrcweir ScAccessibleDataPilotControl( 39cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 40cdf0e10cSrcweir ::com::sun::star::accessibility::XAccessible>& rxParent, 41cdf0e10cSrcweir ScPivotFieldWindow* pFieldWindow); 42cdf0e10cSrcweir 43cdf0e10cSrcweir virtual void Init(); 44cdf0e10cSrcweir 45cdf0e10cSrcweir using ScAccessibleContextBase::disposing; 46cdf0e10cSrcweir virtual void SAL_CALL disposing(); 47cdf0e10cSrcweir 48cdf0e10cSrcweir void AddField(sal_Int32 nNewIndex); 49cdf0e10cSrcweir void RemoveField(sal_Int32 nOldIndex); 50cdf0e10cSrcweir void FieldFocusChange(sal_Int32 nOldIndex, sal_Int32 nNewIndex); 51cdf0e10cSrcweir void FieldNameChange(sal_Int32 nIndex); 52cdf0e10cSrcweir void GotFocus(); 53cdf0e10cSrcweir void LostFocus(); 54cdf0e10cSrcweir protected: 55cdf0e10cSrcweir virtual ~ScAccessibleDataPilotControl(void); 56cdf0e10cSrcweir public: 57cdf0e10cSrcweir ///===== XAccessibleComponent ============================================ 58cdf0e10cSrcweir 59cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > 60cdf0e10cSrcweir SAL_CALL getAccessibleAtPoint( 61cdf0e10cSrcweir const ::com::sun::star::awt::Point& rPoint ) 62cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 63cdf0e10cSrcweir 64cdf0e10cSrcweir virtual sal_Bool SAL_CALL isVisible( ) 65cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 66cdf0e10cSrcweir 67cdf0e10cSrcweir virtual void SAL_CALL grabFocus( ) 68cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 69cdf0e10cSrcweir 70cdf0e10cSrcweir virtual sal_Int32 SAL_CALL getForeground( ) 71cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 72cdf0e10cSrcweir 73cdf0e10cSrcweir virtual sal_Int32 SAL_CALL getBackground( ) 74cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 75cdf0e10cSrcweir 76cdf0e10cSrcweir ///===== XAccessibleContext ============================================== 77cdf0e10cSrcweir 78cdf0e10cSrcweir /// Return the number of currently visible children. 79cdf0e10cSrcweir virtual sal_Int32 SAL_CALL 80cdf0e10cSrcweir getAccessibleChildCount(void) throw (::com::sun::star::uno::RuntimeException); 81cdf0e10cSrcweir 82cdf0e10cSrcweir /// Return the specified child or NULL if index is invalid. 83cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL 84cdf0e10cSrcweir getAccessibleChild(sal_Int32 nIndex) 85cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException, 86cdf0e10cSrcweir ::com::sun::star::lang::IndexOutOfBoundsException); 87cdf0e10cSrcweir 88cdf0e10cSrcweir /// Return the set of current states. 89cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< 90cdf0e10cSrcweir ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL 91cdf0e10cSrcweir getAccessibleStateSet(void) 92cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 93cdf0e10cSrcweir 94cdf0e10cSrcweir ///===== XServiceInfo ==================================================== 95cdf0e10cSrcweir 96cdf0e10cSrcweir /** Returns an identifier for the implementation of this object. 97cdf0e10cSrcweir */ 98cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL 99cdf0e10cSrcweir getImplementationName(void) 100cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 101cdf0e10cSrcweir 102cdf0e10cSrcweir ///===== XTypeProvider =================================================== 103cdf0e10cSrcweir 104cdf0e10cSrcweir /** Returns a implementation id. 105cdf0e10cSrcweir */ 106cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL 107cdf0e10cSrcweir getImplementationId(void) 108cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 109cdf0e10cSrcweir 110cdf0e10cSrcweir protected: 111cdf0e10cSrcweir /// Return this object's description. 112cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL 113cdf0e10cSrcweir createAccessibleDescription(void) 114cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 115cdf0e10cSrcweir 116cdf0e10cSrcweir /// Return the object's current name. 117cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL 118cdf0e10cSrcweir createAccessibleName(void) 119cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 120cdf0e10cSrcweir 121cdf0e10cSrcweir /// Return the object's current bounding box relative to the desktop. 122cdf0e10cSrcweir virtual Rectangle GetBoundingBoxOnScreen(void) const 123cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 124cdf0e10cSrcweir 125cdf0e10cSrcweir /// Return the object's current bounding box relative to the parent object. 126cdf0e10cSrcweir virtual Rectangle GetBoundingBox(void) const 127cdf0e10cSrcweir throw (::com::sun::star::uno::RuntimeException); 128cdf0e10cSrcweir 129cdf0e10cSrcweir private: 130cdf0e10cSrcweir ScPivotFieldWindow* mpFieldWindow; 131cdf0e10cSrcweir struct AccessibleWeak 132cdf0e10cSrcweir { 133cdf0e10cSrcweir ::com::sun::star::uno::WeakReference< ::com::sun::star::accessibility::XAccessible > xWeakAcc; 134cdf0e10cSrcweir ScAccessibleDataPilotButton* pAcc; AccessibleWeakScAccessibleDataPilotControl::AccessibleWeak135cdf0e10cSrcweir AccessibleWeak() : pAcc(NULL) {} 136cdf0e10cSrcweir }; 137cdf0e10cSrcweir ::std::vector< AccessibleWeak > maChildren; 138cdf0e10cSrcweir }; 139cdf0e10cSrcweir 140cdf0e10cSrcweir 141cdf0e10cSrcweir #endif 142