LibreOffice Module svx (master)  1
ChildrenManager.hxx
Go to the documentation of this file.
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_CHILDRENMANAGER_HXX
21 #define INCLUDED_SVX_CHILDRENMANAGER_HXX
22 
23 #include <sal/config.h>
24 
25 #include <com/sun/star/uno/Reference.hxx>
26 #include <rtl/ref.hxx>
27 #include <svx/svxdllapi.h>
28 #include <tools/long.hxx>
29 
30 namespace com::sun::star
31 {
32 namespace accessibility
33 {
34 class XAccessible;
35 }
36 namespace drawing
37 {
38 class XShape;
39 }
40 namespace drawing
41 {
42 class XShapes;
43 }
44 }
45 
46 namespace accessibility
47 {
48 class AccessibleContextBase;
49 class AccessibleShapeTreeInfo;
50 class ChildrenManagerImpl;
51 
89 {
90 public:
108  ChildrenManager(const css::uno::Reference<css::accessibility::XAccessible>& rxParent,
109  const css::uno::Reference<css::drawing::XShapes>& rxShapeList,
110  const AccessibleShapeTreeInfo& rShapeTreeInfo, AccessibleContextBase& rContext);
111 
115  ~ChildrenManager();
116 
121  tools::Long GetChildCount() const noexcept;
122 
136  css::uno::Reference<css::accessibility::XAccessible> GetChild(tools::Long nIndex);
139  css::uno::Reference<css::drawing::XShape> GetChildShape(tools::Long nIndex);
140 
152  void Update(bool bCreateNewObjectsOnDemand = true);
153 
158  void SetShapeList(const css::uno::Reference<css::drawing::XShapes>& xShapeList);
159 
167  void AddAccessibleShape(css::uno::Reference<css::accessibility::XAccessible> const& shape);
168 
172  void ClearAccessibleShapeList();
173 
179  void SetInfo(AccessibleShapeTreeInfo const& rShapeTreeInfo);
180 
185  void UpdateSelection();
186 
193  bool HasFocus() const;
194 
199  void RemoveFocus();
200 
201  void ViewForwarderChanged();
202 
203 private:
205 
206  ChildrenManager(const ChildrenManager&) = delete;
207  ChildrenManager& operator=(const ChildrenManager&) = delete;
208 };
209 
210 } // end of namespace accessibility
211 
212 #endif
213 
214 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_Int32 nIndex
long Long
The AccessibleChildrenManager class acts as a cache of the accessible objects of the currently visibl...
#define SVX_DLLPUBLIC
Definition: svxdllapi.h:28
rtl::Reference< ChildrenManagerImpl > mpImpl
This class bundles all information that is passed down the tree of accessible shapes so that each sha...