Stores and persists all keybinds used in FuncDoodle (default + user-defined).
More...
#include <Keybinds.h>
|
| | KeybindsRegistry (std::filesystem::path rootPath) |
| | Creates a keybind registry rooted at a configuration directory.
|
| | ~KeybindsRegistry () |
| Shortcut | Get (const char *id) |
| | Returns the effective shortcut registered for an identifier.
|
| void | Register (const char *id, Shortcut shortcut) |
| | Registers a default shortcut for an identifier.
|
| void | End () |
| | Finalizes registration and loads any user overrides.
|
| void | Write () |
| | Persists user keybind overrides to disk.
|
| std::vector< std::pair< const char *, ShortcutWithUser > > & | GetAll () |
| | Returns all registered keybind entries.
|
Stores and persists all keybinds used in FuncDoodle (default + user-defined).
Handles loading and saving keybinds via keybinds.toml.
- Invariant
- m_RootPath must exist
◆ KeybindsRegistry()
| FuncDoodle::KeybindsRegistry::KeybindsRegistry |
( |
std::filesystem::path | rootPath | ) |
|
Creates a keybind registry rooted at a configuration directory.
- Parameters
-
| rootPath | Directory containing keybind storage files. |
◆ ~KeybindsRegistry()
| FuncDoodle::KeybindsRegistry::~KeybindsRegistry |
( |
| ) |
|
◆ End()
| void FuncDoodle::KeybindsRegistry::End |
( |
| ) |
|
Finalizes registration and loads any user overrides.
◆ Get()
| Shortcut FuncDoodle::KeybindsRegistry::Get |
( |
const char * | id | ) |
|
Returns the effective shortcut registered for an identifier.
- Parameters
-
- Returns
- Active shortcut for the identifier.
◆ GetAll()
| std::vector< std::pair< const char *, ShortcutWithUser > > & FuncDoodle::KeybindsRegistry::GetAll |
( |
| ) |
|
Returns all registered keybind entries.
- Returns
- Mutable list of keybind identifier/shortcut pairs.
◆ Register()
| void FuncDoodle::KeybindsRegistry::Register |
( |
const char * | id, |
|
|
Shortcut | shortcut ) |
Registers a default shortcut for an identifier.
- Parameters
-
| id | Keybind identifier. |
| shortcut | Default shortcut to store. |
◆ Write()
| void FuncDoodle::KeybindsRegistry::Write |
( |
| ) |
|
Persists user keybind overrides to disk.
◆ m_Reg
| std::vector<std::pair<const char*, ShortcutWithUser> > FuncDoodle::KeybindsRegistry::m_Reg |
|
private |
◆ m_RootPath
| std::filesystem::path FuncDoodle::KeybindsRegistry::m_RootPath |
|
private |
The documentation for this class was generated from the following files: