1 /*************************************************************************** 2 eventhandler.h - Widget event handler interface 3 ------------------- 4 begin : Sat Nov 28 2008 5 copyright : (C) 2008 by Gabor Torok 6 email : cctorok@yahoo.com 7 ***************************************************************************/ 8 9 /*************************************************************************** 10 * * 11 * This program is free software; you can redistribute it and/or modify * 12 * it under the terms of the GNU General Public License as published by * 13 * the Free Software Foundation; either version 2 of the License, or * 14 * (at your option) any later version. * 15 * * 16 ***************************************************************************/ 17 #ifndef EVENTHANDLER_H_ 18 #define EVENTHANDLER_H_ 19 #pragma once 20 21 #include "gui.h" 22 #include "widget.h" 23 24 /** 25 *@author Gabor Torok 26 */ 27 28 /// Event handler interface for widgets 29 class EventHandler { 30 public: 31 EventHandler(); 32 virtual ~EventHandler(); 33 34 virtual bool handleEvent( Widget *w, SDL_Event *event ) = 0; 35 }; 36 37 class RawEventHandler { 38 public: 39 RawEventHandler(); 40 virtual ~RawEventHandler(); 41 42 virtual bool handleEvent( SDL_Event *event ) = 0; 43 }; 44 45 #endif /*EVENTHANDLER_H_*/ 46