X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=WCudaMSE%2FAPI_Bilat_Displayable%2FINC%2FMouseEvent.h;fp=WCudaMSE%2FAPI_Bilat_Displayable%2FINC%2FMouseEvent.h;h=707bcce4e39ad3afbe1cfba0a5218bddc0de5912;hb=8d08c12b29c2a14684f35c023ee39e694bb80d25;hp=0000000000000000000000000000000000000000;hpb=226de81f7e1f1fbf4ac79d0d089e8a05ec7159a0;p=GPU.git diff --git a/WCudaMSE/API_Bilat_Displayable/INC/MouseEvent.h b/WCudaMSE/API_Bilat_Displayable/INC/MouseEvent.h new file mode 100755 index 0000000..707bcce --- /dev/null +++ b/WCudaMSE/API_Bilat_Displayable/INC/MouseEvent.h @@ -0,0 +1,54 @@ +#ifndef MOUSE_EVENT_H +#define MOUSE_EVENT_H + +#include "InputEvent.h" + +/*----------------------------------------------------------------------*\ + |* Declaration *| + \*---------------------------------------------------------------------*/ + +enum MouseButtonType + { + MOUSE_LEFT_BUTTON, + MOUSE_RIGHT_BUTTON, + MOUSE_MIDDLE_BUTTON, + MOUSE_UNKNOWN_BUTTON + }; + +/*--------------------------------------*\ + |* Public *| + \*-------------------------------------*/ + +class CBI_DISPLAYABLE MouseEvent: public InputEvent + { + public: + MouseEvent(const Panel_A &ptrPanelSource); + MouseEvent(const MouseEvent& source); + virtual ~MouseEvent(); + + /*--------------------------------------*\ + |* Get *| + \*-------------------------------------*/ + + int getX() const; + int getY() const; + MouseButtonType getButtonType() const; + + /*--------------------------------------*\ + |* Set *| + \*-------------------------------------*/ + + void setXY(int x, int y); + void setMouseButtonType(MouseButtonType buttonType); + + private: + int x; + int y; + MouseButtonType buttonType; + }; + +#endif + +/*----------------------------------------------------------------------*\ + |* End *| + \*---------------------------------------------------------------------*/