android: Update app-specific/MIME type icons
[LibreOffice.git] / sd / source / ui / inc / AccessiblePageShape.hxx
blob1e7568ab00381a14724e5957ecd6ee972a12d7e0
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 #pragma once
22 #include <svx/AccessibleShape.hxx>
24 namespace com::sun::star::accessibility { class XAccessible; }
25 namespace com::sun::star::drawing { class XDrawPage; }
26 namespace accessibility { class AccessibleShapeTreeInfo; }
28 namespace accessibility {
30 /** A page shape represents the actual page as seen on the screen.
32 class AccessiblePageShape
33 : public AccessibleShape
35 public:
36 //===== internal ========================================================
38 /** Create a new accessible object that makes the given shape accessible.
39 @param rxParent
40 The accessible parent object. It will be used, for example when
41 the <member>getIndexInParent</member> method is called.
42 @param rShapeTreeInfo
43 Bundle of information passed to this shape and all of its descendants.
44 @attention
45 Always call the <member>init</member> method after creating a
46 new accessible shape. This is one way to overcome the potential
47 problem of registering the new object with e.g. event
48 broadcasters. That would delete the new object if a broadcaster
49 would not keep a strong reference to the new object.
51 AccessiblePageShape (
52 css::uno::Reference<css::drawing::XDrawPage> xPage,
53 const css::uno::Reference<css::accessibility::XAccessible>& rxParent,
54 const AccessibleShapeTreeInfo& rShapeTreeInfo);
56 virtual ~AccessiblePageShape() override;
58 //===== XAccessibleContext ==============================================
60 /// Returns always 0 because there can be no children.
61 virtual sal_Int64 SAL_CALL
62 getAccessibleChildCount() override;
64 /** Return the specified child.
65 @param nIndex
66 Index of the requested child.
67 @return
68 Reference of the requested child which is the accessible object
69 of a visible shape.
70 @throws IndexOutOfBoundsException
71 Throws always an exception because there are no children.
73 virtual css::uno::Reference<css::accessibility::XAccessible> SAL_CALL
74 getAccessibleChild (sal_Int64 nIndex) override;
76 //===== XAccessibleComponent ============================================
78 virtual css::awt::Rectangle SAL_CALL getBounds() override;
80 virtual sal_Int32 SAL_CALL getForeground() override;
82 virtual sal_Int32 SAL_CALL getBackground() override;
84 //===== XComponent ======================================================
86 virtual void SAL_CALL
87 dispose() override;
89 //===== XServiceInfo ====================================================
91 virtual OUString SAL_CALL
92 getImplementationName() override;
94 virtual css::uno::Sequence< OUString> SAL_CALL
95 getSupportedServiceNames() override;
97 using AccessibleShape::disposing;
99 protected:
100 /** Create a base name string that contains the accessible name.
102 virtual OUString
103 CreateAccessibleBaseName() override;
105 virtual OUString
106 CreateAccessibleName() override;
108 private:
109 css::uno::Reference<css::drawing::XDrawPage> mxPage;
111 AccessiblePageShape (const AccessiblePageShape&) = delete;
112 AccessibleShape& operator= (const AccessiblePageShape&) = delete;
115 } // end of namespace accessibility
117 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */