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_SW_SOURCE_CORE_ACCESS_ACCFRMOBJ_HXX
21 #define INCLUDED_SW_SOURCE_CORE_ACCESS_ACCFRMOBJ_HXX
23 #include <vcl/vclptr.hxx>
25 class SwAccessibleMap
;
28 namespace vcl
{ class Window
; }
31 namespace sw::access
{
33 class SwAccessibleChild
38 explicit SwAccessibleChild( const SdrObject
* pDrawObj
);
39 explicit SwAccessibleChild( const SwFrame
* pFrame
);
40 explicit SwAccessibleChild( vcl::Window
* pWindow
);
41 SwAccessibleChild( const SwFrame
* pFrame
,
42 const SdrObject
* pDrawObj
,
43 vcl::Window
* pWindow
);
45 SwAccessibleChild(SwAccessibleChild
const &) = default;
46 SwAccessibleChild(SwAccessibleChild
&&) = default;
47 SwAccessibleChild
& operator =(SwAccessibleChild
const &) = default;
48 SwAccessibleChild
& operator =(SwAccessibleChild
&&) = default;
50 SwAccessibleChild
& operator=( const SdrObject
* pDrawObj
);
51 SwAccessibleChild
& operator=( const SwFrame
* pFrame
);
52 SwAccessibleChild
& operator=( vcl::Window
* pWindow
);
54 bool operator==( const SwAccessibleChild
& r
) const
56 return mpFrame
== r
.mpFrame
&&
57 mpDrawObj
== r
.mpDrawObj
&&
58 mpWindow
== r
.mpWindow
;
63 const SwFrame
* GetSwFrame() const { return mpFrame
; }
64 const SdrObject
* GetDrawObject() const { return mpDrawObj
; }
65 vcl::Window
* GetWindow() const { return mpWindow
; }
67 const SwFrame
* GetParent( const bool bInPagePreview
) const;
69 bool IsAccessible( bool bPagePreview
) const;
70 bool IsBoundAsChar() const;
72 bool IsVisibleChildrenOnly() const;
73 SwRect
GetBox( const SwAccessibleMap
& rAccMap
) const;
74 SwRect
GetBounds( const SwAccessibleMap
& rAccMap
) const;
76 /** indicating, if accessible child is included even, if the corresponding
77 object is not visible. */
78 bool AlwaysIncludeAsChild() const;
81 const SwFrame
* mpFrame
;
82 const SdrObject
* mpDrawObj
;
83 VclPtr
<vcl::Window
> mpWindow
;
85 void Init( const SdrObject
* pDrawObj
);
86 void Init( const SwFrame
* pFrame
);
87 void Init( vcl::Window
* pWindow
);
90 } // eof of namespace sw::access
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */