SOFA API  6a688117
Open source framework for multi-physics simuation
sofa::core::objectmodel::MouseEvent Class Reference

#include <MouseEvent.h>

MouseEvent Class. More...

Inheritance diagram for sofa::core::objectmodel::MouseEvent:

Detailed Description

MouseEvent Class.

Implements an Event that notifies about a Mouse Interaction.

Public Member Functions

 MouseEvent (State state, int wheelDelta=0)
 Wheel Mouse Event constructor. More...
 
 MouseEvent (State state, int posX, int posY)
 Default constructor. More...
 
 ~MouseEvent () override
 Default destructor. More...
 
- Public Member Functions inherited from sofa::core::objectmodel::Event
 Event ()
 
virtual ~Event ()
 
void setHandled ()
 Tag the event as handled, i.e. the event needs not be propagated further. More...
 
bool isHandled () const
 Returns true of the event has been handled. More...
 
virtual const char * getClassName () const
 
virtual size_t getEventTypeIndex () const =0
 

Accessors

int getPosX (void) const
 
int getPosY (void) const
 
int getWheelDelta (void) const
 
State getState (void) const
 
static const char * GetClassName ()
 

Additional Inherited Members

- Protected Attributes inherited from sofa::core::objectmodel::Event
bool m_handled
 
- Static Protected Attributes inherited from sofa::core::objectmodel::Event
static size_t s_lastEventTypeIndex = 0
 storing the last given id More...
 
- Static Public Member Functions inherited from sofa::core::objectmodel::Event
static const char * GetClassName ()
 
static size_t getEventTypeCount ()
 

Constructor details

sofa::core::objectmodel::MouseEvent::MouseEvent ( State  state,
int  wheelDelta = 0 
)

Wheel Mouse Event constructor.

sofa::core::objectmodel::MouseEvent::MouseEvent ( State  state,
int  posX,
int  posY 
)

Default constructor.

sofa::core::objectmodel::MouseEvent::~MouseEvent ( )
override

Default destructor.

Function details

static const char* sofa::core::objectmodel::MouseEvent::GetClassName ( )
inlinestatic
int sofa::core::objectmodel::MouseEvent::getPosX ( void  ) const
inline
int sofa::core::objectmodel::MouseEvent::getPosY ( void  ) const
inline
State sofa::core::objectmodel::MouseEvent::getState ( void  ) const
inline
int sofa::core::objectmodel::MouseEvent::getWheelDelta ( void  ) const
inline

Enum details

Defines possible Mouse states.

Enumerator
Move 
LeftPressed 
LeftReleased 
RightPressed 
RightReleased 
MiddlePressed 
MiddleReleased 
AnyExtraButtonPressed 
AnyExtraButtonReleased 
Wheel 
Reset