#include <command_manager.h>
Classes | |
struct | CommandInfo |
struct | CommandInfoOrPrefix |
Public Types | |
using | Command = std::function<void()> |
Public Member Functions | |
void | RegisterPrefix (const std::string &group_name, const char prefix, const std::string &name, const std::string &desc) |
void | RegisterSubcommand (const std::string &group_name, const std::string &shortcut, const char mnemonic, const std::string &name, const std::string &desc, Command command) |
void | RegisterCommand (const std::string &shortcut, Command command, char mnemonic, const std::string &name, const std::string &desc) |
void | ExecuteCommand (const std::string &shortcut) |
void | ShowWhichKey () |
void | SaveKeybindings (const std::string &filepath) |
void | LoadKeybindings (const std::string &filepath) |
Private Attributes | |
std::unordered_map< std::string, CommandInfoOrPrefix > | commands_ |
Definition at line 16 of file command_manager.h.
using yaze::app::editor::CommandManager::Command = std::function<void()> |
Definition at line 18 of file command_manager.h.
|
inline |
Definition at line 41 of file command_manager.h.
References commands_.
Referenced by yaze::app::editor::EditorManager::InitializeCommands().
|
inline |
Definition at line 46 of file command_manager.h.
References commands_.
Referenced by yaze::app::editor::EditorManager::InitializeCommands().
|
inline |
Definition at line 54 of file command_manager.h.
References commands_.
|
inline |
Definition at line 61 of file command_manager.h.
References commands_.
void yaze::app::editor::CommandManager::ShowWhichKey | ( | ) |
Definition at line 76 of file command_manager.cc.
References commands_.
Referenced by yaze::app::editor::EditorManager::ManageKeyboardShortcuts().
void yaze::app::editor::CommandManager::SaveKeybindings | ( | const std::string & | filepath | ) |
Definition at line 117 of file command_manager.cc.
References commands_.
void yaze::app::editor::CommandManager::LoadKeybindings | ( | const std::string & | filepath | ) |
Definition at line 128 of file command_manager.cc.
References commands_.
|
private |
Definition at line 73 of file command_manager.h.
Referenced by ExecuteCommand(), LoadKeybindings(), RegisterCommand(), RegisterPrefix(), RegisterSubcommand(), SaveKeybindings(), and ShowWhichKey().