Inviwo  0.9.10.1
Inviwo documentation
inviwo::KeyboardEvent Class Reference

#include <keyboardevent.h>

+ Inheritance diagram for inviwo::KeyboardEvent:

Public Member Functions

 KeyboardEvent (IvwKey key=IvwKey::Unknown, KeyState state=KeyState::Press, KeyModifiers modifiers=KeyModifiers(flags::empty), uint32_t nativeVirtualKey=0, const std::string &utfText=u8"")
 
 KeyboardEvent (const KeyboardEvent &rhs)=default
 
KeyboardEventoperator= (const KeyboardEvent &that)=default
 
virtual KeyboardEventclone () const override
 
KeyState state () const
 
void setState (KeyState state)
 
virtual IvwKey key () const
 
void setKey (IvwKey key)
 
uint32_t getNativeVirtualKey () const
 
void setNativeVirtualKey (uint32_t key)
 
std::string text () const
 
void setText (const std::string &text)
 
virtual uint64_t hash () const override
 
virtual void print (std::ostream &ss) const override
 
- Public Member Functions inherited from inviwo::InteractionEvent
 InteractionEvent (KeyModifiers modifiers=KeyModifiers(flags::empty))
 
 InteractionEvent (const InteractionEvent &rhs)=default
 
InteractionEventoperator= (const InteractionEvent &that)=default
 
KeyModifiers modifiers () const
 
void setModifiers (KeyModifiers modifiers)
 
std::string modifierNames () const
 
void setToolTip (const std::string &tooltip) const
 
void setToolTipCallback (ToolTipCallback callback)
 
const ToolTipCallback & getToolTipCallback () const
 
- Public Member Functions inherited from inviwo::Event
virtual bool shouldPropagateTo (Inport *inport, Processor *processor, Outport *source)
 
void markAsUsed ()
 
bool hasBeenUsed () const
 
void markAsUnused ()
 
void markAsVisited (Processor *)
 
void markAsVisited (Event &)
 
bool hasVisitedProcessor (Processor *) const
 
const std::vector< Processor * > & getVisitedProcessors () const
 
template<typename EventType >
EventType * getAs ()
 
template<typename EventType >
const EventType * getAs () const
 

Static Public Member Functions

static constexpr uint64_t chash ()
 

Additional Inherited Members

- Public Types inherited from inviwo::InteractionEvent
using ToolTipCallback = std::function< void(const std::string &)>
 
- Protected Member Functions inherited from inviwo::Event
 Event (const Event &rhs)=default
 
Eventoperator= (const Event &that)=default
 
- Protected Attributes inherited from inviwo::InteractionEvent
KeyModifiers modifiers_
 
ToolTipCallback tooltip_
 

Detailed Description

Generated when keys are pressed and released.

Constructor & Destructor Documentation

◆ KeyboardEvent()

inviwo::KeyboardEvent::KeyboardEvent ( IvwKey  key = IvwKey::Unknown,
KeyState  state = KeyState::Press,
KeyModifiers  modifiers = KeyModifiers(flags::empty),
uint32_t  nativeVirtualKey = 0,
const std::string &  utfText = u8"" 
)
Parameters
keyEnumerate representation of pressed key
statePressed of released key
modifiersModifier keys, e.g. shift, held while pressing key
nativeVirtualKeyPlatform dependent scancode of pressed key
utfTextUnicode representation of pressed keys

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