Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / source / ui / inc / AccessibleDataPilotControl.hxx
blob9e4db70b2cc11f5cd7033ed240dadcfc958d9ec4
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
21 #ifndef _SC_ACCESSIBLEDATAPILOTCONTROL_HXX
22 #define _SC_ACCESSIBLEDATAPILOTCONTROL_HXX
24 #include "AccessibleContextBase.hxx"
26 class ScDPFieldControlBase;
27 class ScAccessibleDataPilotButton;
29 class ScAccessibleDataPilotControl
30 : public ScAccessibleContextBase
32 public:
33 //===== internal ========================================================
34 ScAccessibleDataPilotControl(
35 const ::com::sun::star::uno::Reference<
36 ::com::sun::star::accessibility::XAccessible>& rxParent,
37 ScDPFieldControlBase* pFieldWindow);
39 virtual void Init();
41 using ScAccessibleContextBase::disposing;
42 virtual void SAL_CALL disposing();
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 ============================================
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);
61 virtual sal_Bool SAL_CALL isVisible( )
62 throw (::com::sun::star::uno::RuntimeException);
64 virtual void SAL_CALL grabFocus( )
65 throw (::com::sun::star::uno::RuntimeException);
67 virtual sal_Int32 SAL_CALL getForeground( )
68 throw (::com::sun::star::uno::RuntimeException);
70 virtual sal_Int32 SAL_CALL getBackground( )
71 throw (::com::sun::star::uno::RuntimeException);
73 ///===== XAccessibleContext ==============================================
75 /// Return the number of currently visible children.
76 virtual sal_Int32 SAL_CALL
77 getAccessibleChildCount(void) throw (::com::sun::star::uno::RuntimeException);
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);
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);
91 ///===== XServiceInfo ====================================================
93 /** Returns an identifier for the implementation of this object.
95 virtual OUString SAL_CALL
96 getImplementationName(void)
97 throw (::com::sun::star::uno::RuntimeException);
99 ///===== XTypeProvider ===================================================
101 /** Returns a implementation id.
103 virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
104 getImplementationId(void)
105 throw (::com::sun::star::uno::RuntimeException);
107 protected:
108 /// Return this object's description.
109 virtual OUString SAL_CALL
110 createAccessibleDescription(void)
111 throw (::com::sun::star::uno::RuntimeException);
113 /// Return the object's current name.
114 virtual OUString SAL_CALL
115 createAccessibleName(void)
116 throw (::com::sun::star::uno::RuntimeException);
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);
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);
126 private:
127 ScDPFieldControlBase* mpFieldWindow;
128 struct AccessibleWeak
130 ::com::sun::star::uno::WeakReference< ::com::sun::star::accessibility::XAccessible > xWeakAcc;
131 ScAccessibleDataPilotButton* pAcc;
132 AccessibleWeak() : pAcc(NULL) {}
134 ::std::vector< AccessibleWeak > maChildren;
138 #endif
140 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */