IvfEvents.h

00001 //
00002 // Copyright 1999-2006 by Structural Mechanics, Lund University.
00003 //
00004 // This library is free software; you can redistribute it and/or
00005 // modify it under the terms of the GNU Library General Public
00006 // License as published by the Free Software Foundation; either
00007 // version 2 of the License, or (at your option) any later version.
00008 //
00009 // This library is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012 // Library General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU Library General Public
00015 // License along with this library; if not, write to the Free Software
00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00017 // USA.
00018 //
00019 // Please report all bugs and problems to "ivf@byggmek.lth.se".
00020 //
00021 //
00022 // Written by Jonas Lindemann
00023 //
00024 
00025 #ifndef _IvfEvents_h_
00026 #define _IvfEvents_h_
00027 
00028 #include <ivfdef/IvfDef.h>
00029 
00037 class IVFWIDGET_API CIvfEventBase {
00038 public:
00040         enum TFunctionKey {
00041                 FK_BUTTON,
00042                 FK_BACKSPACE,
00043                 FK_TAB,
00044                 FK_ENTER,
00045                 FK_PAUSE,
00046                 FK_SCROLL_LOCK,
00047                 FK_ESCAPE,
00048                 FK_HOME,
00049                 FK_LEFT,
00050                 FK_UP,
00051                 FK_RIGHT,
00052                 FK_DOWN,
00053                 FK_PAGE_UP,
00054                 FK_PAGE_DOWN,
00055                 FK_END,
00056                 FK_PRINT,
00057                 FK_INSERT,
00058                 FK_MENU,
00059                 FK_NUM_LOCK,
00060                 FK_F1,
00061                 FK_F2,
00062                 FK_F3,
00063                 FK_F4,
00064                 FK_F5,
00065                 FK_F6,
00066                 FK_F7,
00067                 FK_F8,
00068                 FK_F9,
00069                 FK_F10,
00070                 FK_F11,
00071                 FK_F12,
00072                 FK_KP0,
00073                 FK_KP1,
00074                 FK_KP2,
00075                 FK_KP3,
00076                 FK_KP4,
00077                 FK_KP5,
00078                 FK_KP6,
00079                 FK_KP7,
00080                 FK_KP8,
00081                 FK_KP9,
00082                 FK_KP_ENTER,
00083                 FK_SHIFT_L,
00084                 FK_SHIFT_R,
00085                 FK_CONTROL_L,
00086                 FK_CONTROL_R,
00087                 FK_CAPS_LOCK,
00088                 FK_META_L,
00089                 FK_META_R,
00090                 FK_ALT_L,
00091                 FK_ALT_R,
00092                 FK_DELETE
00093         };
00094 };
00095 
00099 class IVFWIDGET_API CIvfRenderEvent : public CIvfEventBase {
00100 public:
00107         virtual void onRender() {};
00108 };
00109 
00113 class IVFWIDGET_API CIvfInitEvent : public CIvfEventBase {
00114 public:
00122         virtual void onInit(int width, int height) {};
00123 };
00124 
00128 class IVFWIDGET_API CIvfDestroyEvent : public CIvfEventBase {
00129 public:
00135         virtual void onDestroy() {};
00136 };
00137 
00141 class IVFWIDGET_API CIvfInitContextEvent : public CIvfEventBase {
00142 public:
00149         virtual void onInitContext(int width, int height) {};
00150 };
00151 
00155 class IVFWIDGET_API CIvfOverlayEvent : public CIvfEventBase {
00156 public:
00165         virtual void onOverlay() {};
00166 };
00167 
00171 class IVFWIDGET_API CIvfMouseEvent : public CIvfEventBase {
00172 public:
00179         virtual void onMouse(int x, int y) {};
00180 };
00181 
00185 class IVFWIDGET_API CIvfMouseDownEvent : public CIvfEventBase {
00186 public:
00193         virtual void onMouseDown(int x, int y) {};
00194 };
00195 
00199 class IVFWIDGET_API CIvfMouseUpEvent : public CIvfEventBase {
00200 public:
00207         virtual void onMouseUp(int x, int y) {};
00208 };
00209 
00213 class IVFWIDGET_API CIvfMouseMoveEvent : public CIvfEventBase {
00214 public:
00221         virtual void onMouseMove(int x, int y) {};
00222 };
00223 
00227 class IVFWIDGET_API CIvfMouseLeaveEvent : public CIvfEventBase {
00228 public:
00235         virtual void onMouseLeave(int x, int y) {};
00236 };
00237 
00241 class IVFWIDGET_API CIvfMouseEnterEvent : public CIvfEventBase {
00242 public:
00249         virtual void onMouseEnter(int x, int y) {};
00250 };
00251 
00255 class IVFWIDGET_API CIvfKeyboardEvent : public CIvfEventBase {
00256 public:
00263         virtual void onKeyboard(int key, int x, int y) {};
00264 };
00265 
00269 class IVFWIDGET_API CIvfMenuItemEvent : public CIvfEventBase {
00270 public:
00271         virtual void onMenuItem(int id) {};
00272 };
00273 
00277 class IVFWIDGET_API CIvfModifierDownEvent : public CIvfEventBase {
00278 public:
00285         virtual void onModifierDown() {};
00286 };
00287 
00291 class IVFWIDGET_API CIvfModifierUpEvent : public CIvfEventBase {
00292 public:
00299         virtual void onModifierUp() {};
00300 };
00301 
00305 class IVFWIDGET_API CIvfInitOverlayEvent : public CIvfEventBase {
00306 public:
00314         virtual void onInitOverlay(int width, int height) {};
00315 };
00316 
00320 class IVFWIDGET_API CIvfClearEvent : public CIvfEventBase {
00321 public:
00330         virtual void onClear() {};
00331 };
00332 
00336 class IVFWIDGET_API CIvfResizeEvent : public CIvfEventBase {
00337 public:
00345         virtual void onResize(int width, int height) {};
00346 };
00347 
00351 class IVFWIDGET_API CIvfUnFocusEvent : public CIvfEventBase {
00352 public:
00358         virtual void onUnFocus() {};
00359 };
00360 
00364 class IVFWIDGET_API CIvfFocusEvent : public CIvfEventBase {
00365 public:
00371         virtual void onFocus() {};
00372 };
00373 
00377 class IVFWIDGET_API CIvfFunctionKeyEvent : public CIvfEventBase {
00378 public:
00385         virtual void onFunctionKey(CIvfEventBase::TFunctionKey key, int x, int y) {};
00386 };
00387 
00391 class IVFWIDGET_API CIvfIdleEvent : public CIvfEventBase {
00392 public:
00399         virtual void onIdle() {};
00400 };
00401 
00405 class IVFWIDGET_API CIvfTimeoutEvent : public CIvfEventBase {
00406 public:
00413         virtual bool onTimeout() { return true; };
00414 };
00415 
00419 class IVFWIDGET_API CIvfAppLoopEvent : public CIvfEventBase {
00420 private:
00421         bool m_finished;
00422 public:
00430         virtual bool onAppLoop() { m_finished = false; return true; };
00431 
00432         void setFinished(bool flag) { m_finished = flag; };
00433         bool isFinished() { return m_finished; };
00434 };
00435 
00436 #endif

Generated on Fri Sep 1 15:36:47 2006 for Interactive Visualisation Framework - Ivf++ by  doxygen 1.4.6-NO