Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
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="")
 
 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 (std::string_view 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)
 
bool markAsUsed ()
 
bool hasBeenUsed () const
 
bool markAsUnused ()
 
bool setUsed (bool isUsed)
 
bool 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(std::string_view)>
 
- 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 = "" )
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

Member Function Documentation

◆ clone()

virtual KeyboardEvent * inviwo::KeyboardEvent::clone ( ) const
overridevirtual

◆ hash()

virtual uint64_t inviwo::KeyboardEvent::hash ( ) const
overridevirtual

Implements inviwo::Event.

◆ print()

virtual void inviwo::KeyboardEvent::print ( std::ostream & ss) const
overridevirtual

Reimplemented from inviwo::Event.


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