#include <door_editor_content.h>

Classes | |
| struct | CachedDoorPreview |
Public Member Functions | |
| std::string | GetId () const override |
| Unique identifier for this panel. | |
| std::string | GetDisplayName () const override |
| Human-readable name shown in menus and title bars. | |
| std::string | GetIcon () const override |
| Material Design icon for this panel. | |
| std::string | GetEditorCategory () const override |
| Editor category this panel belongs to. | |
| int | GetPriority () const override |
| Get display priority for menu ordering. | |
| std::string | GetWorkflowGroup () const override |
| Optional workflow group for hack-centric actions. | |
| float | GetPreferredWidth () const override |
| Get preferred width for this panel (optional) | |
| void | Draw (bool *p_open) override |
| Draw the panel content. | |
| void | DrawInWorkbench () |
| void | OnClose () override |
| Called when panel is hidden. | |
| void | SetCurrentRoom (int room_id) |
| void | SetCanvasViewerProvider (std::function< DungeonCanvasViewer *()> provider) |
| void | SetCanvasViewer (DungeonCanvasViewer *viewer) |
| void | SetRooms (DungeonRoomStore *rooms) |
| void | SetOpenSelectionInspectorCallback (std::function< void()> callback) |
| void | SetJumpToReciprocalDoorCallback (std::function< void(int neighbor_room_id, size_t reciprocal_door_index)> callback) |
Public Member Functions inherited from yaze::editor::WindowContent | |
| virtual | ~WindowContent ()=default |
| virtual void | OnFirstDraw () |
| Called once before the first Draw() in a session. | |
| virtual bool | RequiresLazyInit () const |
| Whether this panel uses lazy initialization. | |
| void | InvalidateLazyInit () |
| Reset lazy init state so OnFirstDraw() runs again. | |
| virtual void | OnOpen () |
| Called when panel becomes visible. | |
| virtual void | OnFocus () |
| Called when panel receives focus. | |
| virtual WindowLifecycle | GetWindowLifecycle () const |
| Get the lifecycle category for this window. | |
| virtual WindowContextScope | GetContextScope () const |
| Optional context binding for this window (room/selection/etc) | |
| virtual WindowScope | GetScope () const |
| Get the registration scope for this window. | |
| virtual WindowPresentationPolicy | GetPresentationPolicy () const |
| How this content is hosted and advertised by workspace chrome. | |
| virtual bool | IsEnabled () const |
| Check if this panel is currently enabled. | |
| virtual std::string | GetDisabledTooltip () const |
| Get tooltip text when panel is disabled. | |
| virtual std::string | GetShortcutHint () const |
| Get keyboard shortcut hint for display. | |
| virtual std::string | GetWorkflowLabel () const |
| Optional workflow label for menus/command palette. | |
| virtual std::string | GetWorkflowDescription () const |
| Optional workflow description for menus/command palette. | |
| virtual int | GetWorkflowPriority () const |
| Optional workflow ordering priority (lower sorts first). | |
| virtual bool | HasExactPreferredWidth () const |
| Whether GetPreferredWidth() is an exact content width. | |
| virtual float | GetPreferredHeight () const |
| Get preferred height for this panel (optional) | |
| virtual bool | PrefersFloating () const |
| virtual bool | PreferAutoHideTabBar () const |
| Whether the dock node hosting this panel should auto-hide its tab bar. | |
| virtual bool | IsVisibleByDefault () const |
| Whether this panel should be visible by default. | |
| virtual std::string | GetParentPanelId () const |
| Get parent panel ID for cascade behavior. | |
| virtual bool | CascadeCloseChildren () const |
| Whether closing this panel should close child panels. | |
| void | DrawWithLazyInit (bool *p_open) |
| Execute lazy initialization if needed, then call Draw() | |
Private Member Functions | |
| void | DrawContent (bool show_room_doors) |
| bool | HasMatchingViewer () const |
| bool | CanEditRoom () const |
| DungeonCanvasViewer * | ResolveCanvasViewer () |
| void | CancelPlacement () |
| const CachedDoorPreview & | GetOrCreateDoorPreview (zelda3::DoorType type, const zelda3::Room &room) |
Private Attributes | |
| std::unordered_map< int, CachedDoorPreview > | door_preview_cache_ |
| uint64_t | cached_door_graphics_revision_ = 0 |
| DungeonCanvasViewer * | canvas_viewer_ = nullptr |
| std::function< DungeonCanvasViewer *()> | canvas_viewer_provider_ |
| DungeonRoomStore * | rooms_ = nullptr |
| int | current_room_id_ = 0 |
| workbench::DungeonBrowserState | browser_state_ |
| zelda3::DoorType | selected_door_type_ = zelda3::DoorType::NormalDoor |
| bool | door_placement_mode_ = false |
| std::function< void(int, size_t)> | on_jump_to_reciprocal_door_ |
| std::function< void()> | open_selection_inspector_callback_ |
Additional Inherited Members | |
Protected Member Functions inherited from yaze::editor::WindowContent | |
| void | InvalidateCache () |
| Invalidate all cached computations. | |
| template<typename T > | |
| T & | GetCached (const std::string &key, std::function< T()> compute) |
| Get or compute a cached value. | |
| bool | IsCacheValid () const |
| Check if cache has been invalidated. | |
| void | ClearCache () |
| Clear all cached values (more aggressive than InvalidateCache) | |
Definition at line 20 of file door_editor_content.h.
|
inlineoverridevirtual |
Unique identifier for this panel.
IDs should be:
Implements yaze::editor::WindowContent.
Definition at line 22 of file door_editor_content.h.
|
inlineoverridevirtual |
Human-readable name shown in menus and title bars.
Implements yaze::editor::WindowContent.
Definition at line 23 of file door_editor_content.h.
|
inlineoverridevirtual |
Material Design icon for this panel.
Implements yaze::editor::WindowContent.
Definition at line 24 of file door_editor_content.h.
References ICON_MD_DOOR_FRONT.
|
inlineoverridevirtual |
Editor category this panel belongs to.
Implements yaze::editor::WindowContent.
Definition at line 25 of file door_editor_content.h.
|
inlineoverridevirtual |
Get display priority for menu ordering.
Reimplemented from yaze::editor::WindowContent.
Definition at line 26 of file door_editor_content.h.
|
inlineoverridevirtual |
Optional workflow group for hack-centric actions.
Reimplemented from yaze::editor::WindowContent.
Definition at line 27 of file door_editor_content.h.
|
inlineoverridevirtual |
Get preferred width for this panel (optional)
Override this to specify content-based sizing. For example, a tile selector with 8 tiles at 16px × 2.0 scale would return ~276px.
Reimplemented from yaze::editor::WindowContent.
Definition at line 28 of file door_editor_content.h.
|
overridevirtual |
Draw the panel content.
| p_open | Pointer to visibility flag (nullptr if not closable) |
Called by WorkspaceWindowManager when the panel is visible. Do NOT call ImGui::Begin/End - the PanelWindow wrapper handles that. Just draw your content directly.
Implements yaze::editor::WindowContent.
Definition at line 178 of file door_editor_content.cc.
References DrawContent().

| void yaze::editor::DoorEditorContent::DrawInWorkbench | ( | ) |
Definition at line 182 of file door_editor_content.cc.
References yaze::gui::AutoRegisterLastItem(), yaze::zelda3::BigKeyDoor, browser_state_, CanEditRoom(), canvas_viewer_, yaze::editor::workbench::DungeonBrowserState::category, current_room_id_, yaze::editor::workbench::DrawDungeonBrowserControls(), yaze::editor::workbench::DrawDungeonBrowserRow(), yaze::editor::DungeonRenderingHelpers::DrawSpritePreview(), yaze::editor::workbench::DungeonBrowserMatches(), yaze::zelda3::GetDoorTypeName(), GetOrCreateDoorPreview(), yaze::zelda3::GetPlaceableDoorTypes(), yaze::zelda3::IsExitDoorType(), yaze::zelda3::IsRoomConnectionDoorType(), yaze::editor::DungeonRenderingHelpers::kBackgroundBufferTransparentIndex, yaze::editor::DungeonCanvasViewer::object_interaction(), yaze::zelda3::Room::rendered_palette(), ResolveCanvasViewer(), rooms_, yaze::editor::workbench::DungeonBrowserState::search, selected_door_type_, yaze::editor::DungeonObjectInteraction::SetDoorPlacementMode(), yaze::editor::DungeonRoomStore::size(), yaze::zelda3::SmallKeyDoor, yaze::zelda3::SmallKeyStairsDown, yaze::zelda3::SmallKeyStairsDownLower, yaze::zelda3::SmallKeyStairsUp, yaze::zelda3::SmallKeyStairsUpLower, yaze::editor::workbench::DungeonBrowserState::sort, and yaze::zelda3::UnopenableBigKeyDoor.
|
overridevirtual |
Called when panel is hidden.
Use this to cleanup state, release resources, or save state. Called after the panel is hidden.
Reimplemented from yaze::editor::WindowContent.
Definition at line 174 of file door_editor_content.cc.
References CancelPlacement().

|
inline |
Definition at line 34 of file door_editor_content.h.
References current_room_id_.
|
inline |
Definition at line 35 of file door_editor_content.h.
References canvas_viewer_provider_.
|
inline |
Definition at line 38 of file door_editor_content.h.
References canvas_viewer_.
Referenced by yaze::editor::DungeonEditorV2::PrepareForSessionTeardown().
|
inline |
Definition at line 39 of file door_editor_content.h.
References rooms_.
|
inline |
Definition at line 40 of file door_editor_content.h.
References open_selection_inspector_callback_.
|
inline |
Definition at line 46 of file door_editor_content.h.
References on_jump_to_reciprocal_door_.
|
private |
Definition at line 346 of file door_editor_content.cc.
References yaze::gui::AutoRegisterLastItem(), CancelPlacement(), CanEditRoom(), canvas_viewer_, current_room_id_, yaze::editor::InteractionCoordinator::door_handler(), door_placement_mode_, yaze::editor::DungeonRenderingHelpers::DrawSpritePreview(), yaze::editor::DungeonObjectInteraction::entity_coordinator(), yaze::zelda3::GetDoorDirectionName(), yaze::editor::DoorInteractionHandler::GetDoorType(), yaze::zelda3::GetDoorTypeName(), GetOrCreateDoorPreview(), yaze::zelda3::GetPlaceableDoorTypes(), yaze::editor::DungeonObjectInteraction::GetSelectedEntity(), yaze::editor::AgentUI::GetTheme(), yaze::editor::DungeonObjectInteraction::HasEntitySelection(), HasMatchingViewer(), ICON_MD_CANCEL, ICON_MD_DOOR_FRONT, ICON_MD_INFO, ICON_MD_LIST, ICON_MD_OPEN_IN_NEW, ICON_MD_PLACE, ICON_MD_SELECT_ALL, yaze::gui::InputScalarDeferred(), yaze::editor::DungeonObjectInteraction::IsDoorPlacementActive(), yaze::editor::DungeonRenderingHelpers::kBackgroundBufferTransparentIndex, yaze::editor::DoorInteractionHandler::MutateDoorType(), yaze::editor::DungeonCanvasViewer::object_interaction(), open_selection_inspector_callback_, yaze::zelda3::Room::rendered_palette(), ResolveCanvasViewer(), rooms_, yaze::gui::SectionHeader(), selected_door_type_, yaze::editor::DungeonObjectInteraction::SelectEntity(), yaze::editor::DungeonObjectInteraction::SetDoorPlacementMode(), yaze::editor::DungeonRoomStore::size(), and yaze::editor::SelectedEntity::type.
Referenced by Draw().
|
private |
Definition at line 257 of file door_editor_content.cc.
References canvas_viewer_, yaze::editor::BaseEntityHandler::context(), yaze::editor::DungeonCanvasViewer::current_room_id(), yaze::editor::InteractionContext::current_room_id, current_room_id_, yaze::editor::DungeonObjectInteraction::entity_coordinator(), yaze::editor::DungeonCanvasViewer::object_interaction(), yaze::editor::DungeonCanvasViewer::rooms(), rooms_, yaze::editor::DungeonRoomStore::size(), and yaze::editor::InteractionCoordinator::tile_handler().
Referenced by CanEditRoom(), and DrawContent().
|
private |
Definition at line 271 of file door_editor_content.cc.
References canvas_viewer_, HasMatchingViewer(), yaze::editor::DungeonCanvasViewer::header_read_only(), and yaze::editor::DungeonCanvasViewer::IsObjectInteractionEnabled().
Referenced by DrawContent(), and DrawInWorkbench().

|
private |
Definition at line 159 of file door_editor_content.cc.
References canvas_viewer_, and canvas_viewer_provider_.
Referenced by CancelPlacement(), DrawContent(), and DrawInWorkbench().
|
private |
Definition at line 166 of file door_editor_content.cc.
References canvas_viewer_, door_placement_mode_, yaze::zelda3::NormalDoor, yaze::editor::DungeonCanvasViewer::object_interaction(), ResolveCanvasViewer(), and yaze::editor::DungeonObjectInteraction::SetDoorPlacementMode().
Referenced by DrawContent(), and OnClose().

|
private |
Definition at line 277 of file door_editor_content.cc.
References yaze::gfx::BackgroundBuffer::bitmap(), cached_door_graphics_revision_, canvas_viewer_, current_room_id_, yaze::Rom::data(), yaze::zelda3::ObjectDrawer::DoorDef::direction, door_preview_cache_, yaze::zelda3::ObjectDrawer::DrawDoor(), yaze::gfx::BackgroundBuffer::EnsureBitmapInitialized(), yaze::zelda3::Room::get_gfx_buffer(), yaze::zelda3::ObjectDrawer::DoorDef::GetDimensions(), yaze::zelda3::ObjectDrawer::DoorDef::GetTileCoords(), yaze::zelda3::Room::graphics_revision(), yaze::editor::DoorEditorContent::CachedDoorPreview::height, yaze::Rom::is_loaded(), yaze::zelda3::North, yaze::editor::DoorEditorContent::CachedDoorPreview::pixels, yaze::zelda3::ObjectDrawer::DoorDef::position, yaze::editor::DungeonCanvasViewer::rom(), yaze::zelda3::ObjectDrawer::DoorDef::type, and yaze::editor::DoorEditorContent::CachedDoorPreview::width.
Referenced by DrawContent(), and DrawInWorkbench().
|
mutableprivate |
Definition at line 68 of file door_editor_content.h.
Referenced by GetOrCreateDoorPreview().
|
mutableprivate |
Definition at line 69 of file door_editor_content.h.
Referenced by GetOrCreateDoorPreview().
|
private |
Definition at line 71 of file door_editor_content.h.
Referenced by CancelPlacement(), CanEditRoom(), DrawContent(), DrawInWorkbench(), GetOrCreateDoorPreview(), HasMatchingViewer(), ResolveCanvasViewer(), and SetCanvasViewer().
|
private |
Definition at line 72 of file door_editor_content.h.
Referenced by ResolveCanvasViewer(), and SetCanvasViewerProvider().
|
private |
Definition at line 73 of file door_editor_content.h.
Referenced by DrawContent(), DrawInWorkbench(), HasMatchingViewer(), and SetRooms().
|
private |
Definition at line 74 of file door_editor_content.h.
Referenced by DrawContent(), DrawInWorkbench(), GetOrCreateDoorPreview(), HasMatchingViewer(), and SetCurrentRoom().
|
private |
Definition at line 75 of file door_editor_content.h.
Referenced by DrawInWorkbench().
|
private |
Definition at line 76 of file door_editor_content.h.
Referenced by DrawContent(), and DrawInWorkbench().
|
private |
Definition at line 77 of file door_editor_content.h.
Referenced by CancelPlacement(), and DrawContent().
|
private |
Definition at line 78 of file door_editor_content.h.
Referenced by SetJumpToReciprocalDoorCallback().
|
private |
Definition at line 79 of file door_editor_content.h.
Referenced by DrawContent(), and SetOpenSelectionInspectorCallback().