xref: /aoo41x/main/sw/source/core/access/accpage.hxx (revision 1d2dbeb0)
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 _ACCPAGE_HXX
24 #define _ACCPAGE_HXX
25 
26 #ifndef _ACCCONTEXT_HXX
27 #include "acccontext.hxx"
28 #endif
29 
30 
31 /**
32  * accessibility implementation for the page (SwPageFrm)
33  * The page is _only_ visible in the page preview. For the regular
34  * document view, it doesn't make sense to add this additional element
35  * into the hierarchy. For the page preview, however, the page is the
36  * important.
37  */
38 class SwAccessiblePage : public SwAccessibleContext
39 {
40 	sal_Bool	bIsSelected;	// protected by base class mutex
41 
42 	sal_Bool	IsSelected();
43 
44     using SwAccessibleFrame::GetBounds;
45 
46 protected:
47 
48     // return the bounding box for the page in page preview mode
49 	SwRect GetBounds( /* const SwFrm *pFrm =0 */ );
50 
51 	// Set states for getAccessibleStateSet.
52 	// This drived class additionaly sets
53 	// FOCUSABLE(1) and FOCUSED(+)
54 	virtual void GetStates( ::utl::AccessibleStateSetHelper& rStateSet );
55 
56 	virtual void _InvalidateCursorPos();
57 	virtual void _InvalidateFocus();
58 
59     virtual ~SwAccessiblePage();
60 
61 public:
62     // convenience constructor to avoid typecast;
63     // may only be called with SwPageFrm argument
64     SwAccessiblePage( SwAccessibleMap* pInitMap, const SwFrm* pFrame );
65 
66 
67 
68     //
69     // XAccessibleContext methods that need to be overridden
70     //
71 
72 	virtual ::rtl::OUString SAL_CALL getAccessibleDescription (void)
73         throw (::com::sun::star::uno::RuntimeException);
74 
75     //
76     // XServiceInfo
77     //
78 
79 	virtual ::rtl::OUString SAL_CALL getImplementationName (void)
80         throw (::com::sun::star::uno::RuntimeException);
81     virtual sal_Bool SAL_CALL supportsService (
82         const ::rtl::OUString& sServiceName)
83         throw (::com::sun::star::uno::RuntimeException);
84 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
85     	getSupportedServiceNames (void)
86         throw (::com::sun::star::uno::RuntimeException);
87 
88 	//=====  XTypeProvider  ====================================================
89     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) throw(::com::sun::star::uno::RuntimeException);
90 
91 	virtual sal_Bool HasCursor();	// required by map to remember that object
92 };
93 
94 #endif
95 
96