yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::editor::EditorManager Class Reference

The EditorManager controls the main editor window and manages the various editor classes. More...

#include <editor_manager.h>

Classes

struct  RomSession
 

Public Member Functions

 EditorManager ()
 
 ~EditorManager ()
 
void Initialize (gfx::IRenderer *renderer, const std::string &filename="")
 
void OpenEditorAndCardsFromFlags (const std::string &editor_name, const std::string &cards_str)
 
absl::Status Update ()
 
void DrawMenuBar ()
 
auto emulator () -> emu::Emulator &
 
auto quit () const
 
auto version () const
 
void DrawMenuBarExtras ()
 
MenuBuildermenu_builder ()
 
void ShowSessionSwitcher ()
 
void ShowEditorSelection ()
 
void ShowDisplaySettings ()
 
absl::Status SetCurrentRom (Rom *rom)
 
auto GetCurrentRom () -> Rom *
 
auto GetCurrentEditorSet () -> EditorSet *
 
auto overworld () -> yaze::zelda3::Overworld *
 
size_t GetCurrentSessionIndex () const
 
core::FeatureFlags::FlagsGetCurrentFeatureFlags ()
 
void SetFontGlobalScale (float scale)
 
void BuildModernMenu ()
 
void LoadUserSettings ()
 
void SaveUserSettings ()
 
void RefreshWorkspacePresets ()
 
void SaveWorkspacePreset (const std::string &name)
 
void LoadWorkspacePreset (const std::string &name)
 
void JumpToDungeonRoom (int room_id)
 
void JumpToOverworldMap (int map_id)
 
void SwitchToEditor (EditorType editor_type)
 
void CreateNewSession ()
 
void DuplicateCurrentSession ()
 
void CloseCurrentSession ()
 
void RemoveSession (size_t index)
 
void SwitchToSession (size_t index)
 
size_t GetActiveSessionCount () const
 
void SaveWorkspaceLayout ()
 
void LoadWorkspaceLayout ()
 
void ResetWorkspaceLayout ()
 
void ShowAllWindows ()
 
void HideAllWindows ()
 
void MaximizeCurrentWindow ()
 
void RestoreAllWindows ()
 
void CloseAllFloatingWindows ()
 
void LoadDeveloperLayout ()
 
void LoadDesignerLayout ()
 
void LoadModderLayout ()
 
std::string GenerateUniqueEditorTitle (EditorType type, size_t session_index) const
 
bool HasDuplicateSession (const std::string &filepath)
 
void RenameSession (size_t index, const std::string &new_name)
 

Private Member Functions

void DrawWelcomeScreen ()
 
absl::Status DrawRomSelector ()
 
void DrawContextSensitiveCardControl ()
 
void DrawSessionSwitcher ()
 
void DrawSessionManager ()
 
void DrawLayoutPresets ()
 
void DrawSessionRenameDialog ()
 
absl::Status LoadRom ()
 
absl::Status LoadAssets ()
 
absl::Status SaveRom ()
 
absl::Status SaveRomAs (const std::string &filename)
 
absl::Status OpenRomOrProject (const std::string &filename)
 
absl::Status CreateNewProject (const std::string &template_name="Basic ROM Hack")
 
absl::Status OpenProject ()
 
absl::Status SaveProject ()
 
absl::Status SaveProjectAs ()
 
absl::Status ImportProject (const std::string &project_path)
 
absl::Status RepairCurrentProject ()
 
void ShowProjectHelp ()
 
void InitializeTestSuites ()
 

Private Attributes

bool quit_ = false
 
bool new_project_menu = false
 
bool show_emulator_ = false
 
bool show_memory_editor_ = false
 
bool show_asm_editor_ = false
 
bool show_imgui_metrics_ = false
 
bool show_imgui_demo_ = false
 
bool show_palette_editor_ = false
 
bool show_resource_label_manager = false
 
bool show_workspace_layout = false
 
bool show_save_workspace_preset_ = false
 
bool show_load_workspace_preset_ = false
 
bool show_session_switcher_ = false
 
bool show_session_manager_ = false
 
bool show_layout_presets_ = false
 
bool show_homepage_ = true
 
bool show_command_palette_ = false
 
bool show_global_search_ = false
 
bool show_session_rename_dialog_ = false
 
bool show_welcome_screen_ = false
 
bool welcome_screen_manually_closed_ = false
 
bool show_card_browser_ = false
 
size_t session_to_rename_ = 0
 
char session_rename_buffer_ [256] = {}
 
bool show_test_dashboard_ = false
 
bool show_performance_dashboard_ = false
 
ProposalDrawer proposal_drawer_
 
bool show_proposal_drawer_ = false
 
AgentChatHistoryPopup agent_chat_history_popup_
 
bool show_chat_history_popup_ = false
 
ProjectFileEditor project_file_editor_
 
EditorSelectionDialog editor_selection_dialog_
 
bool show_editor_selection_ = false
 
WelcomeScreen welcome_screen_
 
std::string version_ = ""
 
absl::Status status_
 
emu::Emulator emulator_
 
std::deque< RomSessionsessions_
 
Romcurrent_rom_ = nullptr
 
EditorSetcurrent_editor_set_ = nullptr
 
Editorcurrent_editor_ = nullptr
 
EditorSet blank_editor_set_ {}
 
gfx::IRendererrenderer_ = nullptr
 
core::YazeProject current_project_
 
EditorContext context_
 
std::unique_ptr< PopupManagerpopup_manager_
 
ToastManager toast_manager_
 
MenuBuilder menu_builder_
 
UserSettings user_settings_
 
WorkspaceManager workspace_manager_ {&toast_manager_}
 
float autosave_timer_ = 0.0f
 

Detailed Description

The EditorManager controls the main editor window and manages the various editor classes.

The EditorManager class contains instances of various editor classes such as AssemblyEditor, DungeonEditor, GraphicsEditor, MusicEditor, OverworldEditor, PaletteEditor, ScreenEditor, and SpriteEditor. The current_editor_ member variable points to the currently active editor in the tab view.

Definition at line 109 of file editor_manager.h.

Constructor & Destructor Documentation

◆ EditorManager()

yaze::editor::EditorManager::EditorManager ( )

◆ ~EditorManager()

yaze::editor::EditorManager::~EditorManager ( )
default

Member Function Documentation

◆ Initialize()

void yaze::editor::EditorManager::Initialize ( gfx::IRenderer renderer,
const std::string &  filename = "" 
)

Definition at line 146 of file editor_manager.cc.

References yaze::editor::AgentChatWidget::Z3EDCommandCallbacks::accept_proposal, agent_chat_history_popup_, yaze::cli::GeminiConfig::api_key, blank_editor_set_, yaze::editor::AgentChatWidget::MultimodalCallbacks::capture_snapshot, yaze::Rom::Close(), CloseCurrentSession(), context_, yaze::editor::Editor::Copy(), CreateNewProject(), CreateNewSession(), current_editor_, current_editor_set_, current_rom_, yaze::editor::Editor::Cut(), yaze::editor::AgentChatWidget::Z3EDCommandCallbacks::diff_proposal, yaze::editor::EditorSet::dungeon_editor_, editor_selection_dialog_, yaze::editor::Editor::Find(), yaze::editor::AgentChatWidget::AutomationCallbacks::focus_proposal, yaze::editor::ProposalDrawer::FocusProposal(), yaze::cli::GeminiAIService::GenerateMultimodalResponse(), yaze::gui::EditorCardManager::Get(), yaze::test::TestManager::Get(), yaze::core::RecentFilesManager::GetInstance(), yaze::editor::EditorSet::graphics_editor_, ICON_MD_PREVIEW, InitializeTestSuites(), yaze::editor::kAgent, yaze::cli::agent::ChatMessage::kAgent, yaze::editor::kAssembly, yaze::editor::kDungeon, yaze::editor::kEmulator, yaze::editor::kGraphics, yaze::editor::kInfo, yaze::editor::kMessage, yaze::editor::kMusic, yaze::editor::kOverworld, yaze::editor::kPalette, yaze::editor::kScreen, yaze::editor::kSettings, yaze::editor::kSprite, yaze::editor::AgentChatWidget::Z3EDCommandCallbacks::list_proposals, yaze::editor::UserSettings::Load(), LoadRom(), LoadUserSettings(), LoadWorkspaceLayout(), LOG_WARN, yaze::editor::EditorSelectionDialog::MarkRecentlyUsed(), MaximizeCurrentWindow(), yaze::cli::agent::ChatMessage::message, yaze::editor::EditorSet::message_editor_, yaze::cli::GeminiConfig::model, yaze::editor::EditorSet::music_editor_, yaze::editor::AgentChatWidget::AutomationCallbacks::open_harness_dashboard, OpenRomOrProject(), yaze::editor::EditorSet::overworld_editor_, yaze::editor::EditorSet::palette_editor_, yaze::editor::Editor::Paste(), yaze::editor::EditorContext::popup_manager, popup_manager_, PRINT_IF_ERROR, project_file_editor_, proposal_drawer_, quit_, yaze::editor::Editor::Redo(), yaze::editor::ShortcutManager::RegisterShortcut(), yaze::editor::AgentChatWidget::Z3EDCommandCallbacks::reject_proposal, renderer_, yaze::editor::AgentChatWidget::AutomationCallbacks::replay_last_plan, yaze::test::TestManager::ReplayLastPlan(), SaveRom(), SaveWorkspaceLayout(), yaze::editor::EditorSet::screen_editor_, yaze::editor::AgentChatWidget::MultimodalCallbacks::send_to_gemini, yaze::cli::agent::ChatMessage::sender, yaze::editor::Editor::set_active(), yaze::editor::WelcomeScreen::SetNewProjectCallback(), yaze::editor::WelcomeScreen::SetOpenProjectCallback(), yaze::editor::WelcomeScreen::SetOpenRomCallback(), yaze::editor::EditorSelectionDialog::SetSelectionCallback(), yaze::editor::EditorSet::settings_editor_, yaze::editor::AgentChatHistoryPopup::SetToastManager(), yaze::editor::ProjectFileEditor::SetToastManager(), yaze::editor::EditorContext::shortcut_manager, yaze::editor::ProposalDrawer::Show(), yaze::editor::ToastManager::Show(), yaze::editor::AgentChatWidget::AutomationCallbacks::show_active_tests, show_asm_editor_, show_card_browser_, show_command_palette_, show_editor_selection_, show_emulator_, show_global_search_, show_session_switcher_, show_test_dashboard_, show_welcome_screen_, yaze::gui::EditorCardManager::ShowAllCardsInCategory(), yaze::test::TestManager::ShowHarnessActiveTests(), yaze::test::TestManager::ShowHarnessDashboard(), yaze::editor::EditorSet::sprite_editor_, status_, yaze::cli::agent::ChatMessage::timestamp, toast_manager_, yaze::editor::AgentChatHistoryPopup::Toggle(), yaze::editor::ProposalDrawer::Toggle(), yaze::editor::Editor::Undo(), user_settings_, yaze::cli::GeminiConfig::verbose, welcome_screen_, and welcome_screen_manually_closed_.

Referenced by yaze::core::Controller::OnEntry().

◆ OpenEditorAndCardsFromFlags()

◆ Update()

absl::Status yaze::editor::EditorManager::Update ( )
Todo:
Add EditorType::kGraphics, EditorType::kPalette when converted

Definition at line 666 of file editor_manager.cc.

References yaze::editor::UserSettings::Preferences::autosave_enabled, yaze::editor::UserSettings::Preferences::autosave_interval, autosave_timer_, yaze::Rom::SaveSettings::backup, context_, current_editor_, current_editor_set_, current_rom_, yaze::Rom::dirty(), yaze::editor::ProposalDrawer::Draw(), yaze::editor::ToastManager::Draw(), yaze::gui::EditorCardManager::DrawCardBrowser(), editor_selection_dialog_, yaze::editor::ExecuteShortcuts(), GenerateUniqueEditorTitle(), yaze::core::TimingManager::Get(), yaze::gui::BackgroundRenderer::Get(), yaze::gfx::PerformanceDashboard::Get(), yaze::gui::EditorCardManager::Get(), yaze::gui::ThemeManager::Get(), yaze::test::TestManager::Get(), yaze::Rom::is_loaded(), yaze::editor::kDungeon, yaze::editor::kError, yaze::editor::kOverworld, yaze::editor::kSuccess, LOG_DEBUG, popup_manager_, yaze::editor::UserSettings::prefs(), proposal_drawer_, yaze::gfx::PerformanceDashboard::Render(), yaze::Rom::SaveSettings::save_new, yaze::Rom::SaveToFile(), yaze::editor::EditorContext::session_id, sessions_, yaze::editor::Editor::set_active(), yaze::test::TestManager::SetCurrentRom(), yaze::editor::EditorContext::shortcut_manager, yaze::editor::EditorSelectionDialog::Show(), yaze::editor::ToastManager::Show(), show_card_browser_, show_editor_selection_, show_performance_dashboard_, show_welcome_screen_, status_, toast_manager_, yaze::core::TimingManager::Update(), user_settings_, and welcome_screen_manually_closed_.

Referenced by yaze::core::Controller::OnLoad().

◆ DrawMenuBar()

void yaze::editor::EditorManager::DrawMenuBar ( )

Definition at line 1420 of file editor_manager.cc.

References agent_chat_history_popup_, yaze::editor::EditorSet::assembly_editor_, BuildModernMenu(), yaze::core::YazeProject::code_folder, context_, yaze::core::YazeProject::Create(), current_editor_set_, current_project_, current_rom_, yaze::core::ResourceLabelManager::DisplayLabels(), yaze::editor::AgentChatHistoryPopup::Draw(), yaze::editor::ProjectFileEditor::Draw(), yaze::editor::ProposalDrawer::Draw(), DrawLayoutPresets(), DrawMenuBarExtras(), DrawRomSelector(), DrawSessionManager(), DrawSessionRenameDialog(), DrawSessionSwitcher(), DrawWelcomeScreen(), emulator_, yaze::core::ResourceLabelManager::filename_, yaze::core::YazeProject::filepath, yaze::gfx::PerformanceDashboard::Get(), yaze::test::TestManager::Get(), GetActiveSessionCount(), yaze::util::GetFileExtension(), yaze::util::GetFileName(), yaze::core::RecentFilesManager::GetInstance(), yaze::editor::ShortcutManager::GetShortcuts(), ICON_MD_ADD, ICON_MD_CANCEL, ICON_MD_CLEAR, ICON_MD_CODE, ICON_MD_DESCRIPTION, ICON_MD_FOLDER, ICON_MD_FOLDER_OPEN, ICON_MD_HISTORY, ICON_MD_INFO, ICON_MD_LABEL, ICON_MD_LIST, ICON_MD_MANAGE_SEARCH, ICON_MD_SAVE, ICON_MD_SAVE_AS, ICON_MD_SEARCH, ICON_MD_STAR, ICON_MD_TAB, ICON_MD_VIDEOGAME_ASSET, yaze::gui::kDefaultModalSize, yaze::editor::kError, yaze::editor::kSuccess, yaze::editor::kWarning, yaze::core::ResourceLabelManager::labels_, yaze::core::YazeProject::labels_filename, LoadWorkspacePreset(), yaze::editor::EditorSet::memory_editor_, new_project_menu, OpenRomOrProject(), yaze::editor::EditorSet::palette_editor_, popup_manager_, yaze::editor::PrintShortcut(), project_file_editor_, yaze::core::YazeProject::project_opened(), proposal_drawer_, RefreshWorkspacePresets(), yaze::gfx::PerformanceDashboard::Render(), yaze::Rom::resource_label(), yaze::core::YazeProject::rom_filename, yaze::emu::Emulator::Run(), yaze::core::YazeProject::Save(), SaveRomAs(), SaveWorkspacePreset(), sessions_, yaze::editor::ProposalDrawer::SetRom(), yaze::gfx::PerformanceDashboard::SetVisible(), yaze::editor::EditorContext::shortcut_manager, yaze::editor::ToastManager::Show(), show_asm_editor_, show_command_palette_, show_emulator_, show_global_search_, show_imgui_demo_, show_imgui_metrics_, show_load_workspace_preset_, show_memory_editor_, show_palette_editor_, show_performance_dashboard_, show_resource_label_manager, show_save_workspace_preset_, show_test_dashboard_, show_welcome_screen_, yaze::util::FileDialogWrapper::ShowOpenFileDialog(), yaze::util::FileDialogWrapper::ShowOpenFolderDialog(), yaze::util::FileDialogWrapper::ShowSaveFileDialog(), status_, SwitchToSession(), yaze::Rom::title(), toast_manager_, yaze::gfx::PerformanceDashboard::Update(), yaze::editor::PaletteEditor::Update(), yaze::editor::AssemblyEditor::Update(), yaze::editor::MemoryEditorWithDiffChecker::Update(), version_, workspace_manager_, yaze::editor::WorkspaceManager::workspace_presets(), and yaze::editor::WorkspaceManager::workspace_presets_loaded().

Referenced by yaze::core::Controller::OnLoad().

◆ emulator()

auto yaze::editor::EditorManager::emulator ( ) -> emu::Emulator&
inline

Definition at line 123 of file editor_manager.h.

References emulator_.

Referenced by yaze::core::Controller::OnEntry().

◆ quit()

auto yaze::editor::EditorManager::quit ( ) const
inline

Definition at line 124 of file editor_manager.h.

References quit_.

Referenced by yaze::core::Controller::OnLoad().

◆ version()

auto yaze::editor::EditorManager::version ( ) const
inline

Definition at line 125 of file editor_manager.h.

References version_.

Referenced by BuildModernMenu(), and yaze::editor::PopupManager::DrawAboutPopup().

◆ DrawMenuBarExtras()

◆ menu_builder()

MenuBuilder & yaze::editor::EditorManager::menu_builder ( )
inline

Definition at line 127 of file editor_manager.h.

References menu_builder_.

◆ ShowSessionSwitcher()

void yaze::editor::EditorManager::ShowSessionSwitcher ( )

Definition at line 1414 of file editor_manager.cc.

References show_session_switcher_.

Referenced by DrawMenuBarExtras().

◆ ShowEditorSelection()

void yaze::editor::EditorManager::ShowEditorSelection ( )

Definition at line 1416 of file editor_manager.cc.

References show_editor_selection_.

Referenced by DrawMenuBarExtras().

◆ ShowDisplaySettings()

void yaze::editor::EditorManager::ShowDisplaySettings ( )

Definition at line 1418 of file editor_manager.cc.

References popup_manager_.

Referenced by DrawMenuBarExtras().

◆ SetCurrentRom()

absl::Status yaze::editor::EditorManager::SetCurrentRom ( Rom rom)

Definition at line 2428 of file editor_manager.cc.

References current_editor_set_, current_rom_, yaze::test::TestManager::Get(), sessions_, and yaze::test::TestManager::SetCurrentRom().

Referenced by DrawRomSelector().

Here is the call graph for this function:

◆ GetCurrentRom()

auto yaze::editor::EditorManager::GetCurrentRom ( ) -> Rom*
inline

◆ GetCurrentEditorSet()

auto yaze::editor::EditorManager::GetCurrentEditorSet ( ) -> EditorSet*
inline

Definition at line 134 of file editor_manager.h.

References current_editor_set_.

◆ overworld()

auto yaze::editor::EditorManager::overworld ( ) -> yaze::zelda3::Overworld*
inline

Definition at line 135 of file editor_manager.h.

References current_editor_set_, yaze::editor::OverworldEditor::overworld(), and yaze::editor::EditorSet::overworld_editor_.

Referenced by yaze::core::Controller::overworld().

Here is the call graph for this function:

◆ GetCurrentSessionIndex()

size_t yaze::editor::EditorManager::GetCurrentSessionIndex ( ) const

Definition at line 2586 of file editor_manager.cc.

References current_rom_, and sessions_.

Referenced by CloseCurrentSession(), GetCurrentFeatureFlags(), SaveProject(), and SaveRomAs().

◆ GetCurrentFeatureFlags()

core::FeatureFlags::Flags * yaze::editor::EditorManager::GetCurrentFeatureFlags ( )
inline

Definition at line 141 of file editor_manager.h.

References yaze::core::FeatureFlags::get(), GetCurrentSessionIndex(), and sessions_.

Here is the call graph for this function:

◆ SetFontGlobalScale()

void yaze::editor::EditorManager::SetFontGlobalScale ( float  scale)
inline

◆ BuildModernMenu()

void yaze::editor::EditorManager::BuildModernMenu ( )

Definition at line 956 of file editor_manager.cc.

References agent_chat_history_popup_, yaze::Rom::SaveSettings::backup, yaze::editor::MenuBuilder::BeginMenu(), yaze::editor::MenuBuilder::BeginSubMenu(), yaze::editor::MenuBuilder::Clear(), yaze::test::TestManager::ClearResults(), CloseAllFloatingWindows(), CloseCurrentSession(), yaze::editor::Editor::Copy(), CreateNewProject(), CreateNewSession(), current_editor_, current_editor_set_, current_project_, current_rom_, yaze::editor::Editor::Cut(), yaze::editor::MenuBuilder::Draw(), yaze::editor::EditorSet::dungeon_editor_, DuplicateCurrentSession(), yaze::Rom::SaveSettings::filename, yaze::Rom::filename(), yaze::core::YazeProject::filepath, yaze::editor::Editor::Find(), yaze::core::FeatureFlags::get(), yaze::test::TestManager::Get(), yaze::editor::EditorSet::graphics_editor_, HideAllWindows(), ICON_MD_ADD, ICON_MD_ADD_CIRCLE, ICON_MD_ANALYTICS, ICON_MD_BACKUP, ICON_MD_BOOKMARK, ICON_MD_BUILD, ICON_MD_CASTLE, ICON_MD_CHAT, ICON_MD_CHAT_BUBBLE, ICON_MD_CHECK_CIRCLE, ICON_MD_CLEAR_ALL, ICON_MD_CLOSE, ICON_MD_CLOSE_FULLSCREEN, ICON_MD_CLOUD_OFF, ICON_MD_CLOUD_UPLOAD, ICON_MD_CODE, ICON_MD_CONTENT_COPY, ICON_MD_CONTENT_CUT, ICON_MD_CONTENT_PASTE, ICON_MD_CREATE_NEW_FOLDER, ICON_MD_DASHBOARD, ICON_MD_DATA_ARRAY, ICON_MD_EXIT_TO_APP, ICON_MD_FILE_OPEN, ICON_MD_FLAG, ICON_MD_FOLDER, ICON_MD_FOLDER_OPEN, ICON_MD_FULLSCREEN, ICON_MD_FULLSCREEN_EXIT, ICON_MD_GAMEPAD, ICON_MD_HELP, ICON_MD_HOME, ICON_MD_IMAGE, ICON_MD_INFO, ICON_MD_INTEGRATION_INSTRUCTIONS, ICON_MD_LOGIN, ICON_MD_LOGOUT, ICON_MD_MAP, ICON_MD_MEMORY, ICON_MD_MUSIC_NOTE, ICON_MD_PALETTE, ICON_MD_PLAY_ARROW, ICON_MD_PREVIEW, ICON_MD_RATE_REVIEW, ICON_MD_REDO, ICON_MD_REFRESH, ICON_MD_RESET_TV, ICON_MD_SAVE, ICON_MD_SAVE_ALT, ICON_MD_SAVE_AS, ICON_MD_SCIENCE, ICON_MD_SCREENSHOT, ICON_MD_SEARCH, ICON_MD_SETTINGS, ICON_MD_SMART_TOY, ICON_MD_SPEED, ICON_MD_STORAGE, ICON_MD_SWITCH_ACCOUNT, ICON_MD_TAB, ICON_MD_TERMINAL, ICON_MD_TOYS, ICON_MD_TV, ICON_MD_UNDO, ICON_MD_UPGRADE, ICON_MD_VIEW_LIST, ICON_MD_VISIBILITY, ICON_MD_VISIBILITY_OFF, ICON_MD_WIFI, yaze::Rom::is_loaded(), yaze::editor::MenuBuilder::Item(), yaze::editor::AgentEditor::CaptureConfig::kActiveEditor, yaze::editor::kError, yaze::editor::AgentEditor::CaptureConfig::kFullWindow, yaze::editor::kInfo, yaze::test::kIntegration, yaze::editor::AgentEditor::kLocal, yaze::test::kMemory, yaze::editor::AgentEditor::kNetwork, yaze::test::kPerformance, yaze::editor::kSuccess, yaze::test::kUI, yaze::test::kUnit, yaze::editor::kWarning, LoadRom(), LoadWorkspaceLayout(), MaximizeCurrentWindow(), menu_builder_, yaze::editor::EditorSet::message_editor_, yaze::editor::AgentEditor::CaptureConfig::mode, yaze::editor::EditorSet::music_editor_, OpenProject(), yaze::editor::EditorSet::overworld_editor_, yaze::zelda3::OverworldCustomASMHasBeenApplied, yaze::editor::EditorSet::palette_editor_, yaze::editor::Editor::Paste(), popup_manager_, proposal_drawer_, quit_, yaze::editor::Editor::Redo(), ResetWorkspaceLayout(), RestoreAllWindows(), yaze::test::TestManager::RunAllTests(), yaze::test::TestManager::RunTestsByCategory(), yaze::test::TestManager::RunTestSuite(), SaveProject(), SaveProjectAs(), SaveRom(), yaze::Rom::SaveToFile(), SaveWorkspaceLayout(), yaze::editor::EditorSet::screen_editor_, yaze::editor::MenuBuilder::Separator(), sessions_, yaze::editor::Editor::set_active(), yaze::editor::EditorSet::settings_editor_, yaze::editor::ToastManager::Show(), show_asm_editor_, show_card_browser_, show_command_palette_, show_editor_selection_, show_emulator_, show_global_search_, show_imgui_demo_, show_imgui_metrics_, show_layout_presets_, show_memory_editor_, show_performance_dashboard_, show_proposal_drawer_, show_session_manager_, show_session_switcher_, show_test_dashboard_, show_welcome_screen_, ShowAllWindows(), yaze::editor::EditorSet::sprite_editor_, status_, yaze::Rom::title(), toast_manager_, yaze::editor::AgentChatHistoryPopup::Toggle(), yaze::editor::ProposalDrawer::Toggle(), yaze::editor::Editor::Undo(), yaze::core::YazeProject::Validate(), and version().

Referenced by DrawMenuBar().

◆ LoadUserSettings()

void yaze::editor::EditorManager::LoadUserSettings ( )

◆ SaveUserSettings()

void yaze::editor::EditorManager::SaveUserSettings ( )

Definition at line 3317 of file editor_manager.cc.

References LOG_WARN, yaze::editor::UserSettings::Save(), and user_settings_.

Referenced by SetFontGlobalScale().

Here is the call graph for this function:

◆ RefreshWorkspacePresets()

void yaze::editor::EditorManager::RefreshWorkspacePresets ( )
inline

Definition at line 162 of file editor_manager.h.

References yaze::editor::WorkspaceManager::RefreshPresets(), and workspace_manager_.

Referenced by DrawLayoutPresets(), and DrawMenuBar().

Here is the call graph for this function:

◆ SaveWorkspacePreset()

void yaze::editor::EditorManager::SaveWorkspacePreset ( const std::string &  name)
inline

Definition at line 163 of file editor_manager.h.

References yaze::editor::WorkspaceManager::SaveWorkspacePreset(), and workspace_manager_.

Referenced by DrawMenuBar().

Here is the call graph for this function:

◆ LoadWorkspacePreset()

void yaze::editor::EditorManager::LoadWorkspacePreset ( const std::string &  name)
inline

Definition at line 164 of file editor_manager.h.

References yaze::editor::WorkspaceManager::LoadWorkspacePreset(), and workspace_manager_.

Referenced by DrawLayoutPresets(), and DrawMenuBar().

Here is the call graph for this function:

◆ JumpToDungeonRoom()

void yaze::editor::EditorManager::JumpToDungeonRoom ( int  room_id)

◆ JumpToOverworldMap()

void yaze::editor::EditorManager::JumpToOverworldMap ( int  map_id)

◆ SwitchToEditor()

void yaze::editor::EditorManager::SwitchToEditor ( EditorType  editor_type)

◆ CreateNewSession()

◆ DuplicateCurrentSession()

void yaze::editor::EditorManager::DuplicateCurrentSession ( )

◆ CloseCurrentSession()

◆ RemoveSession()

void yaze::editor::EditorManager::RemoveSession ( size_t  index)
Todo:
Implement proper session removal when EditorSet becomes movable

Definition at line 2533 of file editor_manager.cc.

References GetActiveSessionCount(), yaze::editor::kError, yaze::editor::kInfo, yaze::editor::kWarning, LOG_DEBUG, sessions_, yaze::editor::ToastManager::Show(), and toast_manager_.

Referenced by CloseCurrentSession(), DrawSessionManager(), and DrawSessionSwitcher().

Here is the call graph for this function:

◆ SwitchToSession()

◆ GetActiveSessionCount()

size_t yaze::editor::EditorManager::GetActiveSessionCount ( ) const

◆ SaveWorkspaceLayout()

void yaze::editor::EditorManager::SaveWorkspaceLayout ( )

Definition at line 2633 of file editor_manager.cc.

References yaze::editor::kSuccess, yaze::editor::ToastManager::Show(), and toast_manager_.

Referenced by BuildModernMenu(), and Initialize().

Here is the call graph for this function:

◆ LoadWorkspaceLayout()

void yaze::editor::EditorManager::LoadWorkspaceLayout ( )

Definition at line 2638 of file editor_manager.cc.

References yaze::editor::kSuccess, yaze::editor::ToastManager::Show(), and toast_manager_.

Referenced by BuildModernMenu(), and Initialize().

Here is the call graph for this function:

◆ ResetWorkspaceLayout()

void yaze::editor::EditorManager::ResetWorkspaceLayout ( )

Definition at line 2628 of file editor_manager.cc.

References popup_manager_.

Referenced by BuildModernMenu().

◆ ShowAllWindows()

void yaze::editor::EditorManager::ShowAllWindows ( )

◆ HideAllWindows()

void yaze::editor::EditorManager::HideAllWindows ( )

◆ MaximizeCurrentWindow()

void yaze::editor::EditorManager::MaximizeCurrentWindow ( )

Definition at line 2677 of file editor_manager.cc.

References yaze::editor::kInfo, yaze::editor::ToastManager::Show(), and toast_manager_.

Referenced by BuildModernMenu(), and Initialize().

Here is the call graph for this function:

◆ RestoreAllWindows()

void yaze::editor::EditorManager::RestoreAllWindows ( )

Definition at line 2683 of file editor_manager.cc.

References yaze::editor::kInfo, yaze::editor::ToastManager::Show(), and toast_manager_.

Referenced by BuildModernMenu().

Here is the call graph for this function:

◆ CloseAllFloatingWindows()

void yaze::editor::EditorManager::CloseAllFloatingWindows ( )

Definition at line 2688 of file editor_manager.cc.

References yaze::editor::kInfo, yaze::editor::ToastManager::Show(), and toast_manager_.

Referenced by BuildModernMenu().

Here is the call graph for this function:

◆ LoadDeveloperLayout()

◆ LoadDesignerLayout()

◆ LoadModderLayout()

◆ GenerateUniqueEditorTitle()

std::string yaze::editor::EditorManager::GenerateUniqueEditorTitle ( EditorType  type,
size_t  session_index 
) const

Definition at line 2606 of file editor_manager.cc.

References yaze::editor::kEditorNames, and sessions_.

Referenced by Update().

◆ HasDuplicateSession()

bool yaze::editor::EditorManager::HasDuplicateSession ( const std::string &  filepath)

Definition at line 3196 of file editor_manager.cc.

References sessions_.

Referenced by LoadRom().

◆ RenameSession()

void yaze::editor::EditorManager::RenameSession ( size_t  index,
const std::string &  new_name 
)

Definition at line 3205 of file editor_manager.cc.

References yaze::editor::kSuccess, sessions_, yaze::editor::ToastManager::Show(), and toast_manager_.

Referenced by DrawSessionRenameDialog().

Here is the call graph for this function:

◆ DrawWelcomeScreen()

void yaze::editor::EditorManager::DrawWelcomeScreen ( )
private

◆ DrawRomSelector()

absl::Status yaze::editor::EditorManager::DrawRomSelector ( )
private

◆ DrawContextSensitiveCardControl()

◆ DrawSessionSwitcher()

◆ DrawSessionManager()

◆ DrawLayoutPresets()

◆ DrawSessionRenameDialog()

void yaze::editor::EditorManager::DrawSessionRenameDialog ( )
private

Definition at line 3214 of file editor_manager.cc.

References RenameSession(), session_rename_buffer_, session_to_rename_, sessions_, and show_session_rename_dialog_.

Referenced by DrawMenuBar().

Here is the call graph for this function:

◆ LoadRom()

◆ LoadAssets()

◆ SaveRom()

◆ SaveRomAs()

◆ OpenRomOrProject()

◆ CreateNewProject()

absl::Status yaze::editor::EditorManager::CreateNewProject ( const std::string &  template_name = "Basic ROM Hack")
private

Definition at line 2229 of file editor_manager.cc.

References popup_manager_, and yaze::util::FileDialogWrapper::ShowOpenFolderDialog().

Referenced by BuildModernMenu(), Initialize(), and SaveProject().

Here is the call graph for this function:

◆ OpenProject()

absl::Status yaze::editor::EditorManager::OpenProject ( )
private

Definition at line 2240 of file editor_manager.cc.

References yaze::editor::EditorSet::active_editors_, yaze::editor::EditorSet::assembly_editor_, yaze::core::WorkspaceSettings::autosave_enabled, yaze::editor::UserSettings::Preferences::autosave_enabled, yaze::editor::UserSettings::Preferences::autosave_interval, yaze::core::WorkspaceSettings::autosave_interval_secs, yaze::editor::EditorSelectionDialog::ClearRecentEditors(), yaze::core::YazeProject::code_folder, context_, current_editor_set_, current_project_, current_rom_, editor_selection_dialog_, yaze::editor::EditorManager::RomSession::editors, yaze::core::YazeProject::feature_flags, yaze::editor::EditorManager::RomSession::feature_flags, yaze::core::YazeProject::filepath, yaze::core::WorkspaceSettings::font_global_scale, yaze::editor::UserSettings::Preferences::font_global_scale, yaze::test::TestManager::Get(), yaze::core::YazeProject::GetDisplayName(), yaze::core::RecentFilesManager::GetInstance(), yaze::editor::kSuccess, yaze::editor::kWarning, yaze::core::YazeProject::labels_filename, LoadAssets(), yaze::Rom::LoadFromFile(), yaze::core::ResourceLabelManager::LoadLabels(), LOG_DEBUG, yaze::core::YazeProject::Open(), yaze::editor::AssemblyEditor::OpenFolder(), popup_manager_, yaze::editor::UserSettings::prefs(), yaze::Rom::resource_label(), RETURN_IF_ERROR, yaze::editor::EditorManager::RomSession::rom, yaze::core::YazeProject::rom_filename, sessions_, yaze::test::TestManager::SetCurrentRom(), yaze::editor::ToastManager::Show(), show_editor_selection_, show_welcome_screen_, yaze::util::FileDialogWrapper::ShowOpenFileDialog(), yaze::Rom::title(), toast_manager_, user_settings_, yaze::core::YazeProject::Validate(), and yaze::core::YazeProject::workspace_settings.

Referenced by BuildModernMenu(), and OpenRomOrProject().

◆ SaveProject()

◆ SaveProjectAs()

◆ ImportProject()

absl::Status yaze::editor::EditorManager::ImportProject ( const std::string &  project_path)
private

◆ RepairCurrentProject()

absl::Status yaze::editor::EditorManager::RepairCurrentProject ( )
private

◆ ShowProjectHelp()

void yaze::editor::EditorManager::ShowProjectHelp ( )
private

Definition at line 2424 of file editor_manager.cc.

References popup_manager_.

◆ InitializeTestSuites()

void yaze::editor::EditorManager::InitializeTestSuites ( )
private

Definition at line 103 of file editor_manager.cc.

References yaze::test::TestManager::Get(), and yaze::test::RegisterZ3edTestSuites().

Referenced by Initialize().

Here is the call graph for this function:

Member Data Documentation

◆ quit_

bool yaze::editor::EditorManager::quit_ = false
private

Definition at line 227 of file editor_manager.h.

Referenced by BuildModernMenu(), Initialize(), and quit().

◆ new_project_menu

bool yaze::editor::EditorManager::new_project_menu = false
private

Definition at line 228 of file editor_manager.h.

Referenced by DrawMenuBar().

◆ show_emulator_

bool yaze::editor::EditorManager::show_emulator_ = false
private

Definition at line 230 of file editor_manager.h.

Referenced by BuildModernMenu(), DrawMenuBar(), and Initialize().

◆ show_memory_editor_

bool yaze::editor::EditorManager::show_memory_editor_ = false
private

Definition at line 231 of file editor_manager.h.

Referenced by BuildModernMenu(), and DrawMenuBar().

◆ show_asm_editor_

bool yaze::editor::EditorManager::show_asm_editor_ = false
private

Definition at line 232 of file editor_manager.h.

Referenced by BuildModernMenu(), DrawMenuBar(), and Initialize().

◆ show_imgui_metrics_

bool yaze::editor::EditorManager::show_imgui_metrics_ = false
private

◆ show_imgui_demo_

bool yaze::editor::EditorManager::show_imgui_demo_ = false
private

Definition at line 234 of file editor_manager.h.

Referenced by BuildModernMenu(), DrawMenuBar(), HideAllWindows(), and ShowAllWindows().

◆ show_palette_editor_

bool yaze::editor::EditorManager::show_palette_editor_ = false
private

Definition at line 235 of file editor_manager.h.

Referenced by DrawMenuBar().

◆ show_resource_label_manager

bool yaze::editor::EditorManager::show_resource_label_manager = false
private

Definition at line 236 of file editor_manager.h.

Referenced by DrawMenuBar().

◆ show_workspace_layout

bool yaze::editor::EditorManager::show_workspace_layout = false
private

Definition at line 237 of file editor_manager.h.

◆ show_save_workspace_preset_

bool yaze::editor::EditorManager::show_save_workspace_preset_ = false
private

Definition at line 238 of file editor_manager.h.

Referenced by DrawLayoutPresets(), and DrawMenuBar().

◆ show_load_workspace_preset_

bool yaze::editor::EditorManager::show_load_workspace_preset_ = false
private

Definition at line 239 of file editor_manager.h.

Referenced by DrawMenuBar().

◆ show_session_switcher_

bool yaze::editor::EditorManager::show_session_switcher_ = false
private

◆ show_session_manager_

bool yaze::editor::EditorManager::show_session_manager_ = false
private

Definition at line 241 of file editor_manager.h.

Referenced by BuildModernMenu(), DrawSessionManager(), and DrawSessionSwitcher().

◆ show_layout_presets_

bool yaze::editor::EditorManager::show_layout_presets_ = false
private

Definition at line 242 of file editor_manager.h.

Referenced by BuildModernMenu(), and DrawLayoutPresets().

◆ show_homepage_

bool yaze::editor::EditorManager::show_homepage_ = true
private

Definition at line 243 of file editor_manager.h.

◆ show_command_palette_

bool yaze::editor::EditorManager::show_command_palette_ = false
private

Definition at line 244 of file editor_manager.h.

Referenced by BuildModernMenu(), DrawMenuBar(), and Initialize().

◆ show_global_search_

bool yaze::editor::EditorManager::show_global_search_ = false
private

Definition at line 245 of file editor_manager.h.

Referenced by BuildModernMenu(), DrawMenuBar(), and Initialize().

◆ show_session_rename_dialog_

bool yaze::editor::EditorManager::show_session_rename_dialog_ = false
private

◆ show_welcome_screen_

bool yaze::editor::EditorManager::show_welcome_screen_ = false
private

◆ welcome_screen_manually_closed_

bool yaze::editor::EditorManager::welcome_screen_manually_closed_ = false
private

Definition at line 248 of file editor_manager.h.

Referenced by DrawWelcomeScreen(), Initialize(), LoadUserSettings(), and Update().

◆ show_card_browser_

bool yaze::editor::EditorManager::show_card_browser_ = false
private

Definition at line 249 of file editor_manager.h.

Referenced by BuildModernMenu(), Initialize(), and Update().

◆ session_to_rename_

size_t yaze::editor::EditorManager::session_to_rename_ = 0
private

◆ session_rename_buffer_

char yaze::editor::EditorManager::session_rename_buffer_[256] = {}
private

◆ show_test_dashboard_

bool yaze::editor::EditorManager::show_test_dashboard_ = false
private

◆ show_performance_dashboard_

bool yaze::editor::EditorManager::show_performance_dashboard_ = false
private

◆ proposal_drawer_

ProposalDrawer yaze::editor::EditorManager::proposal_drawer_
private

Definition at line 258 of file editor_manager.h.

Referenced by BuildModernMenu(), DrawMenuBar(), Initialize(), and Update().

◆ show_proposal_drawer_

bool yaze::editor::EditorManager::show_proposal_drawer_ = false
private

Definition at line 259 of file editor_manager.h.

Referenced by BuildModernMenu().

◆ agent_chat_history_popup_

AgentChatHistoryPopup yaze::editor::EditorManager::agent_chat_history_popup_
private

Definition at line 266 of file editor_manager.h.

Referenced by BuildModernMenu(), DrawMenuBar(), and Initialize().

◆ show_chat_history_popup_

bool yaze::editor::EditorManager::show_chat_history_popup_ = false
private

Definition at line 267 of file editor_manager.h.

◆ project_file_editor_

ProjectFileEditor yaze::editor::EditorManager::project_file_editor_
private

Definition at line 270 of file editor_manager.h.

Referenced by DrawMenuBar(), and Initialize().

◆ editor_selection_dialog_

EditorSelectionDialog yaze::editor::EditorManager::editor_selection_dialog_
private

Definition at line 273 of file editor_manager.h.

Referenced by Initialize(), LoadRom(), OpenProject(), OpenRomOrProject(), and Update().

◆ show_editor_selection_

bool yaze::editor::EditorManager::show_editor_selection_ = false
private

◆ welcome_screen_

WelcomeScreen yaze::editor::EditorManager::welcome_screen_
private

Definition at line 277 of file editor_manager.h.

Referenced by DrawWelcomeScreen(), and Initialize().

◆ version_

std::string yaze::editor::EditorManager::version_ = ""
private

Definition at line 285 of file editor_manager.h.

Referenced by DrawMenuBar(), DrawMenuBarExtras(), EditorManager(), and version().

◆ status_

absl::Status yaze::editor::EditorManager::status_
private

Definition at line 286 of file editor_manager.h.

Referenced by BuildModernMenu(), DrawMenuBar(), Initialize(), and Update().

◆ emulator_

emu::Emulator yaze::editor::EditorManager::emulator_
private

Definition at line 287 of file editor_manager.h.

Referenced by DrawMenuBar(), emulator(), and LoadAssets().

◆ sessions_

◆ current_rom_

◆ current_editor_set_

◆ current_editor_

Editor* yaze::editor::EditorManager::current_editor_ = nullptr
private

◆ blank_editor_set_

EditorSet yaze::editor::EditorManager::blank_editor_set_ {}
private

Definition at line 317 of file editor_manager.h.

Referenced by Initialize().

◆ renderer_

gfx::IRenderer* yaze::editor::EditorManager::renderer_ = nullptr
private

Definition at line 319 of file editor_manager.h.

Referenced by Initialize(), and LoadAssets().

◆ current_project_

core::YazeProject yaze::editor::EditorManager::current_project_
private

◆ context_

EditorContext yaze::editor::EditorManager::context_
private

◆ popup_manager_

std::unique_ptr<PopupManager> yaze::editor::EditorManager::popup_manager_
private

◆ toast_manager_

◆ menu_builder_

MenuBuilder yaze::editor::EditorManager::menu_builder_
private

Definition at line 325 of file editor_manager.h.

Referenced by BuildModernMenu(), and menu_builder().

◆ user_settings_

◆ workspace_manager_

WorkspaceManager yaze::editor::EditorManager::workspace_manager_ {&toast_manager_}
private

◆ autosave_timer_

float yaze::editor::EditorManager::autosave_timer_ = 0.0f
private

Definition at line 329 of file editor_manager.h.

Referenced by Update().


The documentation for this class was generated from the following files: