#include <command_manager.h>
|
| using | Command = std::function< void()> |
| |
|
| | CommandManager ()=default |
| |
| | ~CommandManager ()=default |
| |
| 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 | ShowWhichKeyHierarchical () |
| |
| void | HandleWhichKeyInput () |
| |
| void | SaveKeybindings (const std::string &filepath) |
| |
| void | LoadKeybindings (const std::string &filepath) |
| |
| bool | IsWhichKeyActive () const |
| |
| std::string | GetCurrentPrefix () const |
| |
Definition at line 19 of file command_manager.h.
◆ Command
◆ CommandManager()
| yaze::editor::CommandManager::CommandManager |
( |
| ) |
|
|
default |
◆ ~CommandManager()
| yaze::editor::CommandManager::~CommandManager |
( |
| ) |
|
|
default |
◆ RegisterPrefix()
| void yaze::editor::CommandManager::RegisterPrefix |
( |
const std::string & |
group_name, |
|
|
const char |
prefix, |
|
|
const std::string & |
name, |
|
|
const std::string & |
desc |
|
) |
| |
|
inline |
◆ RegisterSubcommand()
| void yaze::editor::CommandManager::RegisterSubcommand |
( |
const std::string & |
group_name, |
|
|
const std::string & |
shortcut, |
|
|
const char |
mnemonic, |
|
|
const std::string & |
name, |
|
|
const std::string & |
desc, |
|
|
Command |
command |
|
) |
| |
|
inline |
◆ RegisterCommand()
| void yaze::editor::CommandManager::RegisterCommand |
( |
const std::string & |
shortcut, |
|
|
Command |
command, |
|
|
char |
mnemonic, |
|
|
const std::string & |
name, |
|
|
const std::string & |
desc |
|
) |
| |
|
inline |
◆ ExecuteCommand()
| void yaze::editor::CommandManager::ExecuteCommand |
( |
const std::string & |
shortcut | ) |
|
|
inline |
◆ ShowWhichKey()
| void yaze::editor::CommandManager::ShowWhichKey |
( |
| ) |
|
◆ ShowWhichKeyHierarchical()
| void yaze::editor::CommandManager::ShowWhichKeyHierarchical |
( |
| ) |
|
◆ HandleWhichKeyInput()
| void yaze::editor::CommandManager::HandleWhichKeyInput |
( |
| ) |
|
◆ SaveKeybindings()
| void yaze::editor::CommandManager::SaveKeybindings |
( |
const std::string & |
filepath | ) |
|
◆ LoadKeybindings()
| void yaze::editor::CommandManager::LoadKeybindings |
( |
const std::string & |
filepath | ) |
|
◆ IsWhichKeyActive()
| bool yaze::editor::CommandManager::IsWhichKeyActive |
( |
| ) |
const |
|
inline |
◆ GetCurrentPrefix()
| std::string yaze::editor::CommandManager::GetCurrentPrefix |
( |
| ) |
const |
|
inline |
◆ commands_
| std::unordered_map<std::string, CommandGroup> yaze::editor::CommandManager::commands_ |
|
private |
◆ whichkey_active_
| bool yaze::editor::CommandManager::whichkey_active_ = false |
|
private |
◆ current_prefix_
| std::string yaze::editor::CommandManager::current_prefix_ |
|
private |
◆ whichkey_timer_
| float yaze::editor::CommandManager::whichkey_timer_ = 0.0f |
|
private |
The documentation for this class was generated from the following files: