1#ifndef YAZE_APP_EDITOR_SYSTEM_COMMAND_PALETTE_PROVIDERS_H_
2#define YAZE_APP_EDITOR_SYSTEM_COMMAND_PALETTE_PROVIDERS_H_
13class WorkspaceWindowManager;
14class RecentProjectsModel;
31 std::string
ProviderId()
const override {
return "panels"; }
43 std::function<
void(
const std::string&)> switch_callback);
44 std::string
ProviderId()
const override {
return "editors"; }
55 std::function<
void(
const std::string&)> open_callback);
56 std::string
ProviderId()
const override {
return "recent-files"; }
67 std::string
ProviderId()
const override {
return "dungeon-rooms"; }
78 std::function<
void()> cycle_next = {},
79 std::function<void()> cycle_prev = {});
80 std::string
ProviderId()
const override {
return "drawers"; }
93 std::function<
void(
const std::string&)> apply_callback);
94 std::string
ProviderId()
const override {
return "layouts"; }
106 std::string
ProviderId()
const override {
return "workflow"; }
122 std::string
ProviderId()
const override {
return "sidebar"; }
139 std::function<void(
const std::string&)>
remove;
148 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: "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)
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::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