SOFA API  cd4ffb93
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 chargetClassName () 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 charGetClassName ()
 

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 charGetClassName ()
 
static size_t getEventTypeCount ()
 

Constructor details

◆ MouseEvent() [1/2]

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

Wheel Mouse Event constructor.

◆ MouseEvent() [2/2]

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

Default constructor.

◆ ~MouseEvent()

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

Default destructor.

Function details

◆ GetClassName()

static const char* sofa::core::objectmodel::MouseEvent::GetClassName ( )
inlinestatic

◆ getPosX()

int sofa::core::objectmodel::MouseEvent::getPosX ( void  ) const
inline

◆ getPosY()

int sofa::core::objectmodel::MouseEvent::getPosY ( void  ) const
inline

◆ getState()

State sofa::core::objectmodel::MouseEvent::getState ( void  ) const
inline

◆ getWheelDelta()

int sofa::core::objectmodel::MouseEvent::getWheelDelta ( void  ) const
inline

Enum details

◆ State

Defines possible Mouse states.

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