1#ifndef YAZE_APP_EDITOR_SYSTEM_COMMAND_PALETTE_PROVIDERS_H_
2#define YAZE_APP_EDITOR_SYSTEM_COMMAND_PALETTE_PROVIDERS_H_
13class WorkspaceWindowManager;
14class RecentProjectsModel;
29 const std::string& name);
52 std::string
ProviderId()
const override {
return "panels"; }
64 std::function<
void(
const std::string&)> switch_callback);
65 std::string
ProviderId()
const override {
return "editors"; }
76 std::function<
void(
const std::string&)> open_callback);
77 std::string
ProviderId()
const override {
return "recent-files"; }
88 std::string
ProviderId()
const override {
return "dungeon-rooms"; }
99 std::string
ProviderId()
const override {
return "overworld-maps"; }
114 std::string
ProviderId()
const override {
return "shortcuts"; }
125 std::function<
void()> cycle_next = {},
126 std::function<void()> cycle_prev = {});
127 std::string
ProviderId()
const override {
return "drawers"; }
140 std::function<
void(
const std::string&)> apply_callback);
141 std::string
ProviderId()
const override {
return "layouts"; }
153 std::string
ProviderId()
const override {
return "workflow"; }
169 std::string
ProviderId()
const override {
return "sidebar"; }
186 std::function<void(
const std::string&)>
remove;
195 std::string
ProviderId()
const override {
return "welcome"; }
Plug-in command source for the palette.
ID: "drawers". Right-drawer toggles with "drawer: " prefix for discovery.
std::function< void(int)> toggle_callback_
void Provide(CommandPalette *palette) override
Populate palette with this source's commands.
DrawerCommandsProvider(std::function< void(int drawer_type)> toggle_callback, std::function< void()> cycle_next={}, std::function< void()> cycle_prev={})
std::string ProviderId() const override
Stable identifier. Used for selective refresh; must be unique.
std::function< void()> cycle_prev_
std::function< void()> cycle_next_
ID: "dungeon-rooms". One-shot; only depends on the session id.
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.
DungeonRoomCommandsProvider(size_t session_id)
ID: "editors". Rebuilds on editor-registry changes (rare).
void Provide(CommandPalette *palette) override
Populate palette with this source's commands.
EditorCommandsProvider(std::function< void(const std::string &)> switch_callback)
std::function< void(const std::string &) switch_callback_)
std::string ProviderId() const override
Stable identifier. Used for selective refresh; must be unique.
ID: "layouts". layout: / Apply Layout / profile commands.
LayoutCommandsProvider(std::function< void(const std::string &)> apply_callback)
std::function< void(const std::string &) apply_callback_)
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.
ID: "overworld-maps". One command per map 0x00-0x9F (JumpToMapRequest).
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.
OverworldMapCommandsProvider(size_t session_id)
ID: "panels". Rebuilds when the set of open windows/panels changes.
WorkspaceWindowManager * window_manager_
void Provide(CommandPalette *palette) override
Populate palette with this source's commands.
PanelCommandsProvider(WorkspaceWindowManager *window_manager, size_t session_id)
std::string ProviderId() const override
Stable identifier. Used for selective refresh; must be unique.
ID: "recent-files". Refresh after RecentFilesManager mutates.
void Provide(CommandPalette *palette) override
Populate palette with this source's commands.
std::function< void(const std::string &) open_callback_)
std::string ProviderId() const override
Stable identifier. Used for selective refresh; must be unique.
RecentFilesCommandsProvider(std::function< void(const std::string &)> open_callback)
std::string ProviderId() const override
Stable identifier. Used for selective refresh; must be unique.
ShortcutCommandsProvider(const ShortcutManager *shortcut_manager)
const ShortcutManager * shortcut_manager_
void Provide(CommandPalette *palette) override
Populate palette with this source's commands.
Manages user preferences and settings persistence.
void Provide(CommandPalette *palette) override
Populate palette with this source's commands.
std::string ProviderId() const override
Stable identifier. Used for selective refresh; must be unique.
WelcomeCommandsProvider(Callbacks callbacks)
ID: "workflow". Refresh when workflow actions change.
WorkspaceWindowManager * window_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.
WorkflowCommandsProvider(WorkspaceWindowManager *window_manager, size_t session_id)
Central registry for all editor cards with session awareness and dependency injection.
std::string PaletteNameForShortcut(const std::string &name)
std::string LookupShortcutHint(const ShortcutManager *shortcut_manager, const std::string &name)
std::function< void()> clear_recents
std::function< void(const std::string &) toggle_pin)
std::vector< std::string > template_names
std::function< void()> undo_remove
std::function< void(const std::string &) remove)
std::function< void()> dismiss_welcome
std::function< void()> show_welcome
std::function< void(const std::string &) create_from_template)
const RecentProjectsModel * model