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 
24 #ifndef SC_ACCESSIBILITYHINTS_HXX
25 #define SC_ACCESSIBILITYHINTS_HXX
26 
27 #include "viewdata.hxx"
28 #include <com/sun/star/uno/XInterface.hpp>
29 #include <svl/smplhint.hxx>
30 #include <svl/hint.hxx>
31 
32 #define SC_HINT_ACC_SIMPLE_START	SFX_HINT_USER00
33 #define SC_HINT_ACC_TABLECHANGED	SC_HINT_ACC_SIMPLE_START + 1
34 #define SC_HINT_ACC_CURSORCHANGED	SC_HINT_ACC_SIMPLE_START + 2
35 #define SC_HINT_ACC_VISAREACHANGED	SC_HINT_ACC_SIMPLE_START + 3
36 #define SC_HINT_ACC_ENTEREDITMODE   SC_HINT_ACC_SIMPLE_START + 4
37 #define SC_HINT_ACC_LEAVEEDITMODE   SC_HINT_ACC_SIMPLE_START + 5
38 #define SC_HINT_ACC_MAKEDRAWLAYER   SC_HINT_ACC_SIMPLE_START + 6
39 #define SC_HINT_ACC_WINDOWRESIZED   SC_HINT_ACC_SIMPLE_START + 7
40 
41 class ScAccWinFocusLostHint : public SfxHint
42 {
43 	::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
44 				xOldAccessible;
45 public:
46 				TYPEINFO();
47 				ScAccWinFocusLostHint(
48 					const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xOld );
49 				~ScAccWinFocusLostHint();
50 
51 	::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
GetOldAccessible() const52 				GetOldAccessible() const { return xOldAccessible; }
53 };
54 
55 class ScAccWinFocusGotHint : public SfxHint
56 {
57 	::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
58 				xNewAccessible;
59 public:
60 				TYPEINFO();
61 				ScAccWinFocusGotHint(
62                     const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xNew );
63 				~ScAccWinFocusGotHint();
64 
65 	::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
GetNewAccessible() const66 				GetNewAccessible() const { return xNewAccessible; }
67 };
68 
69 class ScAccGridWinFocusLostHint : public ScAccWinFocusLostHint
70 {
71 	ScSplitPos	eOldGridWin;
72 public:
73 				TYPEINFO();
74 				ScAccGridWinFocusLostHint( ScSplitPos eOldGridWin,
75 					const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xOld );
76 				~ScAccGridWinFocusLostHint();
77 
GetOldGridWin() const78 	ScSplitPos	GetOldGridWin() const { return eOldGridWin; }
79 };
80 
81 class ScAccGridWinFocusGotHint : public ScAccWinFocusGotHint
82 {
83 	ScSplitPos	eNewGridWin;
84 public:
85 				TYPEINFO();
86 				ScAccGridWinFocusGotHint( ScSplitPos eNewGridWin,
87 					const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xNew );
88 				~ScAccGridWinFocusGotHint();
89 
GetNewGridWin() const90 	ScSplitPos	GetNewGridWin() const { return eNewGridWin; }
91 };
92 
93 #endif
94