yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
window_sidebar.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_MENU_WINDOW_SIDEBAR_H_
2#define YAZE_APP_EDITOR_MENU_WINDOW_SIDEBAR_H_
3
4#include <functional>
5#include <string>
6
7namespace yaze {
8namespace editor {
9
10class WorkspaceWindowManager;
11struct WindowDescriptor;
12
14 public:
15 explicit WindowSidebar(
16 WorkspaceWindowManager& window_manager,
17 std::function<bool()> is_dungeon_workbench_mode = {},
18 std::function<void(bool)> set_dungeon_workflow_mode = {},
19 std::function<float()> get_bottom_reserved_height = {});
20
21 static bool MatchesWindowSearch(const std::string& query,
22 const std::string& display_name,
23 const std::string& window_id,
24 const std::string& shortcut_hint);
25 static bool IsDungeonWindowModeTarget(const std::string& window_id);
26
27 // Maps WindowDescriptor::workflow_group to a sidebar section label.
28 // Empty / "Windows" → "Editors". Known groups pass through unchanged.
29 static std::string SidebarSectionFor(const std::string& workflow_group);
30 static std::string SidebarSectionFor(const WindowDescriptor& window);
31
32 // Workbench mode hides Room List / Matrix / per-room windows from the list.
33 static bool ShouldOmitWindowInSidebar(const std::string& window_id,
34 bool dungeon_workbench_mode);
35
36 void Draw(size_t session_id, const std::string& category,
37 std::function<bool()> has_rom);
38
39 private:
41
43 std::function<bool()> is_dungeon_workbench_mode_;
44 std::function<void(bool)> set_dungeon_workflow_mode_;
45 std::function<float()> get_bottom_reserved_height_;
46 char sidebar_search_[256] = {};
47};
48
49} // namespace editor
50} // namespace yaze
51
52#endif // YAZE_APP_EDITOR_MENU_WINDOW_SIDEBAR_H_
void Draw(size_t session_id, const std::string &category, std::function< bool()> has_rom)
std::function< void(bool)> set_dungeon_workflow_mode_
WindowSidebar(WorkspaceWindowManager &window_manager, std::function< bool()> is_dungeon_workbench_mode={}, std::function< void(bool)> set_dungeon_workflow_mode={}, std::function< float()> get_bottom_reserved_height={})
std::function< bool()> is_dungeon_workbench_mode_
static bool IsDungeonWindowModeTarget(const std::string &window_id)
WorkspaceWindowManager & window_manager_
std::function< float()> get_bottom_reserved_height_
static std::string SidebarSectionFor(const std::string &workflow_group)
static bool ShouldOmitWindowInSidebar(const std::string &window_id, bool dungeon_workbench_mode)
static bool MatchesWindowSearch(const std::string &query, const std::string &display_name, const std::string &window_id, const std::string &shortcut_hint)
Central registry for all editor cards with session awareness and dependency injection.
Metadata for a dockable editor window (formerly PanelInfo)