VideoTools
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
gxeventhandler.cpp
Go to the documentation of this file.
1 //
2 // Copyright (C) 2017 Graeme Walker
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
16 // ===
17 //
18 // gxeventhandler.cpp
19 //
20 
21 #include "gdef.h"
22 #include "gxdef.h"
23 #include "gxeventhandler.h"
24 #include "glog.h"
25 #include <iostream>
26 
28 {
29 }
30 
32 {
33  return false ; // stop
34 }
35 
36 void GX::EventHandler::onLeftMouseButtonDown( int x , int y , bool shift , bool control )
37 {
38  G_DEBUG( "GX::EventHandler::onLeftMouseButtonDown: " << x << "," << y << " " << (shift?"S":"") << (control?"C":"") ) ;
39 }
40 
41 void GX::EventHandler::onLeftMouseButtonUp( int x , int y , bool shift , bool control )
42 {
43  G_DEBUG( "GX::EventHandler::onLeftMouseButtonUp: " << x << "," << y << " " << (shift?"S":"") << (control?"C":"") ) ;
44 }
45 
46 void GX::EventHandler::onExposure( int x , int y , int dx , int dy )
47 {
48  G_DEBUG( "GX::EventHandler::onExposure: " << x << "," << y << "," << dx << "," << dy ) ;
49 }
50 
51 void GX::EventHandler::onExpose( XExposeEvent & )
52 {
53  G_DEBUG( "GX::EventHandler::onExpose" ) ;
54 }
55 
57 {
58  G_DEBUG( "GX::EventHandler::onPaint" ) ;
59 }
60 
61 void GX::EventHandler::onKeyPress( XKeyEvent & )
62 {
63  G_DEBUG( "GX::EventHandler::onKeyPress" ) ;
64 }
65 
66 void GX::EventHandler::onKeyRelease( XKeyEvent & )
67 {
68  G_DEBUG( "GX::EventHandler::onKeyRelease" ) ;
69 }
70 
71 void GX::EventHandler::onMap( XMapEvent & )
72 {
73  G_DEBUG( "GX::EventHandler::onMap" ) ;
74 }
75 
77 {
78  G_DEBUG( "GX::EventHandler::onShow" ) ;
79 }
80 
82 {
83  G_DEBUG( "GX::EventHandler::onCreate" ) ;
84  return true ;
85 }
86 
88 {
89  G_DEBUG( "GX::EventHandler::onUser" ) ;
90 }
91 
92 void GX::EventHandler::onMouseMove( int x , int y )
93 {
94  G_DEBUG( "GX::EventHandler::onMouseMove: " << x << "," << y ) ;
95 }
96 
97 /// \file gxeventhandler.cpp
virtual void onLeftMouseButtonUp(int x, int y, bool shift, bool control)
Called for a left-mouse-button-up event.
virtual ~EventHandler()
Destructor.
virtual void onPaint()
Called second for a window-expose event.
virtual void onExposure(int x, int y, int dx, int dy)
Called first for a window-expose event.
virtual bool onCreate()
Called first for a window-map event.
virtual void onKeyRelease(::XKeyEvent &)
Called for a key-release event.
virtual bool onIdle()
Called by GX::Application::run() once the event queue is empty.
virtual void onLeftMouseButtonDown(int x, int y, bool shift, bool control)
Called for a left-mouse-button-down event.
virtual void onMouseMove(int x, int y)
Called for a mouse-move event.
virtual void onExpose(::XExposeEvent &)
Called third for a window-expose event.
virtual void onUser()
Called for a client-message event.
virtual void onShow()
Called second for a window-map event.
virtual void onMap(::XMapEvent &)
Called third for a window-map event.
virtual void onKeyPress(::XKeyEvent &)
Called for a key-press event.