Rasterfarm-SDK
Loading...
Searching...
No Matches
MouseEvent Class Reference

#include <event.h>

Inheritance diagram for MouseEvent:
CursorEvent Event DynamicType

Public Types

enum  InputType : Event::InputType {
  MOUSE_MOTION = CursorEvent::MOTION ,
  MOUSE_PRESS = CursorEvent::SELECT ,
  MOUSE_RELEASE = CursorEvent::UNSELECT ,
  MOUSE_WHEEL = CursorEvent::WHEEL
}
 
enum  ButtonMask {
  MOUSE_BUTTON_NONE = 0 ,
  MOUSE_BUTTON_1 = 1 << 0 ,
  MOUSE_BUTTON_2 = 1 << 1 ,
  MOUSE_BUTTON_3 = 1 << 2 ,
  MOUSE_BUTTON_LEFT = MOUSE_BUTTON_1 ,
  MOUSE_BUTTON_MIDDLE = MOUSE_BUTTON_2 ,
  MOUSE_BUTTON_RIGHT = MOUSE_BUTTON_3
}
 
- Public Types inherited from CursorEvent
enum  InputType : Event::InputType {
  MOTION ,
  SELECT ,
  UNSELECT ,
  WHEEL
}
 
- Public Types inherited from Event
enum  { UNKNOWN = 0 }
 
typedef uint InputType
 

Public Member Functions

 MouseEvent ()
 
 MouseEvent (const Vertex2f &position, int button, ButtonMask buttonMask, InputType subType)
 
int getButton () const
 
int getButtonMask () const
 
int isPressed (ButtonMask button) const
 
- Public Member Functions inherited from CursorEvent
 CursorEvent (const Vertex2f &position, Event::InputType subType=UNKNOWN)
 
Vertex2f getPosition () const
 
- Public Member Functions inherited from Event
 Event (InputType subType=UNKNOWN)
 
virtual ~Event ()
 
const InputType getSubType () const
 
- Public Member Functions inherited from DynamicType
 DynamicType ()
 
template<class C >
void addType ()
 
TypeID getDerivedTypeId () const
 
template<class C >
const bool isType () const
 
template<class C >
const C * cast () const
 
template<class C >
C * cast ()
 
template<class FROM , class TO >
TO * cast ()
 
template<class FROM , class TO >
const TO * cast () const
 

Friends

class Application
 

Additional Inherited Members

- Public Attributes inherited from CursorEvent
Vertex2f position
 
- Public Attributes inherited from Event
InputType subType
 

Detailed Description

User-input event from mouse.

Member Enumeration Documentation

◆ ButtonMask

Bitfield enumerations for mouse buttons.

Enumerator
MOUSE_BUTTON_NONE 
MOUSE_BUTTON_1 
MOUSE_BUTTON_2 
MOUSE_BUTTON_3 
MOUSE_BUTTON_LEFT 
MOUSE_BUTTON_MIDDLE 
MOUSE_BUTTON_RIGHT 

◆ InputType

Enumerator
MOUSE_MOTION 
MOUSE_PRESS 
MOUSE_RELEASE 
MOUSE_WHEEL 

Constructor & Destructor Documentation

◆ MouseEvent() [1/2]

MouseEvent::MouseEvent ( )

◆ MouseEvent() [2/2]

MouseEvent::MouseEvent ( const Vertex2f & position,
int button,
ButtonMask buttonMask,
InputType subType )

Member Function Documentation

◆ getButton()

int MouseEvent::getButton ( ) const
inline

◆ getButtonMask()

int MouseEvent::getButtonMask ( ) const
inline

◆ isPressed()

int MouseEvent::isPressed ( ButtonMask button) const
inline

Friends And Related Symbol Documentation

◆ Application

friend class Application
friend

The documentation for this class was generated from the following file: