Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::KeyboardEvent Class Reference

#include <inviwo/core/interaction/events/keyboardevent.h>

+ Inheritance diagram for inviwo::KeyboardEvent:

Public Member Functions

virtual KeyboardEventclone () const override
 
uint32_t getNativeVirtualKey () const
 
virtual uint64_t hash () const override
 
virtual IvwKey key () const
 
 KeyboardEvent (const KeyboardEvent &rhs)=default
 
 KeyboardEvent (IvwKey key=IvwKey::Unknown, KeyState state=KeyState::Press, KeyModifiers modifiers=KeyModifiers(flags::empty), uint32_t nativeVirtualKey=0, std::string_view utfText="")
 
KeyboardEventoperator= (const KeyboardEvent &that)=default
 
virtual void print (fmt::memory_buffer &buff) const override
 
void setKey (IvwKey key)
 
void setNativeVirtualKey (uint32_t key)
 
void setState (KeyState state)
 
void setText (const std::string &text)
 
KeyState state () const
 
std::string_view text () const
 
- Public Member Functions inherited from inviwo::InteractionEvent
const ContextMenuCallback & getContexMenuCallback () const
 
const ToolTipCallback & getToolTipCallback () const
 
 InteractionEvent (const InteractionEvent &rhs)=default
 
 InteractionEvent (KeyModifiers modifiers=KeyModifiers(flags::empty))
 
KeyModifiers modifiers () const
 
InteractionEventoperator= (const InteractionEvent &that)=default
 
void setContextMenuCallback (ContextMenuCallback callback)
 
void setModifiers (KeyModifiers modifiers)
 
void setToolTip (std::string_view tooltip) const
 
void setToolTipCallback (ToolTipCallback callback)
 
void showContextMenu (std::span< ContextMenuEntry > entries, ContextMenuCategories categories=ContextMenuCategory::Callback)
 
- Public Member Functions inherited from inviwo::Event
template<typename EventType >
EventType * getAs ()
 
template<typename EventType >
const EventType * getAs () const
 
const std::vector< Processor * > & getVisitedProcessors () const
 
bool hasBeenUsed () const
 
bool hasVisitedProcessor (Processor *) const
 
bool markAsUnused ()
 
bool markAsUsed ()
 
void markAsVisited (const Event &)
 
bool markAsVisited (Processor *)
 
bool setUsed (bool isUsed)
 
virtual bool shouldPropagateTo (Inport *inport, Processor *processor, Outport *source)
 

Static Public Member Functions

static constexpr uint64_t chash ()
 

Additional Inherited Members

- Public Types inherited from inviwo::InteractionEvent
using ContextMenuCallback
 
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
ContextMenuCallback contextMenuCallback_
 
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,
std::string_view 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 ( fmt::memory_buffer & buff) const
overridevirtual

Implements inviwo::Event.


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