home *** CD-ROM | disk | FTP | other *** search
- //
- // *************************************************************************
- // * *
- // * OMEGA C++ Windowing Class Library *
- // * ================================= *
- // * *
- // * Copyright 1991,92 Tom Clancy *
- // * Submitted to the public domain, April 1992 *
- // * *
- // *************************************************************************
- // * *
- // * Event Handler Object *
- // * *
- // *************************************************************************
- //
-
-
- #ifndef _OMEVENT
- #define _OMEVENT
- #endif
-
- #ifndef _OMMOUSE
- #include "ommouse.hpp"
- #endif
-
- #ifndef _OMKEY
- #include "omkey.hpp"
- #endif
-
- enum events {
- evNoevent,
- evMButton,
- evKeyboard,
- };
-
- enum commands {
- cmdNocmd=0,
- cmdClose,
- cmdExpand,
- cmdContract,
- cmdDrag,
- cmdResize,
- cmdKBHIT,
- cmdWithinwin,
- cmdHelp,
- cmdPushedButton,
- cmdNextButton,
- cmdPrevButton,
- cmdSelectField,
- cmdNextField,
- cmdPrevField,
- cmdDeleteField,
- cmdRightArrow,
- cmdLeftArrow,
- cmdMenuPick,
- };
-
-
- class event_handler : public key, public mouse {
-
- public:
-
- int startx,starty,endx,endy;
- int WINSET;
- int WITHINWIN;
-
- int event();
- int getlastevent();
- void setlastevent(int e);
- void setlastcmd(int c);
- int getlastcmd();
-
- int buttonx();
- int buttony();
- int buttonb();
- void setbuttonx(int x);
- void setbuttony(int y);
-
- void disable_handler();
- void enable_handler();
- int isdisabled();
-
- virtual int handle_mouse_event() {return 0;}
- virtual int handle_key_event() {return 0;}
- void handle_events();
- virtual void run();
- };
-