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"; }
79 std::string
ProviderId()
const override {
return "workflow"; }
95 std::string
ProviderId()
const override {
return "sidebar"; }
112 std::function<void(
const std::string&)>
remove;
121 std::string
ProviderId()
const override {
return "welcome"; }
Plug-in command source for the palette.
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: "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