Branch libreoffice-5-0-4
[LibreOffice.git] / include / svx / AccessibleShapeInfo.hxx
blob0c75bc914b9b4f5663b879713ef8d042ce6cf587
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 .
20 #ifndef INCLUDED_SVX_ACCESSIBLESHAPEINFO_HXX
21 #define INCLUDED_SVX_ACCESSIBLESHAPEINFO_HXX
23 #include <com/sun/star/drawing/XShape.hpp>
24 #include <com/sun/star/accessibility/XAccessible.hpp>
25 #include <svx/IAccessibleParent.hxx>
26 #include <svx/svxdllapi.h>
28 namespace accessibility {
30 /** @descr
31 This class is a container for the information specific for a single
32 shape that is passed to the constructor of that shape. It allows to
33 separate the class definitions of the shapes from the information
34 needed on construction. Only the shapes' implementation has to be
35 adapted to a modified AccessibleShapeInfo definition.
37 <p>Note that this class complements the
38 AccessibleShapeTreeInfo interface which contains
39 information that is passed to all shapes in a subtree not just to a
40 single shape. </p>
42 class SVX_DLLPUBLIC AccessibleShapeInfo
44 public:
45 /** The shape itself for which an accessible object is to be
46 constructed.
48 ::com::sun::star::uno::Reference<
49 ::com::sun::star::drawing::XShape> mxShape;
51 /** The accessible parent object of the shape.
53 ::com::sun::star::uno::Reference<
54 ::com::sun::star::accessibility::XAccessible> mxParent;
56 /** This object that may be realized by the same implementation as that
57 of that of <member>mxParent</member> can be used to modify
58 parent/child relationships with the shape as initiator.
59 Note that NULL is a valid value for this member.
61 IAccessibleParent* mpChildrenManager;
63 /** This index is used to disambiguate names of accessible objects. A
64 value of (the default) -1 leads to the use of the object's z-order
65 instead. Because that is not a good substitute, better pass an ever
66 increasing counter.
68 sal_Int32 mnIndex;
70 /** Copy the given values into the members described above.
72 AccessibleShapeInfo (
73 const ::com::sun::star::uno::Reference<
74 ::com::sun::star::drawing::XShape>& rxShape,
75 const ::com::sun::star::uno::Reference<
76 ::com::sun::star::accessibility::XAccessible>& rxParent,
77 IAccessibleParent* pChildrenManager,
78 sal_Int32 nIndex = -1);
80 /** Copy the given values into the members described above.
81 The accessible parent implementation object is set to NULL.
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 sal_Int32 nIndex = -1);
90 ~AccessibleShapeInfo();
92 AccessibleShapeInfo (const AccessibleShapeInfo&);
93 private:
94 AccessibleShapeInfo& operator= (const AccessibleShapeInfo&) SAL_DELETED_FUNCTION;
97 } // end of namespace accessibility
99 #endif
101 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */