/src/libreoffice/include/svx/IAccessibleParent.hxx
Line | Count | Source |
1 | | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
2 | | /* |
3 | | * This file is part of the LibreOffice project. |
4 | | * |
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/. |
8 | | * |
9 | | * This file incorporates work covered by the following license notice: |
10 | | * |
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 . |
18 | | */ |
19 | | |
20 | | #ifndef INCLUDED_SVX_IACCESSIBLEPARENT_HXX |
21 | | #define INCLUDED_SVX_IACCESSIBLEPARENT_HXX |
22 | | |
23 | | #include <com/sun/star/uno/Reference.hxx> |
24 | | #include <tools/long.hxx> |
25 | | |
26 | | namespace accessibility { class AccessibleControlShape; } |
27 | | namespace com::sun::star::accessibility { class XAccessible; } |
28 | | namespace com::sun::star::beans { class XPropertySet; } |
29 | | namespace com::sun::star::drawing { class XShape; } |
30 | | |
31 | | namespace accessibility { |
32 | | |
33 | | class AccessibleShape; |
34 | | class AccessibleShapeTreeInfo; |
35 | | |
36 | | /** This interface contains methods missing from the |
37 | | XAccessibleContext interface that allow the modification of |
38 | | parent/child relationship. |
39 | | */ |
40 | | class IAccessibleParent |
41 | | { |
42 | | public: |
43 | | /** Allow for a virtual destructor. |
44 | | */ |
45 | 0 | virtual ~IAccessibleParent(){}; |
46 | | |
47 | | /** A call to this method requests the implementor to replace one child |
48 | | with another and send the appropriate notifications. That are two |
49 | | child events: One notifying the removal of the current child and one |
50 | | about the existence of the new child. The index of the new child is |
51 | | implementation dependent, i.e. it is not guaranteed that the |
52 | | replacement has the same index as the current child has. |
53 | | |
54 | | <p>A default implementation can just use the ShapeTypeHandler::CreateAccessibleObject |
55 | | to let a factory create the new instance with the parameters given, and then |
56 | | place the new shape into the own structures.</p> |
57 | | |
58 | | @param pCurrentChild |
59 | | This child is about to be replaced. |
60 | | |
61 | | @param _rxShape |
62 | | The UNO shape which the old and new child represent |
63 | | |
64 | | @param _nIndex |
65 | | The IndexInParent of the old child. Note that the index in |
66 | | parent of the replacement is not necessarily the same as |
67 | | that of the current child. |
68 | | |
69 | | @param _rShapeTreeInfo |
70 | | The TreeInfo for the old child. |
71 | | |
72 | | @return |
73 | | If the replacement has taken place successfully <TRUE/> is |
74 | | returned. If the replacement can not be carried out or an error |
75 | | occurs that does not result in an exception then <FALSE/> is |
76 | | returned. |
77 | | |
78 | | @throws RuntimeException |
79 | | in case something went heavily wrong |
80 | | */ |
81 | | virtual bool ReplaceChild ( |
82 | | AccessibleShape* pCurrentChild, |
83 | | const css::uno::Reference< css::drawing::XShape >& _rxShape, |
84 | | const tools::Long _nIndex, |
85 | | const AccessibleShapeTreeInfo& _rShapeTreeInfo |
86 | | ) = 0; |
87 | | //Add this method to support Form Controls |
88 | | /// @throws css::uno::RuntimeException |
89 | | virtual AccessibleControlShape* GetAccControlShapeFromModel |
90 | 0 | (css::beans::XPropertySet*){return nullptr;}; |
91 | | |
92 | | //Return a raw pointer here rather than a reference, so that subclasses can override and return a subtype pointer. |
93 | | /// @throws css::uno::RuntimeException |
94 | | virtual css::accessibility::XAccessible* |
95 | | GetAccessibleCaption (const css::uno::Reference< |
96 | 0 | css::drawing::XShape>&){return nullptr;}; |
97 | | |
98 | 0 | virtual bool IsDocumentSelAll(){ return false; } |
99 | | }; |
100 | | |
101 | | } // end of namespace accessibility |
102 | | |
103 | | #endif |
104 | | |
105 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |