#include <command_palette_providers.h>


Public Member Functions | |
| ShortcutCommandsProvider (const ShortcutManager *shortcut_manager) | |
| std::string | ProviderId () const override |
| Stable identifier. Used for selective refresh; must be unique. | |
| void | Provide (CommandPalette *palette) override |
Populate palette with this source's commands. | |
Public Member Functions inherited from yaze::editor::CommandProvider | |
| virtual | ~CommandProvider ()=default |
Private Attributes | |
| const ShortcutManager * | shortcut_manager_ |
ID: "shortcuts". Mirrors ShortcutManager commands into the palette with their live keybinding. Internal ids are renamed or hidden (see PaletteNameForShortcut). Callbacks resolve through the manager at execution time so rebinding is honored. Palette-native entries with the same normalized name win the dedupe and inherit the keybinding.
Definition at line 111 of file command_palette_providers.h.
|
explicit |
Definition at line 78 of file command_palette_providers.cc.
|
inlineoverridevirtual |
Stable identifier. Used for selective refresh; must be unique.
Implements yaze::editor::CommandProvider.
Definition at line 114 of file command_palette_providers.h.
|
overridevirtual |
Populate palette with this source's commands.
Implements yaze::editor::CommandProvider.
Definition at line 82 of file command_palette_providers.cc.
References yaze::editor::CommandPalette::AddCommand(), yaze::editor::Shortcut::callback, yaze::editor::ShortcutManager::FindShortcut(), yaze::editor::ShortcutManager::GetShortcuts(), yaze::editor::InferShortcutGroup(), yaze::editor::LookupShortcutHint(), yaze::editor::PaletteNameForShortcut(), and shortcut_manager_.
|
private |
Definition at line 118 of file command_palette_providers.h.
Referenced by Provide().