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