1#ifndef YAZE_APP_EDITOR_DUNGEON_WORKSPACE_DUNGEON_WORKBENCH_CONTENT_H
2#define YAZE_APP_EDITOR_DUNGEON_WORKSPACE_DUNGEON_WORKBENCH_CONTENT_H
8#include <unordered_map>
19class DungeonCanvasViewer;
20class DungeonRoomSelector;
28 std::function<
void(
int)> on_room_selected,
30 on_room_selected_with_intent,
31 std::function<
void(
int)> on_save_room,
34 std::function<
const std::deque<int>&()> get_recent_rooms,
35 std::function<
void(
int)> forget_recent_room,
36 std::function<
void(
const std::string&)> show_panel,
37 std::function<
void(
bool)> set_workflow_mode,
Rom* rom =
nullptr);
39 std::string
GetId()
const override;
41 std::string
GetIcon()
const override;
54 std::function<
bool()> can_redo,
55 std::function<
void()> on_undo,
56 std::function<
void()> on_redo,
57 std::function<std::string()> undo_desc,
58 std::function<std::string()> redo_desc,
59 std::function<
int()> undo_depth) {
74 void Draw(
bool* p_open)
override;
85 bool left_sidebar_visible);
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Handles room and entrance selection UI.
bool room_dungeon_cache_built_
void DrawInspectorShelfSelection(DungeonCanvasViewer &viewer)
std::function< void(int)> on_room_selected_
std::function< bool()> can_redo_
int GetPriority() const override
Get display priority for menu ordering.
std::function< DungeonCanvasViewer *()> get_compare_viewer_
SidebarMode sidebar_mode_
void DrawInspectorHeader(float button_size, bool compact)
void DrawInspectorCompactSummary(DungeonCanvasViewer &viewer)
void DrawSidebarModeTabs(bool stacked, float segment_height)
std::function< void()> on_redo_
void DrawInspectorPrimarySelector(float segment_height)
void DrawRecentRoomTabs()
void SetUndoRedoProvider(std::function< bool()> can_undo, std::function< bool()> can_redo, std::function< void()> on_undo, std::function< void()> on_redo, std::function< std::string()> undo_desc, std::function< std::string()> redo_desc, std::function< int()> undo_depth)
void DrawSidebarPane(float width, float height, float button_size, bool compact)
void DrawSidebarContent()
void DrawInspectorShelf(DungeonCanvasViewer &viewer)
void DrawInspectorPane(float width, float height, float button_size, bool compact, DungeonCanvasViewer *viewer)
void DrawInspectorShelfRoom(DungeonCanvasViewer &viewer)
void DrawInspectorShelfView(DungeonCanvasViewer &viewer)
std::function< void(const std::string &) show_panel_)
std::function< int()> undo_depth_
void SetToolModeProvider(std::function< const char *()> provider)
std::string GetEditorCategory() const override
Editor category this panel belongs to.
std::function< std::string()> undo_desc_
void DrawInspectorShelfTools(DungeonCanvasViewer &viewer)
void DrawCanvasPane(float width, float height, DungeonCanvasViewer *primary_viewer, bool left_sidebar_visible)
std::function< bool()> can_undo_
DungeonRoomSelector * room_selector_
void DrawSidebarHeader(float button_size, bool compact)
std::function< void()> on_undo_
DungeonWorkbenchContent(DungeonRoomSelector *room_selector, int *current_room_id, std::function< void(int)> on_room_selected, std::function< void(int, RoomSelectionIntent)> on_room_selected_with_intent, std::function< void(int)> on_save_room, std::function< DungeonCanvasViewer *()> get_viewer, std::function< DungeonCanvasViewer *()> get_compare_viewer, std::function< const std::deque< int > &()> get_recent_rooms, std::function< void(int)> forget_recent_room, std::function< void(const std::string &)> show_panel, std::function< void(bool)> set_workflow_mode, Rom *rom=nullptr)
std::function< std::string()> redo_desc_
char compare_search_buf_[64]
std::function< void(int, RoomSelectionIntent)> on_room_selected_with_intent_
std::function< void(int)> on_save_room_
void NotifyRoomChanged(int previous_room_id)
Called by the editor when the current room changes.
std::string GetId() const override
Unique identifier for this panel.
void DrawSplitView(DungeonCanvasViewer &primary_viewer)
std::function< void(bool)> set_workflow_mode_
std::string GetIcon() const override
Material Design icon for this panel.
std::unordered_map< int, std::string > room_dungeon_cache_
InspectorFocus inspector_focus_
std::function< const char *()> get_tool_mode_
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
void Draw(bool *p_open) override
Draw the panel content.
DungeonWorkbenchLayoutState layout_state_
bool show_shortcut_legend_
std::function< void(int)> forget_recent_room_
std::function< const std::deque< int > &()> get_recent_rooms_
void DrawInspector(DungeonCanvasViewer &viewer)
void BuildRoomDungeonCache()
std::function< DungeonCanvasViewer *()> get_viewer_
Base interface for all logical window content components.
Editors are the view controllers for the application.
RoomSelectionIntent
Intent for room selection in the dungeon editor.