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 SVTOOLS_INC_TABLE_TABLEINPUTHANDLER_HXX
25 #define SVTOOLS_INC_TABLE_TABLEINPUTHANDLER_HXX
26 
27 #include <boost/shared_ptr.hpp>
28 
29 class MouseEvent;
30 class KeyEvent;
31 class HelpEvent;
32 class CommandEvent;
33 class NotifyEvent;
34 
35 //........................................................................
36 namespace svt { namespace table
37 {
38 //........................................................................
39 
40     class ITableControl;
41 
42 	//====================================================================
43 	//= ITableInputHandler
44 	//====================================================================
45     /** interface for components handling input in a ->TableControl
46     */
47 	class ITableInputHandler
48 	{
49     public:
50         // all those methods have the same semantics as the equal-named methods of ->Window,
51         // with the additional option to return a boolean value indicating whether
52         // the event should be further processed by the ->Window implementations (<FALSE/>),
53         // or whether it has been sufficiently handled by the ->ITableInputHandler instance
54         // (<FALSE/>).
55 
56         virtual bool    MouseMove       ( ITableControl& _rControl, const MouseEvent& rMEvt ) = 0;
57         virtual bool    MouseButtonDown ( ITableControl& _rControl, const MouseEvent& rMEvt ) = 0;
58         virtual bool    MouseButtonUp   ( ITableControl& _rControl, const MouseEvent& rMEvt ) = 0;
59         virtual bool    KeyInput        ( ITableControl& _rControl, const KeyEvent& rKEvt ) = 0;
60         virtual bool    GetFocus        ( ITableControl& _rControl ) = 0;
61         virtual bool    LoseFocus       ( ITableControl& _rControl ) = 0;
62         virtual bool    RequestHelp     ( ITableControl& _rControl, const HelpEvent& rHEvt ) = 0;
63         virtual bool    Command         ( ITableControl& _rControl, const CommandEvent& rCEvt ) = 0;
64         virtual bool    PreNotify       ( ITableControl& _rControl, NotifyEvent& rNEvt ) = 0;
65         virtual bool    Notify          ( ITableControl& _rControl, NotifyEvent& rNEvt ) = 0;
66 
~ITableInputHandler()67         virtual ~ITableInputHandler() { }
68 	};
69     typedef ::boost::shared_ptr< ITableInputHandler >   PTableInputHandler;
70 
71 //........................................................................
72 } } // namespace svt::table
73 //........................................................................
74 
75 #endif // SVTOOLS_INC_TABLE_TABLEINPUTHANDLER_HXX
76