Update ooo320-m1
[ooovba.git] / svx / inc / svx / AccessibleShapeInfo.hxx
blobd5f1c8c0d62e1340b2fb2328cc904d49539395c8
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: AccessibleShapeInfo.hxx,v $
10 * $Revision: 1.3 $
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 ************************************************************************/
31 #ifndef _SVX_ACCESSIBILITY_ACCESSIBLE_SHAPE_INFO_HXX
32 #define _SVX_ACCESSIBILITY_ACCESSIBLE_SHAPE_INFO_HXX
34 #include <com/sun/star/drawing/XShape.hpp>
35 #include <com/sun/star/accessibility/XAccessible.hpp>
36 #include <svx/IAccessibleParent.hxx>
37 #include "svx/svxdllapi.h"
39 namespace accessibility {
41 /** @descr
42 This class is a container for the information specific for a single
43 shape that is passed to the constructor of that shape. It allows to
44 separate the class definitions of the shapes from the information
45 needed on construction. Only the shapes' implementation has to be
46 adapted to a modified <type>AccessibleShapeInfo</type> definition.
48 <p>Note that this class complements the
49 <type>AccessibleShapeTreeInfo</type> interface which contains
50 information that is passed to all shapes in a subtree not just to a
51 single shape. </p>
53 class SVX_DLLPUBLIC AccessibleShapeInfo
55 public:
56 /** The shape itself for which an accessible object is to be
57 constructed.
59 ::com::sun::star::uno::Reference<
60 ::com::sun::star::drawing::XShape> mxShape;
62 /** The accessible parent object of the shape.
64 ::com::sun::star::uno::Reference<
65 ::com::sun::star::accessibility::XAccessible> mxParent;
67 /** This object that may be realized by the same implementation as that
68 of that of <member>mxParent</member> can be used to modify
69 parent/child relationships with the shape as initiator.
70 Note that NULL is a valid value for this member.
72 IAccessibleParent* mpChildrenManager;
74 /** This index is used to disambiguate names of accessible objects. A
75 value of (the default) -1 leads to the use of the object's z-order
76 instead. Because that is not a good substitute, better pass an ever
77 increasing counter.
79 sal_Int32 mnIndex;
81 /** Copy the given values into the members described above.
83 AccessibleShapeInfo (
84 const ::com::sun::star::uno::Reference<
85 ::com::sun::star::drawing::XShape>& rxShape,
86 const ::com::sun::star::uno::Reference<
87 ::com::sun::star::accessibility::XAccessible>& rxParent,
88 IAccessibleParent* pChildrenManager,
89 sal_Int32 nIndex = -1);
91 /** Copy the given values into the members described above.
92 The accessible parent implementation object is set to NULL.
94 AccessibleShapeInfo (
95 const ::com::sun::star::uno::Reference<
96 ::com::sun::star::drawing::XShape>& rxShape,
97 const ::com::sun::star::uno::Reference<
98 ::com::sun::star::accessibility::XAccessible>& rxParent,
99 sal_Int32 nIndex = -1);
101 ~AccessibleShapeInfo (void);
103 AccessibleShapeInfo (const AccessibleShapeInfo&);
104 private:
105 // Don't use these three methods.
106 SVX_DLLPRIVATE explicit AccessibleShapeInfo (void);
107 SVX_DLLPRIVATE AccessibleShapeInfo& operator= (const AccessibleShapeInfo&);
110 } // end of namespace accessibility
112 #endif