The EditorManager controls the main editor window and manages the various editor classes. More...
#include <editor_manager.h>
Public Member Functions | |
EditorManager () | |
void | Initialize (const std::string &filename="") |
absl::Status | Update () |
void | DrawMenuBar () |
auto | emulator () -> emu::Emulator & |
auto | quit () const |
![]() | |
SharedRom ()=default | |
virtual | ~SharedRom ()=default |
std::shared_ptr< Rom > | shared_rom () |
auto | rom () |
Private Member Functions | |
void | ManageActiveEditors () |
void | DrawHomepage () |
void | DrawPopups () |
void | LoadRom () |
void | LoadAssets () |
void | SaveRom () |
void | OpenRomOrProject (const std::string &filename) |
absl::Status | OpenProject () |
void | SaveProject () |
Additional Inherited Members | |
![]() | |
static std::shared_ptr< Rom > | shared_rom_ = nullptr |
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 38 of file editor_manager.h.
|
inline |
Definition at line 40 of file editor_manager.h.
References active_editors_, assembly_editor_, context_, current_editor_, dungeon_editor_, graphics_editor_, message_editor_, music_editor_, overworld_editor_, palette_editor_, screen_editor_, settings_editor_, sprite_editor_, and version_.
void yaze::editor::EditorManager::Initialize | ( | const std::string & | filename = "" | ) |
Definition at line 56 of file editor_manager.cc.
References about_, backup_rom_, context_, current_editor_, current_project_, dungeon_editor_, yaze::RecentFilesManager::GetRecentFiles(), graphics_editor_, ICON_MD_BALLOT, ICON_MD_CASTLE, ICON_MD_CLOSE, ICON_MD_CODE, ICON_MD_CONTENT_COPY, ICON_MD_CONTENT_CUT, ICON_MD_CONTENT_PASTE, ICON_MD_EXIT_TO_APP, ICON_MD_FILE_DOWNLOAD, ICON_MD_FILE_OPEN, ICON_MD_GAMEPAD, ICON_MD_HELP, ICON_MD_LAYERS, ICON_MD_MEMORY, ICON_MD_MESSAGE, ICON_MD_MISCELLANEOUS_SERVICES, ICON_MD_MUSIC_NOTE, ICON_MD_PALETTE, ICON_MD_PHOTO, ICON_MD_REDO, ICON_MD_SAVE_AS, ICON_MD_SCREENSHOT, ICON_MD_SEARCH, ICON_MD_SETTINGS, ICON_MD_SIM_CARD, ICON_MD_SMART_TOY, ICON_MD_SPACE_DASHBOARD, ICON_MD_UNDO, yaze::gui::kSeparator, yaze::RecentFilesManager::Load(), LoadRom(), message_editor_, music_editor_, new_project_menu, open_manage_project, open_rom_help, open_supported_features, OpenProject(), OpenRomOrProject(), overworld_editor_, palette_editor_, PRINT_IF_ERROR, quit_, yaze::SharedRom::rom(), rom_info_, save_as_menu_, save_new_auto_, SaveProject(), SaveRom(), screen_editor_, settings_editor_, show_asm_editor_, show_emulator_, show_imgui_demo_, show_imgui_metrics_, show_memory_editor_, show_workspace_layout, sprite_editor_, and status_.
absl::Status yaze::editor::EditorManager::Update | ( | ) |
Definition at line 256 of file editor_manager.cc.
References active_editors_, context_, current_editor_, current_rom_, DrawHomepage(), DrawPopups(), yaze::editor::ExecuteShortcuts(), ManageActiveEditors(), and status_.
void yaze::editor::EditorManager::DrawMenuBar | ( | ) |
Definition at line 517 of file editor_manager.cc.
References assembly_editor_, current_project_, yaze::gui::DrawDisplaySettings(), yaze::gui::DrawMenu(), emulator_, ICON_MD_DISPLAY_SETTINGS, yaze::gui::kDefaultModalSize, memory_editor_, new_project_menu, open_manage_project, open_rom_help, open_supported_features, palette_editor_, yaze::SharedRom::rom(), SaveRom(), show_asm_editor_, show_emulator_, show_imgui_demo_, show_imgui_metrics_, show_memory_editor_, show_palette_editor_, show_resource_label_manager, yaze::editor::FileDialogWrapper::ShowOpenFileDialog(), yaze::editor::FileDialogWrapper::ShowOpenFolderDialog(), status_, and version_.
|
inline |
Definition at line 59 of file editor_manager.h.
References emulator_.
|
inline |
Definition at line 60 of file editor_manager.h.
References quit_.
|
private |
Definition at line 282 of file editor_manager.cc.
References active_editors_, assembly_editor_, current_editor_, dungeon_editor_, graphics_editor_, ICON_MD_ADD, yaze::editor::kAssembly, yaze::editor::kDungeon, yaze::editor::kGraphics, yaze::editor::kMessage, yaze::editor::kMusic, yaze::editor::kOverworld, yaze::editor::kPalette, yaze::editor::kScreen, yaze::editor::kSettings, yaze::editor::kSprite, message_editor_, music_editor_, overworld_editor_, palette_editor_, screen_editor_, settings_editor_, sprite_editor_, and status_.
Referenced by Update().
|
private |
Definition at line 445 of file editor_manager.cc.
References yaze::gui::ClickableText(), and LoadRom().
Referenced by Update().
|
private |
Definition at line 459 of file editor_manager.cc.
References about_, yaze::util::HexLongLong(), ICON_MD_CONTENT_COPY, ICON_MD_ERROR, yaze::gui::kDefaultModalSize, yaze::SharedRom::rom(), rom_info_, status_, and version_.
Referenced by Update().
|
private |
Definition at line 692 of file editor_manager.cc.
References yaze::RecentFilesManager::AddFile(), current_rom_, yaze::RecentFilesManager::Load(), LoadAssets(), yaze::SharedRom::rom(), yaze::RecentFilesManager::Save(), and yaze::editor::FileDialogWrapper::ShowOpenFileDialog().
Referenced by DrawHomepage(), and Initialize().
|
private |
Definition at line 705 of file editor_manager.cc.
References ASSIGN_OR_RETURN, yaze::GraphicsSheetManager::GetInstance(), yaze::LoadAllGraphicsData(), overworld_editor_, RETURN_IF_ERROR, yaze::SharedRom::rom(), and status_.
Referenced by LoadRom(), OpenProject(), and OpenRomOrProject().
|
private |
Definition at line 718 of file editor_manager.cc.
References backup_rom_, yaze::core::FeatureFlags::get(), yaze::GraphicsSheetManager::GetInstance(), overworld_editor_, PRINT_IF_ERROR, RETURN_VOID_IF_ERROR, yaze::SharedRom::rom(), save_new_auto_, yaze::SaveAllGraphicsData(), screen_editor_, and status_.
Referenced by DrawMenuBar(), and Initialize().
|
private |
Definition at line 734 of file editor_manager.cc.
References current_project_, current_rom_, LoadAssets(), OpenProject(), yaze::SharedRom::rom(), and status_.
Referenced by Initialize().
|
private |
Definition at line 747 of file editor_manager.cc.
References yaze::RecentFilesManager::AddFile(), assembly_editor_, current_project_, current_rom_, yaze::RecentFilesManager::Load(), LoadAssets(), RETURN_IF_ERROR, yaze::SharedRom::rom(), and yaze::RecentFilesManager::Save().
Referenced by Initialize(), and OpenRomOrProject().
|
private |
Definition at line 767 of file editor_manager.cc.
References current_project_, new_project_menu, and status_.
Referenced by Initialize().
|
private |
Definition at line 74 of file editor_manager.h.
Referenced by Initialize(), and quit().
|
private |
Definition at line 75 of file editor_manager.h.
Referenced by DrawPopups(), and Initialize().
|
private |
Definition at line 76 of file editor_manager.h.
Referenced by DrawPopups(), and Initialize().
|
private |
Definition at line 77 of file editor_manager.h.
Referenced by Initialize(), and SaveRom().
|
private |
Definition at line 78 of file editor_manager.h.
Referenced by Initialize().
|
private |
Definition at line 79 of file editor_manager.h.
Referenced by Initialize(), and SaveRom().
|
private |
Definition at line 80 of file editor_manager.h.
Referenced by DrawMenuBar(), and Initialize().
|
private |
Definition at line 81 of file editor_manager.h.
Referenced by DrawMenuBar(), and Initialize().
|
private |
Definition at line 82 of file editor_manager.h.
Referenced by DrawMenuBar(), and Initialize().
|
private |
Definition at line 83 of file editor_manager.h.
Referenced by DrawMenuBar(), Initialize(), and SaveProject().
|
private |
Definition at line 85 of file editor_manager.h.
Referenced by DrawMenuBar(), and Initialize().
|
private |
Definition at line 86 of file editor_manager.h.
Referenced by DrawMenuBar(), and Initialize().
|
private |
Definition at line 87 of file editor_manager.h.
Referenced by DrawMenuBar(), and Initialize().
|
private |
Definition at line 88 of file editor_manager.h.
Referenced by DrawMenuBar(), and Initialize().
|
private |
Definition at line 89 of file editor_manager.h.
Referenced by DrawMenuBar(), and Initialize().
|
private |
Definition at line 90 of file editor_manager.h.
Referenced by DrawMenuBar().
|
private |
Definition at line 91 of file editor_manager.h.
Referenced by DrawMenuBar().
|
private |
Definition at line 92 of file editor_manager.h.
Referenced by Initialize().
|
private |
Definition at line 94 of file editor_manager.h.
Referenced by DrawMenuBar(), DrawPopups(), and EditorManager().
|
private |
Definition at line 96 of file editor_manager.h.
Referenced by DrawMenuBar(), DrawPopups(), Initialize(), LoadAssets(), ManageActiveEditors(), OpenRomOrProject(), SaveProject(), SaveRom(), and Update().
|
private |
Definition at line 97 of file editor_manager.h.
Referenced by DrawMenuBar(), and emulator().
|
private |
Definition at line 98 of file editor_manager.h.
Referenced by EditorManager(), ManageActiveEditors(), and Update().
|
private |
Definition at line 99 of file editor_manager.h.
|
private |
Definition at line 100 of file editor_manager.h.
Referenced by LoadRom(), OpenProject(), OpenRomOrProject(), and Update().
|
private |
Definition at line 102 of file editor_manager.h.
Referenced by DrawMenuBar(), Initialize(), OpenProject(), OpenRomOrProject(), and SaveProject().
|
private |
Definition at line 103 of file editor_manager.h.
Referenced by EditorManager(), Initialize(), and Update().
|
private |
Definition at line 105 of file editor_manager.h.
Referenced by EditorManager(), Initialize(), ManageActiveEditors(), and Update().
|
private |
Definition at line 106 of file editor_manager.h.
Referenced by DrawMenuBar(), EditorManager(), ManageActiveEditors(), and OpenProject().
|
private |
Definition at line 107 of file editor_manager.h.
Referenced by EditorManager(), Initialize(), and ManageActiveEditors().
|
private |
Definition at line 108 of file editor_manager.h.
Referenced by EditorManager(), Initialize(), and ManageActiveEditors().
|
private |
Definition at line 109 of file editor_manager.h.
Referenced by EditorManager(), Initialize(), and ManageActiveEditors().
|
private |
Definition at line 110 of file editor_manager.h.
Referenced by EditorManager(), Initialize(), LoadAssets(), ManageActiveEditors(), and SaveRom().
|
private |
Definition at line 111 of file editor_manager.h.
Referenced by DrawMenuBar(), EditorManager(), Initialize(), and ManageActiveEditors().
|
private |
Definition at line 112 of file editor_manager.h.
Referenced by EditorManager(), Initialize(), ManageActiveEditors(), and SaveRom().
|
private |
Definition at line 113 of file editor_manager.h.
Referenced by EditorManager(), Initialize(), and ManageActiveEditors().
|
private |
Definition at line 114 of file editor_manager.h.
Referenced by EditorManager(), Initialize(), and ManageActiveEditors().
|
private |
Definition at line 115 of file editor_manager.h.
Referenced by EditorManager(), Initialize(), and ManageActiveEditors().
|
private |
Definition at line 116 of file editor_manager.h.
Referenced by DrawMenuBar().