KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gui_event_listener.h
Go to the documentation of this file.
1 /* $Id: gui_event_listener.h 11234 2011-11-28 04:44:53Z ksimek $ */
2 /* {{{=========================================================================== *
3  |
4  | Copyright (c) 1994-2011 by Kobus Barnard (author)
5  |
6  | Personal and educational use of this code is granted, provided that this
7  | header is kept intact, and that the authorship is not misrepresented, that
8  | its use is acknowledged in publications, and relevant papers are cited.
9  |
10  | For other use contact the author (kobus AT cs DOT arizona DOT edu).
11  |
12  | Please note that the code in this file has not necessarily been adequately
13  | tested. Naturally, there is no guarantee of performance, support, or fitness
14  | for any particular task. Nonetheless, I am interested in hearing about
15  | problems that you encounter.
16  |
17  | Author: Kyle Simek
18  * =========================================================================== }}}*/
19 
20 // vim: tabstop=4 shiftwidth=4 foldmethod=marker
21 
22 #ifndef KJB_CPP_GUI_EVENT_LISTENER
23 #define KJB_CPP_GUI_EVENT_LISTENER
24 
34 {
35 public:
37  virtual bool mouse_event(int button, int state, int x, int y) = 0;
39  virtual bool mouse_double_event(int button, int state, int x, int y) = 0;
41  virtual bool motion_event(int x, int y) = 0;
43  virtual bool passive_motion_event(int x, int y) = 0;
45  virtual bool keyboard_event(unsigned int key, int x, int y) = 0;
47  virtual bool special_event(int key, int x, int y) = 0;
48 };
49 
81 {
82 public:
83  virtual void reset_event()
84  {
85  }
86 
87  virtual bool mouse_event(int , int , int , int )
88  {
89  return false;
90  }
91 
92  virtual bool mouse_double_event(int , int , int , int )
93  {
94  return false;
95  }
96 
97  virtual bool motion_event(int , int )
98  {
99  return false;
100  }
101 
102  virtual bool passive_motion_event(int , int )
103  {
104  return false;
105  }
106 
107  virtual bool keyboard_event(unsigned int , int , int )
108  {
109  return false;
110  }
111 
112  virtual bool special_event(int , int , int )
113  {
114  return false;
115  }
116 
117 };
118 
119 #endif
virtual bool keyboard_event(unsigned int key, int x, int y)=0
virtual bool keyboard_event(unsigned int, int, int)
Definition: gui_event_listener.h:107
virtual bool mouse_double_event(int button, int state, int x, int y)=0
virtual bool special_event(int key, int x, int y)=0
virtual bool passive_motion_event(int, int)
Definition: gui_event_listener.h:102
virtual bool mouse_event(int button, int state, int x, int y)=0
virtual bool motion_event(int, int)
Definition: gui_event_listener.h:97
virtual bool special_event(int, int, int)
Definition: gui_event_listener.h:112
virtual bool mouse_event(int, int, int, int)
Definition: gui_event_listener.h:87
x
Definition: APPgetLargeConnectedEdges.m:100
virtual bool passive_motion_event(int x, int y)=0
Definition: gui_event_listener.h:33
virtual bool motion_event(int x, int y)=0
virtual bool mouse_double_event(int, int, int, int)
Definition: gui_event_listener.h:92
virtual void reset_event()
Definition: gui_event_listener.h:83
Definition: gui_event_listener.h:80