////////////////////////////////////////////////////////////////////// // // REVENT.H // // class REvent // // RomaNets Text Windows Library (RTWL) // // version 0.6 // #ifndef __REVENT_H #define __REVENT_H #include "mevt.h" enum EventType { KBD_EVENT, MS_EVENT, CMD_EVENT}; // ========================================================= class REvent { // ========================================================= public: virtual EventType getType() = 0; }; // ========================================================= class RKbdEvent : public REvent { // ========================================================= public: RKbdEvent(); RKbdEvent(int asc,int scan =0, int m=0); EventType getType() { return KBD_EVENT;} int ascii; int scancode; int modifiers; }; // ========================================================= class RMouseEvent : public REvent { // ========================================================= public: RMouseEvent(); EventType getType() { return MS_EVENT;} MOUSE_EVENT e; int x; int y; }; // ========================================================= class RCmdEvent : public REvent { // ========================================================= public: RCmdEvent(void *wnd, int cmd, char *s); EventType getType() { return CMD_EVENT;} int id; char *p; void *dest; }; #endif /* __REVENT_H */