1*3334a7e6SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*3334a7e6SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*3334a7e6SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*3334a7e6SAndrew Rist  * distributed with this work for additional information
6*3334a7e6SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*3334a7e6SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*3334a7e6SAndrew Rist  * "License"); you may not use this file except in compliance
9*3334a7e6SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*3334a7e6SAndrew Rist  *
11*3334a7e6SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*3334a7e6SAndrew Rist  *
13*3334a7e6SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*3334a7e6SAndrew Rist  * software distributed under the License is distributed on an
15*3334a7e6SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*3334a7e6SAndrew Rist  * KIND, either express or implied.  See the License for the
17*3334a7e6SAndrew Rist  * specific language governing permissions and limitations
18*3334a7e6SAndrew Rist  * under the License.
19*3334a7e6SAndrew Rist  *
20*3334a7e6SAndrew Rist  *************************************************************/
21*3334a7e6SAndrew Rist 
22*3334a7e6SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _SVX_ACCESSIBILITY_ACCESSIBLE_SHAPE_INFO_HXX
25cdf0e10cSrcweir #define _SVX_ACCESSIBILITY_ACCESSIBLE_SHAPE_INFO_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <com/sun/star/drawing/XShape.hpp>
28cdf0e10cSrcweir #include <com/sun/star/accessibility/XAccessible.hpp>
29cdf0e10cSrcweir #include <svx/IAccessibleParent.hxx>
30cdf0e10cSrcweir #include "svx/svxdllapi.h"
31cdf0e10cSrcweir 
32cdf0e10cSrcweir namespace accessibility {
33cdf0e10cSrcweir 
34cdf0e10cSrcweir /** @descr
35cdf0e10cSrcweir         This class is a container for the information specific for a single
36cdf0e10cSrcweir         shape that is passed to the constructor of that shape.  It allows to
37cdf0e10cSrcweir         separate the class definitions of the shapes from the information
38cdf0e10cSrcweir         needed on construction.  Only the shapes' implementation has to be
39cdf0e10cSrcweir         adapted to a modified <type>AccessibleShapeInfo</type> definition.
40cdf0e10cSrcweir 
41cdf0e10cSrcweir         <p>Note that this class complements the
42cdf0e10cSrcweir         <type>AccessibleShapeTreeInfo</type> interface which contains
43cdf0e10cSrcweir         information that is passed to all shapes in a subtree not just to a
44cdf0e10cSrcweir         single shape. </p>
45cdf0e10cSrcweir */
46cdf0e10cSrcweir class SVX_DLLPUBLIC AccessibleShapeInfo
47cdf0e10cSrcweir {
48cdf0e10cSrcweir public:
49cdf0e10cSrcweir     /** The shape itself for which an accessible object is to be
50cdf0e10cSrcweir         constructed.
51cdf0e10cSrcweir     */
52cdf0e10cSrcweir     ::com::sun::star::uno::Reference<
53cdf0e10cSrcweir         ::com::sun::star::drawing::XShape> mxShape;
54cdf0e10cSrcweir 
55cdf0e10cSrcweir     /** The accessible parent object of the shape.
56cdf0e10cSrcweir     */
57cdf0e10cSrcweir     ::com::sun::star::uno::Reference<
58cdf0e10cSrcweir         ::com::sun::star::accessibility::XAccessible> mxParent;
59cdf0e10cSrcweir 
60cdf0e10cSrcweir     /** This object that may be realized by the same implementation as that
61cdf0e10cSrcweir         of that of <member>mxParent</member> can be used to modify
62cdf0e10cSrcweir         parent/child relationships with the shape as initiator.
63cdf0e10cSrcweir         Note that NULL is a valid value for this member.
64cdf0e10cSrcweir     */
65cdf0e10cSrcweir     IAccessibleParent* mpChildrenManager;
66cdf0e10cSrcweir 
67cdf0e10cSrcweir     /** This index is used to disambiguate names of accessible objects. A
68cdf0e10cSrcweir         value of (the default) -1 leads to the use of the object's z-order
69cdf0e10cSrcweir         instead.  Because that is not a good substitute, better pass an ever
70cdf0e10cSrcweir         increasing counter.
71cdf0e10cSrcweir     */
72cdf0e10cSrcweir     sal_Int32 mnIndex;
73cdf0e10cSrcweir 
74cdf0e10cSrcweir     /** Copy the given values into the members described above.
75cdf0e10cSrcweir     */
76cdf0e10cSrcweir     AccessibleShapeInfo (
77cdf0e10cSrcweir         const ::com::sun::star::uno::Reference<
78cdf0e10cSrcweir             ::com::sun::star::drawing::XShape>& rxShape,
79cdf0e10cSrcweir         const ::com::sun::star::uno::Reference<
80cdf0e10cSrcweir             ::com::sun::star::accessibility::XAccessible>& rxParent,
81cdf0e10cSrcweir         IAccessibleParent* pChildrenManager,
82cdf0e10cSrcweir         sal_Int32 nIndex = -1);
83cdf0e10cSrcweir 
84cdf0e10cSrcweir     /** Copy the given values into the members described above.
85cdf0e10cSrcweir         The accessible parent implementation object is set to NULL.
86cdf0e10cSrcweir     */
87cdf0e10cSrcweir     AccessibleShapeInfo (
88cdf0e10cSrcweir         const ::com::sun::star::uno::Reference<
89cdf0e10cSrcweir             ::com::sun::star::drawing::XShape>& rxShape,
90cdf0e10cSrcweir         const ::com::sun::star::uno::Reference<
91cdf0e10cSrcweir             ::com::sun::star::accessibility::XAccessible>& rxParent,
92cdf0e10cSrcweir         sal_Int32 nIndex = -1);
93cdf0e10cSrcweir 
94cdf0e10cSrcweir     ~AccessibleShapeInfo (void);
95cdf0e10cSrcweir 
96cdf0e10cSrcweir     AccessibleShapeInfo (const AccessibleShapeInfo&);
97cdf0e10cSrcweir private:
98cdf0e10cSrcweir     // Don't use these three methods.
99cdf0e10cSrcweir     SVX_DLLPRIVATE explicit AccessibleShapeInfo (void);
100cdf0e10cSrcweir     SVX_DLLPRIVATE AccessibleShapeInfo& operator= (const AccessibleShapeInfo&);
101cdf0e10cSrcweir };
102cdf0e10cSrcweir 
103cdf0e10cSrcweir } // end of namespace accessibility
104cdf0e10cSrcweir 
105cdf0e10cSrcweir #endif
106