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 DBAUI_SCROLLHELPER_HXX
24 #define DBAUI_SCROLLHELPER_HXX
25 
26 #ifndef _LINK_HXX
27 #include <tools/link.hxx>
28 #endif
29 #ifndef _SV_GEN_HXX
30 #include <tools/gen.hxx>
31 #endif
32 #ifndef _SV_TIMER_HXX
33 #include <vcl/timer.hxx>
34 #endif
35 
36 namespace dbaui
37 {
38 	class OScrollHelper
39 	{
40 		Link	m_aUpScroll;
41 		Link	m_aDownScroll;
42 	public:
43 		/** default contructor
44 		*/
45 		OScrollHelper();
46 
47 		~OScrollHelper();
48 
49 		/** set the memthod which should be called when scrolling up
50 			@param	_rUpScroll
51 				the method to set
52 		*/
setUpScrollMethod(const Link & _rUpScroll)53 		inline void setUpScrollMethod( const Link& _rUpScroll )
54 		{
55 			m_aUpScroll = _rUpScroll;
56 		}
57 
58 		/** set the memthod which should be called when scrolling down
59 			@param	_rDownScroll
60 				the method to set
61 		*/
setDownScrollMethod(const Link & _rDownScroll)62 		inline void setDownScrollMethod( const Link& _rDownScroll )
63 		{
64 			m_aDownScroll = _rDownScroll;
65 		}
66 
67 		/** check if a scroll method has to be called
68 			@param	_rPoint
69 				the current selection point
70 			@param	_rOutputSize
71 				the output size of the window
72 		*/
73 		void scroll(const Point& _rPoint, const Size& _rOutputSize);
74 	};
75 }
76 #endif // DBAUI_SCROLLHELPER_HXX
77 
78