frodo-wii/widget.hh

32 lines
449 B
C++
Raw Normal View History

2009-12-19 16:46:15 +01:00
#ifndef WIDGET_HH
#define WIDGET_HH
#include <SDL.h>
enum {
EVENT_NONE = 0,
KEY_UP = 1,
KEY_DOWN = 2,
KEY_LEFT = 4,
KEY_RIGHT = 8,
KEY_SELECT = 16,
KEY_ESCAPE = 32,
KEY_PAGEDOWN = 64,
KEY_PAGEUP = 128,
KEY_HELP = 256,
};
class Widget
{
public:
virtual void pushEvent(SDL_Event *ev) = 0;
virtual void runLogic() = 0;
virtual void draw(SDL_Surface *where,
int x, int y, int w, int h) = 0;
};
#endif