Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
in_handler.h
Go to the documentation of this file.
1 /*
2  * Vega Strike
3  * Copyright (C) 2001-2002 Daniel Horn & Alan Shieh
4  *
5  * http://vegastrike.sourceforge.net/
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20  */
21 
22 #ifndef INHANDLER_H
23 #define INHANDLER_H
24 #include "in_kb.h"
25 //#include "cmd_unit.h"
26 class Unit;
27 
28 typedef void (*INDISPATCH)( int x, int y );
29 
31 {
32 public:
33  int *mousex, *mousey;
35 
37 
39  {
40  this->parent = parent;
41  //int a;
42  //mousex = mousey = 0;
43  //ZeroMemory(keystate, sizeof(keystate));
44  }
45 
46  virtual void MoveMouse( int x, int y )
47  {
48  //mousex = x;
49  //mousey = y;
50  }
51  virtual void MoveMouse( int *x, int *y, int num ) {}
52  virtual void KeyDown( int key )
53  {
54  //keystate[key] = 1;
55  }
56  virtual void KeyDown( int *key, int num ) {}
57  virtual void KeyUp( int key )
58  {
59  //keystate[key] = 0;
60  }
61  virtual void KeyUp( int *key, int num ) {}
62 
63  virtual void Activate() {}
64  virtual void Deactivate() {}
65 
66 //InHandler &Dispatch(); // Drives the input dispatcher, for switching input states
67 //InHandler &Revert(); // return to the previous state
68 };
69 
70 //const InputListener End;
71 #endif
72