SOFA API  b11f9b8c
Open source framework for multi-physics simuation
sofa::core::objectmodel::KeypressedEvent Class Reference

#include <KeypressedEvent.h>

This event is propagated along the objects when a key on the keyboard is pressed. More...

Inheritance diagram for sofa::core::objectmodel::KeypressedEvent:

Detailed Description

This event is propagated along the objects when a key on the keyboard is pressed.

Author
Francois Faure

Protected Attributes

char m_char
 Store the key. More...
 
- Protected Attributes inherited from sofa::core::objectmodel::Event
bool m_handled
 

Public Member Functions

 KeypressedEvent (char)
 Constructor. More...
 
 ~KeypressedEvent () override
 Destructor. More...
 
char getKey () const
 Return the key pressed. 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
 

Static Public Member Functions

static const charGetClassName ()
 
- Static Public Member Functions inherited from sofa::core::objectmodel::Event
static const charGetClassName ()
 
static size_t getEventTypeCount ()
 

Additional Inherited Members

- Static Protected Attributes inherited from sofa::core::objectmodel::Event
static size_t s_lastEventTypeIndex = 0
 storing the last given id More...
 

Attribute details

◆ m_char

char sofa::core::objectmodel::KeypressedEvent::m_char
protected

Store the key.

Constructor details

◆ KeypressedEvent()

sofa::core::objectmodel::KeypressedEvent::KeypressedEvent ( char  c)

Constructor.

◆ ~KeypressedEvent()

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

Destructor.

Function details

◆ GetClassName()

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

◆ getKey()

char sofa::core::objectmodel::KeypressedEvent::getKey ( ) const

Return the key pressed.