1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_SD_SOURCE_UI_INC_ACCESSIBLEPAGESHAPE_HXX
21 #define INCLUDED_SD_SOURCE_UI_INC_ACCESSIBLEPAGESHAPE_HXX
23 #include <svx/AccessibleShape.hxx>
25 namespace com
{ namespace sun
{ namespace star
{ namespace accessibility
{ class XAccessible
; } } } }
26 namespace com
{ namespace sun
{ namespace star
{ namespace drawing
{ class XDrawPage
; } } } }
27 namespace accessibility
{ class AccessibleShapeTreeInfo
; }
29 namespace accessibility
{
31 /** A page shape represents the actual page as seen on the screen.
33 class AccessiblePageShape
34 : public AccessibleShape
37 //===== internal ========================================================
39 /** Create a new accessible object that makes the given shape accessible.
41 The accessible parent object. It will be used, for example when
42 the <member>getIndexInParent</member> method is called.
44 Bundle of information passed to this shape and all of its descendants.
46 Always call the <member>init</member> method after creating a
47 new accessible shape. This is one way to overcome the potential
48 problem of registering the new object with e.g. event
49 broadcasters. That would delete the new object if a broadcaster
50 would not keep a strong reference to the new object.
53 const css::uno::Reference
<css::drawing::XDrawPage
>& rxPage
,
54 const css::uno::Reference
<css::accessibility::XAccessible
>& rxParent
,
55 const AccessibleShapeTreeInfo
& rShapeTreeInfo
);
57 virtual ~AccessiblePageShape() override
;
59 //===== XAccessibleContext ==============================================
61 /// Returns always 0 because there can be no children.
62 virtual sal_Int32 SAL_CALL
63 getAccessibleChildCount() override
;
65 /** Return the specified child.
67 Index of the requested child.
69 Reference of the requested child which is the accessible object
71 @throws IndexOutOfBoundsException
72 Throws always an exception because there are no children.
74 virtual css::uno::Reference
<css::accessibility::XAccessible
> SAL_CALL
75 getAccessibleChild (sal_Int32 nIndex
) override
;
77 //===== XAccessibleComponent ============================================
79 virtual css::awt::Rectangle SAL_CALL
getBounds() override
;
81 virtual sal_Int32 SAL_CALL
getForeground() override
;
83 virtual sal_Int32 SAL_CALL
getBackground() override
;
85 //===== XComponent ======================================================
90 //===== XServiceInfo ====================================================
92 virtual OUString SAL_CALL
93 getImplementationName() override
;
95 virtual css::uno::Sequence
< OUString
> SAL_CALL
96 getSupportedServiceNames() override
;
98 using AccessibleShape::disposing
;
101 /** Create a base name string that contains the accessible name.
104 CreateAccessibleBaseName() override
;
107 CreateAccessibleName() override
;
110 css::uno::Reference
<css::drawing::XDrawPage
> mxPage
;
112 AccessiblePageShape (const AccessiblePageShape
&) = delete;
113 AccessibleShape
& operator= (const AccessiblePageShape
&) = delete;
116 } // end of namespace accessibility
120 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */