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 bool IsVisibleChildrenOnly() const; 68 SwRect GetBox( const SwAccessibleMap& rAccMap ) const; 69 SwRect GetBounds( const SwAccessibleMap& rAccMap ) const; 70 71 /** indicating, if accessible child is included even, if the corresponding 72 object is not visible. 73 74 @author OD 75 */ 76 bool AlwaysIncludeAsChild() const; 77 78 private: 79 const SwFrm* mpFrm; 80 const SdrObject* mpDrawObj; 81 Window* mpWindow; 82 83 void Init( const SdrObject* pDrawObj ); 84 void Init( const SwFrm* pFrm ); 85 void Init( Window* pWindow ); 86 }; 87 88 89 } } // eof of namespace sw::access 90 91 #endif 92