xref: /aoo41x/main/sw/source/core/access/accfrmobj.hxx (revision 4d7c9de0)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _ACCFRMOBJ_HXX
24 #define _ACCFRMOBJ_HXX
25 
26 #include <sal/types.h>
27 
28 class SwAccessibleMap;
29 class SwFrm;
30 class SdrObject;
31 class Window;
32 class SwRect;
33 
34 namespace sw { namespace access {
35 
36 class SwAccessibleChild
37 {
38     public:
39         SwAccessibleChild();
40         explicit SwAccessibleChild( const SdrObject* pDrawObj );
41         explicit SwAccessibleChild( const SwFrm* pFrm );
42         explicit SwAccessibleChild( Window* pWindow );
43         SwAccessibleChild( const SwFrm* pFrm,
44                            const SdrObject* pDrawObj,
45                            Window* pWindow );
46 
47         SwAccessibleChild( const SwAccessibleChild& r );
48         SwAccessibleChild& operator=( const SwAccessibleChild& r );
49 
50         SwAccessibleChild& operator=( const SdrObject* pDrawObj );
51         SwAccessibleChild& operator=( const SwFrm* pFrm );
52         SwAccessibleChild& operator=( Window* pWindow );
53 
54         bool operator==( const SwAccessibleChild& r ) const;
55 
56         bool IsValid() const;
57 
58         const SwFrm* GetSwFrm() const;
59         const SdrObject* GetDrawObject() const;
60         Window* GetWindow() const;
61 
62         const SwFrm* GetParent( const sal_Bool bInPagePreview ) const;
63 
64         bool IsAccessible( sal_Bool bPagePreview ) const;
65         bool IsBoundAsChar() const;
66 
67 		sal_uInt32 GetAnchorPosition() const;
68 
69         bool IsVisibleChildrenOnly() const;
70         SwRect GetBox( const SwAccessibleMap& rAccMap ) const;
71         SwRect GetBounds( const SwAccessibleMap& rAccMap ) const;
72 
73         /** indicating, if accessible child is included even, if the corresponding
74             object is not visible.
75 
76             @author OD
77         */
78         bool AlwaysIncludeAsChild() const;
79 
80     private:
81         const SwFrm* mpFrm;
82         const SdrObject* mpDrawObj;
83         Window* mpWindow;
84 
85         void Init( const SdrObject* pDrawObj );
86         void Init( const SwFrm* pFrm );
87         void Init( Window* pWindow );
88 };
89 
90 
91 } } // eof of namespace sw::access
92 
93 #endif
94