yaze 0.2.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::editor::ShortcutManager Class Reference

#include <shortcut_manager.h>

Public Member Functions

void RegisterShortcut (const std::string &name, const std::vector< ImGuiKey > &keys)
 
void RegisterShortcut (const std::string &name, const std::vector< ImGuiKey > &keys, std::function< void()> callback)
 
void RegisterShortcut (const std::string &name, ImGuiKey key, std::function< void()> callback)
 
void ExecuteShortcut (const std::string &name) const
 
const ShortcutGetShortcut (const std::string &name) const
 
std::function< void()> GetCallback (const std::string &name) const
 
const std::string GetKeys (const std::string &name) const
 
auto GetShortcuts () const
 

Private Attributes

std::unordered_map< std::string, Shortcutshortcuts_
 

Detailed Description

Definition at line 23 of file shortcut_manager.h.

Member Function Documentation

◆ RegisterShortcut() [1/3]

void yaze::editor::ShortcutManager::RegisterShortcut ( const std::string & name,
const std::vector< ImGuiKey > & keys )
inline

Definition at line 25 of file shortcut_manager.h.

References shortcuts_.

◆ RegisterShortcut() [2/3]

void yaze::editor::ShortcutManager::RegisterShortcut ( const std::string & name,
const std::vector< ImGuiKey > & keys,
std::function< void()> callback )
inline

Definition at line 29 of file shortcut_manager.h.

References shortcuts_.

◆ RegisterShortcut() [3/3]

void yaze::editor::ShortcutManager::RegisterShortcut ( const std::string & name,
ImGuiKey key,
std::function< void()> callback )
inline

Definition at line 35 of file shortcut_manager.h.

References shortcuts_.

◆ ExecuteShortcut()

void yaze::editor::ShortcutManager::ExecuteShortcut ( const std::string & name) const
inline

Definition at line 40 of file shortcut_manager.h.

References shortcuts_.

◆ GetShortcut()

const Shortcut & yaze::editor::ShortcutManager::GetShortcut ( const std::string & name) const
inline

Definition at line 45 of file shortcut_manager.h.

References shortcuts_.

◆ GetCallback()

std::function< void()> yaze::editor::ShortcutManager::GetCallback ( const std::string & name) const
inline

Definition at line 50 of file shortcut_manager.h.

References shortcuts_.

◆ GetKeys()

const std::string yaze::editor::ShortcutManager::GetKeys ( const std::string & name) const
inline

Definition at line 54 of file shortcut_manager.h.

References yaze::editor::PrintShortcut(), and shortcuts_.

Here is the call graph for this function:

◆ GetShortcuts()

auto yaze::editor::ShortcutManager::GetShortcuts ( ) const
inline

Definition at line 58 of file shortcut_manager.h.

References shortcuts_.

Referenced by yaze::editor::ExecuteShortcuts().

Member Data Documentation

◆ shortcuts_

std::unordered_map<std::string, Shortcut> yaze::editor::ShortcutManager::shortcuts_
private

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