Global context for accessing shared resources. More...
Functions | |
| void | SetGlobalContext (GlobalEditorContext *ctx) |
| Rom * | rom () |
| Get the current ROM instance. | |
| void | SetRom (Rom *rom) |
| Set the current ROM instance. | |
| ::yaze::EventBus * | event_bus () |
| Get the current EventBus instance. | |
| void | SetEventBus (::yaze::EventBus *bus) |
| Set the current EventBus instance. | |
| Editor * | current_editor () |
| Get the currently active editor. | |
| void | SetCurrentEditor (Editor *editor) |
| Set the currently active editor. | |
| ::yaze::zelda3::GameData * | game_data () |
| Get the current game data instance. | |
| void | SetGameData (::yaze::zelda3::GameData *data) |
| Set the current game data instance. | |
| ::yaze::project::YazeProject * | current_project () |
| Get the current project instance. | |
| void | SetCurrentProject (::yaze::project::YazeProject *project) |
| Set the current project instance. | |
| void | Clear () |
| Clear all context state. | |
| void | SetGlobalContext (::yaze::editor::GlobalEditorContext *ctx) |
| Set the backing GlobalEditorContext instance. | |
Global context for accessing shared resources.
Context provides access to the current ROM and other shared state. This replaces the need for panels to receive dependencies via constructor.
| void yaze::editor::ContentRegistry::Context::SetGlobalContext | ( | GlobalEditorContext * | ctx | ) |
Definition at line 58 of file content_registry.cc.
Referenced by yaze::editor::EditorManager::EditorManager().
| Rom * yaze::editor::ContentRegistry::Context::rom | ( | ) |
Get the current ROM instance.
Definition at line 63 of file content_registry.cc.
Referenced by yaze::editor::OracleValidationPanel::DefaultRomPath(), yaze::editor::OracleValidationPanel::GetRom(), yaze::test::CoreSystemsTestSuite::RunContentRegistryContextClearTest(), yaze::test::CoreSystemsTestSuite::RunContentRegistryContextSetRomTest(), yaze::test::CoreSystemsTestSuite::RunContentRegistryThreadSafetyTest(), and SetRom().
| void yaze::editor::ContentRegistry::Context::SetRom | ( | Rom * | rom | ) |
Set the current ROM instance.
| rom | Pointer to the ROM to set as current. |
Definition at line 70 of file content_registry.cc.
References rom().
Referenced by yaze::editor::EditorManager::HandleSessionRomLoaded(), yaze::editor::EditorManager::HandleSessionSwitched(), yaze::test::CoreSystemsTestSuite::RunContentRegistryContextClearTest(), yaze::test::CoreSystemsTestSuite::RunContentRegistryContextSetRomTest(), and yaze::test::CoreSystemsTestSuite::RunContentRegistryThreadSafetyTest().

| yaze::EventBus * yaze::editor::ContentRegistry::Context::event_bus | ( | ) |
Get the current EventBus instance.
Definition at line 79 of file content_registry.cc.
Referenced by yaze::editor::DungeonRoomSelector::DrawEntranceSelector(), yaze::editor::DungeonRoomSelector::DrawGroupedRoomList(), yaze::editor::DungeonRoomSelector::DrawRoomSelector(), yaze::editor::PanelManager::HidePanel(), yaze::Controller::OnLoad(), yaze::editor::StoryEventGraphPanel::PublishJumpToAssemblySymbol(), yaze::editor::StoryEventGraphPanel::PublishJumpToMap(), yaze::editor::StoryEventGraphPanel::PublishJumpToMessage(), yaze::editor::StoryEventGraphPanel::PublishJumpToRoom(), yaze::editor::CommandPalette::RegisterDungeonRoomCommands(), yaze::editor::PanelManager::RestoreVisibilityState(), yaze::gui::Canvas::set_global_scale(), yaze::editor::PanelManager::ShowPanel(), yaze::Application::Tick(), yaze::editor::PanelManager::TogglePanel(), yaze::gui::Canvas::ZoomIn(), and yaze::gui::Canvas::ZoomOut().
| void yaze::editor::ContentRegistry::Context::SetEventBus | ( | ::yaze::EventBus * | bus | ) |
Set the current EventBus instance.
| bus | Pointer to the EventBus to set as current. |
Definition at line 86 of file content_registry.cc.
Referenced by yaze::editor::EditorManager::InitializeSubsystems().
| Editor * yaze::editor::ContentRegistry::Context::current_editor | ( | ) |
Get the currently active editor.
Definition at line 94 of file content_registry.cc.
Referenced by yaze::editor::DungeonRoomGraphicsPanel::Draw(), yaze::editor::AreaGraphicsPanel::Draw(), yaze::editor::DebugWindowPanel::Draw(), yaze::editor::GfxGroupsPanel::Draw(), yaze::editor::MapPropertiesPanel::Draw(), yaze::editor::OverworldCanvasPanel::Draw(), yaze::editor::ScratchSpacePanel::Draw(), yaze::editor::Tile16EditorPanel::Draw(), yaze::editor::Tile16SelectorPanel::Draw(), yaze::editor::Tile8SelectorPanel::Draw(), yaze::editor::UsageStatisticsPanel::Draw(), and yaze::editor::V3SettingsPanel::Draw().
| void yaze::editor::ContentRegistry::Context::SetCurrentEditor | ( | Editor * | editor | ) |
Set the currently active editor.
| editor | Pointer to the editor to set as current. |
Called when switching between editors (Overworld, Dungeon, etc.)
Definition at line 101 of file content_registry.cc.
Referenced by yaze::editor::PanelManager::DrawAllVisiblePanels(), and yaze::editor::EditorManager::SetCurrentEditor().
| yaze::zelda3::GameData * yaze::editor::ContentRegistry::Context::game_data | ( | ) |
Get the current game data instance.
Definition at line 110 of file content_registry.cc.
| void yaze::editor::ContentRegistry::Context::SetGameData | ( | ::yaze::zelda3::GameData * | data | ) |
Set the current game data instance.
| data | Pointer to the GameData to set as current. |
Called when loading a ROM or switching sessions.
Definition at line 117 of file content_registry.cc.
Referenced by yaze::editor::EditorManager::EnsureGameDataLoaded(), yaze::editor::EditorManager::HandleSessionRomLoaded(), and yaze::editor::EditorManager::HandleSessionSwitched().
| yaze::project::YazeProject * yaze::editor::ContentRegistry::Context::current_project | ( | ) |
Get the current project instance.
Definition at line 126 of file content_registry.cc.
Referenced by yaze::editor::anonymous_namespace{menu_inspector_panel.cc}::DetermineInitialProjectPath(), yaze::editor::AnnotationOverlayPanel::Draw(), yaze::editor::StoryEventGraphPanel::Draw(), and yaze::editor::ProgressionDashboardPanel::Draw().
| void yaze::editor::ContentRegistry::Context::SetCurrentProject | ( | ::yaze::project::YazeProject * | project | ) |
Set the current project instance.
| project | Pointer to the project to set as current. |
Called when opening or switching projects.
Definition at line 133 of file content_registry.cc.
Referenced by yaze::editor::EditorManager::LoadProjectWithRom().
| void yaze::editor::ContentRegistry::Context::Clear | ( | ) |
Clear all context state.
Called during shutdown or when switching sessions.
Definition at line 142 of file content_registry.cc.
Referenced by yaze::editor::EditorManager::HandleSessionClosed(), and yaze::test::CoreSystemsTestSuite::RunContentRegistryContextClearTest().
| void yaze::editor::ContentRegistry::Context::SetGlobalContext | ( | ::yaze::editor::GlobalEditorContext * | ctx | ) |
Set the backing GlobalEditorContext instance.
When set, Context getters/setters delegate to this instance. Called once during EditorManager initialization. Pass nullptr to revert to standalone static storage.