Authoritative component for entity editing state and UI. More...
#include <entity_workbench.h>


Public Member Functions | |
| OverworldEntityWorkbench ()=default | |
| std::string | GetId () const override |
| Unique identifier for this panel. | |
| std::string | GetWorkflowGroup () const override |
| Optional workflow group for hack-centric actions. | |
| 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. | |
| void | Draw (bool *p_open) override |
| Draw the panel content. | |
| void | SetActiveEntity (zelda3::GameEntity *entity) |
| void | OpenEditorFor (zelda3::GameEntity *entity) |
| void | OpenContextMenuFor (zelda3::GameEntity *entity) |
| void | DrawPopups () |
| void | ProcessPendingInsertion (EntityMutationService *mutation_service) |
| zelda3::GameEntity * | DrawEntityContextMenu () |
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 | OnClose () |
| Called when panel is hidden. | |
| 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 int | GetPriority () const |
| Get display priority for menu ordering. | |
| 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 float | GetPreferredWidth () const |
| Get preferred width for this panel (optional) | |
| 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 Attributes | |
| zelda3::GameEntity * | editing_entity_ = nullptr |
| std::optional< zelda3::SpecialEntranceInspection > | special_entrances_ |
| const Rom * | inspected_rom_ = nullptr |
| const uint8_t * | inspected_rom_data_ = nullptr |
| std::string | inspected_filename_ |
Static Private Attributes | |
| static constexpr const char * | kContextMenuPopupId |
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) | |
Authoritative component for entity editing state and UI.
This WindowContent manages the active editing context for overworld entities (items, sprites, entrances, exits). It hosts the property popups and tracks the "currently editing" entity state.
Definition at line 36 of file entity_workbench.h.
|
default |
|
inlineoverridevirtual |
Unique identifier for this panel.
IDs should be:
Implements yaze::editor::WindowContent.
Definition at line 41 of file entity_workbench.h.
|
inlineoverridevirtual |
Optional workflow group for hack-centric actions.
Reimplemented from yaze::editor::WindowContent.
Definition at line 42 of file entity_workbench.h.
|
inlineoverridevirtual |
Human-readable name shown in menus and title bars.
Implements yaze::editor::WindowContent.
Definition at line 43 of file entity_workbench.h.
|
inlineoverridevirtual |
Material Design icon for this panel.
Implements yaze::editor::WindowContent.
Definition at line 44 of file entity_workbench.h.
References ICON_MD_EDIT.
|
inlineoverridevirtual |
Editor category this panel belongs to.
Implements yaze::editor::WindowContent.
Definition at line 45 of file entity_workbench.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 49 of file entity_workbench.cc.
References yaze::editor::CurrentOverworldWindowContext(), yaze::Rom::data(), yaze::Rom::filename(), yaze::zelda3::Zelda3Labels::GetLabel(), ICON_MD_SETTINGS, inspected_filename_, inspected_rom_, inspected_rom_data_, yaze::zelda3::InspectSpecialEntrances(), OpenEditorFor(), and special_entrances_.
| void yaze::editor::OverworldEntityWorkbench::SetActiveEntity | ( | zelda3::GameEntity * | entity | ) |
Definition at line 159 of file entity_workbench.cc.
References yaze::editor::CurrentOverworldWindowContext().
Referenced by yaze::editor::OverworldEditor::ClearSelectedItem(), and yaze::editor::OverworldEditor::SelectItemByIdentity().

| void yaze::editor::OverworldEntityWorkbench::OpenEditorFor | ( | zelda3::GameEntity * | entity | ) |
Definition at line 166 of file entity_workbench.cc.
References yaze::editor::CurrentOverworldWindowContext(), editing_entity_, yaze::zelda3::GameEntity::entity_type_, yaze::zelda3::GameEntity::kEntrance, yaze::zelda3::GameEntity::kExit, yaze::zelda3::GameEntity::kItem, yaze::gui::EditorNames::kOverworld, yaze::zelda3::GameEntity::kSprite, and yaze::gui::MakePopupId().
Referenced by Draw(), DrawPopups(), and ProcessPendingInsertion().

| void yaze::editor::OverworldEntityWorkbench::OpenContextMenuFor | ( | zelda3::GameEntity * | entity | ) |
Definition at line 206 of file entity_workbench.cc.
References yaze::editor::CurrentOverworldWindowContext(), and kContextMenuPopupId.
Referenced by yaze::editor::OverworldEditor::InitInteractionCoordinator().

| void yaze::editor::OverworldEntityWorkbench::DrawPopups | ( | ) |
Definition at line 215 of file entity_workbench.cc.
References yaze::editor::CurrentOverworldWindowContext(), DrawEntityContextMenu(), yaze::editor::DrawExitEditorPopup(), yaze::editor::DrawItemEditorPopup(), yaze::editor::DrawOverworldEntrancePopup(), yaze::editor::DrawSpriteEditorPopup(), editing_entity_, kContextMenuPopupId, yaze::zelda3::GameEntity::kEntrance, yaze::zelda3::GameEntity::kExit, yaze::zelda3::GameEntity::kItem, yaze::gui::EditorNames::kOverworld, yaze::zelda3::GameEntity::kSprite, yaze::gui::MakePopupId(), and OpenEditorFor().
| void yaze::editor::OverworldEntityWorkbench::ProcessPendingInsertion | ( | EntityMutationService * | mutation_service | ) |
Definition at line 294 of file entity_workbench.cc.
References yaze::editor::CurrentOverworldWindowContext(), yaze::editor::EntityMutationService::InsertEntity(), and OpenEditorFor().

| zelda3::GameEntity * yaze::editor::OverworldEntityWorkbench::DrawEntityContextMenu | ( | ) |
Definition at line 317 of file entity_workbench.cc.
References yaze::editor::CurrentOverworldWindowContext(), ICON_MD_EDIT, ICON_MD_LINK, yaze::zelda3::GameEntity::kEntrance, yaze::zelda3::GameEntity::kExit, and yaze::gui::RenderMenuItems().
Referenced by DrawPopups().

|
staticconstexprprivate |
Definition at line 66 of file entity_workbench.h.
Referenced by DrawPopups(), and OpenContextMenuFor().
|
private |
Definition at line 69 of file entity_workbench.h.
Referenced by DrawPopups(), and OpenEditorFor().
|
private |
Definition at line 70 of file entity_workbench.h.
Referenced by Draw().
|
private |
Definition at line 71 of file entity_workbench.h.
Referenced by Draw().
|
private |
Definition at line 72 of file entity_workbench.h.
Referenced by Draw().
|
private |
Definition at line 73 of file entity_workbench.h.
Referenced by Draw().