1#ifndef YAZE_APP_EDITOR_SYSTEM_RESOURCE_PANEL_H_
2#define YAZE_APP_EDITOR_SYSTEM_RESOURCE_PANEL_H_
6#include "absl/strings/str_format.h"
114 std::string
GetId()
const override {
Base class for windows that edit specific ROM resources.
std::string GetId() const override
Generated panel ID from resource type and ID.
void SetSessionId(size_t session_id)
Set the session ID for this resource panel.
WindowLifecycle GetWindowLifecycle() const override
Resource windows use CrossEditor lifecycle for opt-in persistence.
std::string GetDisplayName() const override
Generated display name from resource name.
size_t session_id_
Session ID for multi-ROM editing (0 = single session)
virtual void OnResourceDeleted()
Called when resource is deleted from ROM.
virtual ~ResourceWindowContent()=default
virtual bool AllowMultipleInstances() const
Whether multiple instances of this resource type can be open.
virtual std::string GetResourceName() const
Human-readable resource name.
virtual size_t GetSessionId() const
Get the session ID this resource belongs to.
virtual std::string GetResourceType() const =0
The resource type name.
virtual void OnResourceModified()
Called when resource data changes externally.
virtual int GetResourceId() const =0
The numeric ID of the resource.
Base interface for all logical window content components.
virtual std::string GetEditorCategory() const =0
Editor category this panel belongs to.
Default limits for resource panel counts.
constexpr size_t kMaxTotalResourcePanels
Maximum total resource panels across all types.
constexpr size_t kMaxSongPanels
Maximum open song panels (music editor)
constexpr size_t kMaxSheetPanels
Maximum open graphics sheet panels.
constexpr size_t kMaxRoomPanels
Maximum open room panels (dungeon editor)
constexpr size_t kMaxMapPanels
Maximum open map panels (overworld editor)
WindowLifecycle
Defines lifecycle behavior for editor windows.
@ CrossEditor
User can pin to persist across editors.