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 interface for all logical panel components.
virtual std::string GetEditorCategory() const =0
Editor category this panel belongs to.
Base class for panels that edit specific ROM resources.
virtual size_t GetSessionId() const
Get the session ID this resource belongs to.
virtual int GetResourceId() const =0
The numeric ID of the resource.
std::string GetDisplayName() const override
Generated display name from resource name.
virtual void OnResourceModified()
Called when resource data changes externally.
size_t session_id_
Session ID for multi-ROM editing (0 = single session)
virtual std::string GetResourceType() const =0
The resource type name.
virtual std::string GetResourceName() const
Human-readable resource name.
virtual ~ResourcePanel()=default
std::string GetId() const override
Generated panel ID from resource type and ID.
virtual void OnResourceDeleted()
Called when resource is deleted from ROM.
virtual bool AllowMultipleInstances() const
Whether multiple instances of this resource type can be open.
void SetSessionId(size_t session_id)
Set the session ID for this resource panel.
PanelCategory GetPanelCategory() const override
Resource panels use CrossEditor category for opt-in persistence.
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)
PanelCategory
Defines lifecycle behavior for editor panels.
@ CrossEditor
User can pin to persist across editors.