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 _ACCFRAMEBASE_HXX
24 #define _ACCFRAMEBASE_HXX
25 
26 //IAccessibility2 Implementation 2009-----
27 #ifndef _PAM_HXX
28 #include <pam.hxx>
29 #endif
30 //-----IAccessibility2 Implementation 2009
31 
32 #include <acccontext.hxx>
33 
34 #include <calbck.hxx>
35 
36 class SwFlyFrm;
37 
38 class SwAccessibleFrameBase : public SwAccessibleContext,
39                               public SwClient
40 {
41 	sal_Bool	bIsSelected;	// protected by base class mutex
42 
43 	sal_Bool	IsSelected();
44 
45 protected:
46 
47 	// Set states for getAccessibleStateSet.
48 	// This drived class additionaly sets SELECTABLE(1), SELECTED(+),
49 	// FOCUSABLE(1) and FOCUSED(+)
50 	virtual void GetStates( ::utl::AccessibleStateSetHelper& rStateSet );
51 	//IAccessibility2 Implementation 2009-----
52 	SwFlyFrm* getFlyFrm() const;
53 	sal_Bool GetSelectedState( );
54 	SwPaM* GetCrsr();
55 	//-----IAccessibility2 Implementation 2009
56 
57 	virtual void _InvalidateCursorPos();
58 	virtual void _InvalidateFocus();
59 
60 	virtual ~SwAccessibleFrameBase();
61 	virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
62 
63 public:
64 
65     SwAccessibleFrameBase( SwAccessibleMap* pInitMap,
66                            sal_Int16 nInitRole,
67                            const SwFlyFrm *pFlyFrm );
68 
69 	virtual sal_Bool HasCursor();	// required by map to remember that object
70 
71 	static sal_uInt8 GetNodeType( const SwFlyFrm *pFlyFrm );
72 
73 	// The object is not visible an longer and should be destroyed
74 	virtual void Dispose( sal_Bool bRecursive = sal_False );
75 	virtual sal_Bool SetSelectedState( sal_Bool bSeleted );
76 	//-----IAccessibility2 Implementation 2009
77 };
78 
79 
80 #endif
81