![]() |
Blue Brain BioExplorer
|
The KeyboardHandler class manages keyboard shortcuts and special keys. More...
#include <KeyboardHandler.h>
Public Member Functions | |
void | registerKeyboardShortcut (const unsigned char key, const std::string &description, std::function< void()> functor) |
Registers a keyboard shortcut. More... | |
void | unregisterKeyboardShortcut (const unsigned char key) |
Unregisters a keyboard shortcut. More... | |
void | handleKeyboardShortcut (const unsigned char key) |
Handles a keyboard shortcut. More... | |
void | registerSpecialKey (const SpecialKey key, const std::string &description, std::function< void()> functor) |
Registers a special key. More... | |
void | unregisterSpecialKey (const SpecialKey key) |
Unregisters a special key. More... | |
void | handle (const SpecialKey key) |
Handles a special key. More... | |
const std::vector< std::string > & | help () const |
Returns a vector of help string descriptions for all registered keyboard shortcuts and special keys. More... | |
const std::string | getKeyboardShortcutDescription (const unsigned char key) |
Returns the description of a specific keyboard shortcut. More... | |
The KeyboardHandler class manages keyboard shortcuts and special keys.
Definition at line 48 of file KeyboardHandler.h.
const std::string core::KeyboardHandler::getKeyboardShortcutDescription | ( | const unsigned char | key | ) |
Returns the description of a specific keyboard shortcut.
key | The unsigned char representing the key of the shortcut |
Definition at line 144 of file KeyboardHandler.cpp.
void core::KeyboardHandler::handle | ( | const SpecialKey | key | ) |
Handles a special key.
key | The SpecialKey enum value representing the special key |
Definition at line 93 of file KeyboardHandler.cpp.
void core::KeyboardHandler::handleKeyboardShortcut | ( | const unsigned char | key | ) |
Handles a keyboard shortcut.
key | The unsigned char representing the key of the shortcut |
Definition at line 58 of file KeyboardHandler.cpp.
const std::vector< std::string > & core::KeyboardHandler::help | ( | ) | const |
Returns a vector of help string descriptions for all registered keyboard shortcuts and special keys.
Definition at line 139 of file KeyboardHandler.cpp.
void core::KeyboardHandler::registerKeyboardShortcut | ( | const unsigned char | key, |
const std::string & | description, | ||
std::function< void()> | functor | ||
) |
Registers a keyboard shortcut.
key | The unsigned char representing the key to be pressed |
description | A string description of the shortcut |
functor | A void function to be called when the shortcut is triggered |
Definition at line 33 of file KeyboardHandler.cpp.
void core::KeyboardHandler::registerSpecialKey | ( | const SpecialKey | key, |
const std::string & | description, | ||
std::function< void()> | functor | ||
) |
Registers a special key.
key | The SpecialKey enum value representing the special key |
description | A string description of the special key |
functor | A void function to be called when the special key is triggered |
Definition at line 68 of file KeyboardHandler.cpp.
void core::KeyboardHandler::unregisterKeyboardShortcut | ( | const unsigned char | key | ) |
Unregisters a keyboard shortcut.
key | The unsigned char representing the key of the shortcut |
Definition at line 50 of file KeyboardHandler.cpp.
void core::KeyboardHandler::unregisterSpecialKey | ( | const SpecialKey | key | ) |
Unregisters a special key.
key | The SpecialKey enum value representing the special key |
Definition at line 85 of file KeyboardHandler.cpp.