Branch libreoffice-5-0-4
[LibreOffice.git] / include / svx / IAccessibleParent.hxx
blobd92edc97336fab65301ff3a15546efd7ffee4fba
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_IACCESSIBLEPARENT_HXX
21 #define INCLUDED_SVX_IACCESSIBLEPARENT_HXX
23 #include <com/sun/star/uno/RuntimeException.hpp>
24 #include <com/sun/star/drawing/XShape.hpp>
25 #include <sal/types.h>
26 #include "AccessibleControlShape.hxx"
27 namespace accessibility {
29 class AccessibleShape;
30 class AccessibleShapeTreeInfo;
32 /** This interface contains methods missing from the
33 XAccessibleContext interface that allow the modification of
34 parent/child relationship.
36 class IAccessibleParent
38 public:
39 /** Allow for a virtual destructor.
41 virtual ~IAccessibleParent(){};
43 /** A call to this method requests the implementor to replace one child
44 with another and send the appropriate notifications. That are two
45 child events: One notifying the removal of the current child and one
46 about the existence of the new child. The index of the new child is
47 implementation dependent, i.e. it is not guaranteed that the
48 replacement has the same index as the current child has.
50 <p>A default implementation can just use the ShapeTypeHandler::CreateAccessibleObject
51 to let a factory create the new instance with the parameters given, and then
52 place the new shape into the own structures.</p>
54 @param pCurrentChild
55 This child is about to be replaced.
57 @param _rxShape
58 The UNO shape which the old and new child represent
60 @param _nIndex
61 The IndexInParent of the old child. Note that the index in
62 parent of the replacement is not necessarily the same as
63 that of the current child.
65 @param _rShapeTreeInfo
66 The TreeInfo for the old child.
68 @return
69 If the replacement has taken place successfully <TRUE/> is
70 returned. If the replacement can not be carried out or an error
71 occurs that does not result in an exception then <FALSE/> is
72 returned.
74 @raises RuntimeException
75 in case something went heavily wrong
77 virtual bool ReplaceChild (
78 AccessibleShape* pCurrentChild,
79 const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& _rxShape,
80 const long _nIndex,
81 const AccessibleShapeTreeInfo& _rShapeTreeInfo
82 ) throw (::com::sun::star::uno::RuntimeException) = 0;
83 //Add this method to support Form Controls
84 virtual AccessibleControlShape* GetAccControlShapeFromModel
85 (::com::sun::star::beans::XPropertySet*)
86 throw (::com::sun::star::uno::RuntimeException){return NULL;};
87 virtual ::com::sun::star::uno::Reference<
88 ::com::sun::star::accessibility::XAccessible>
89 GetAccessibleCaption (const ::com::sun::star::uno::Reference<
90 ::com::sun::star::drawing::XShape>&)
91 throw (::com::sun::star::uno::RuntimeException){return NULL;};
92 virtual bool IsDocumentSelAll(){ return false; }
95 } // end of namespace accessibility
97 #endif
99 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */