The EditorManager controls the main editor window and manages the various editor classes. More...
#include <editor_manager.h>
Public Member Functions | |
EditorManager () | |
void | Initialize (std::string filename="") |
absl::Status | Update () |
auto | emulator () -> emu::Emulator & |
auto | quit () const |
Public Member Functions inherited from yaze::SharedRom | |
SharedRom ()=default | |
virtual | ~SharedRom ()=default |
std::shared_ptr< Rom > | shared_rom () |
auto | rom () |
Private Member Functions | |
void | ManageActiveEditors () |
void | ManageKeyboardShortcuts () |
void | DrawPopups () |
void | DrawHomepage () |
void | DrawMenuBar () |
void | DrawMenuContent () |
void | DrawRomMenu () |
void | LoadRom () |
void | SaveRom () |
void | OpenRomOrProject (const std::string &filename) |
absl::Status | OpenProject () |
Private Attributes | |
bool | quit_ = false |
bool | about_ = false |
bool | rom_info_ = false |
bool | backup_rom_ = false |
bool | save_new_auto_ = true |
bool | show_status_ = false |
bool | rom_assets_loaded_ = false |
std::string | version_ = "" |
absl::Status | status_ |
emu::Emulator | emulator_ |
std::vector< Editor * > | active_editors_ |
std::vector< std::unique_ptr< Rom > > | roms_ |
Rom * | current_rom_ = nullptr |
Project | current_project_ |
EditorContext | editor_context_ |
Editor * | current_editor_ = nullptr |
AssemblyEditor | assembly_editor_ |
DungeonEditor | dungeon_editor_ |
GraphicsEditor | graphics_editor_ |
MusicEditor | music_editor_ |
OverworldEditor | overworld_editor_ {*rom()} |
PaletteEditor | palette_editor_ |
ScreenEditor | screen_editor_ |
SpriteEditor | sprite_editor_ |
SettingsEditor | settings_editor_ |
MessageEditor | message_editor_ |
MemoryEditorWithDiffChecker | memory_editor_ |
Additional Inherited Members | |
Static Public Attributes inherited from yaze::SharedRom | |
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_, current_editor_, dungeon_editor_, graphics_editor_, message_editor_, overworld_editor_, palette_editor_, screen_editor_, settings_editor_, sprite_editor_, and version_.
void yaze::editor::EditorManager::Initialize | ( | std::string | filename = "" | ) |
Definition at line 52 of file editor_manager.cc.
References overworld_editor_, PRINT_IF_ERROR, and yaze::SharedRom::rom().
absl::Status yaze::editor::EditorManager::Update | ( | ) |
Definition at line 59 of file editor_manager.cc.
References ASSIGN_OR_RETURN, current_rom_, DrawHomepage(), DrawMenuBar(), DrawPopups(), yaze::GraphicsSheetManager::GetInstance(), yaze::LoadAllGraphicsData(), ManageActiveEditors(), ManageKeyboardShortcuts(), overworld_editor_, RETURN_IF_ERROR, yaze::SharedRom::rom(), and rom_assets_loaded_.
|
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 81 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 244 of file editor_manager.cc.
References about_, current_editor_, editor_context_, yaze::RecentFilesManager::GetRecentFiles(), yaze::RecentFilesManager::Load(), LoadRom(), OpenRomOrProject(), quit_, SaveRom(), and status_.
Referenced by Update().
|
private |
Definition at line 303 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_, show_status_, status_, and version_.
Referenced by Update().
|
private |
Definition at line 360 of file editor_manager.cc.
References LoadRom(), and settings_editor_.
Referenced by Update().
|
private |
Definition at line 381 of file editor_manager.cc.
References yaze::gui::DrawDisplaySettings(), DrawMenuContent(), ICON_MD_DISPLAY_SETTINGS, and version_.
Referenced by Update().
|
private |
Definition at line 405 of file editor_manager.cc.
References about_, assembly_editor_, backup_rom_, current_editor_, current_project_, yaze::core::FlagsMenu::DrawDungeonFlags(), yaze::core::FlagsMenu::DrawOverworldFlags(), yaze::core::FlagsMenu::DrawResourceFlags(), yaze::core::FlagsMenu::DrawSystemFlags(), emulator_, yaze::RecentFilesManager::GetRecentFiles(), yaze::gui::kDefaultModalSize, yaze::RecentFilesManager::Load(), LoadRom(), memory_editor_, MENU_ITEM, MENU_ITEM2, OpenProject(), OpenRomOrProject(), palette_editor_, quit_, yaze::SharedRom::rom(), rom_assets_loaded_, rom_info_, save_new_auto_, SaveRom(), yaze::core::FileDialogWrapper::ShowOpenFileDialog(), yaze::editor::FileDialogWrapper::ShowOpenFileDialog(), yaze::editor::FileDialogWrapper::ShowOpenFolderDialog(), and status_.
Referenced by DrawMenuBar().
|
private |
Definition at line 708 of file editor_manager.cc.
References current_rom_, and roms_.
|
private |
Definition at line 722 of file editor_manager.cc.
References yaze::RecentFilesManager::AddFile(), current_rom_, yaze::RecentFilesManager::Load(), yaze::SharedRom::rom(), yaze::RecentFilesManager::Save(), and yaze::editor::FileDialogWrapper::ShowOpenFileDialog().
Referenced by DrawHomepage(), DrawMenuContent(), and ManageKeyboardShortcuts().
|
private |
Definition at line 734 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 DrawMenuContent(), and ManageKeyboardShortcuts().
|
private |
Definition at line 750 of file editor_manager.cc.
References current_project_, current_rom_, OpenProject(), yaze::SharedRom::rom(), and status_.
Referenced by DrawMenuContent(), and ManageKeyboardShortcuts().
|
private |
Definition at line 762 of file editor_manager.cc.
References yaze::RecentFilesManager::AddFile(), assembly_editor_, current_project_, current_rom_, yaze::RecentFilesManager::Load(), RETURN_IF_ERROR, yaze::SharedRom::rom(), and yaze::RecentFilesManager::Save().
Referenced by DrawMenuContent(), and OpenRomOrProject().
|
private |
Definition at line 79 of file editor_manager.h.
Referenced by DrawMenuContent(), ManageKeyboardShortcuts(), and quit().
|
private |
Definition at line 80 of file editor_manager.h.
Referenced by DrawMenuContent(), DrawPopups(), and ManageKeyboardShortcuts().
|
private |
Definition at line 81 of file editor_manager.h.
Referenced by DrawMenuContent(), and DrawPopups().
|
private |
Definition at line 82 of file editor_manager.h.
Referenced by DrawMenuContent(), and SaveRom().
|
private |
Definition at line 83 of file editor_manager.h.
Referenced by DrawMenuContent(), and SaveRom().
|
private |
Definition at line 84 of file editor_manager.h.
Referenced by DrawPopups().
|
private |
Definition at line 85 of file editor_manager.h.
Referenced by DrawMenuContent(), and Update().
|
private |
Definition at line 87 of file editor_manager.h.
Referenced by DrawMenuBar(), DrawPopups(), and EditorManager().
|
private |
Definition at line 89 of file editor_manager.h.
Referenced by DrawMenuContent(), DrawPopups(), ManageActiveEditors(), ManageKeyboardShortcuts(), OpenRomOrProject(), and SaveRom().
|
private |
Definition at line 90 of file editor_manager.h.
Referenced by DrawMenuContent(), and emulator().
|
private |
Definition at line 91 of file editor_manager.h.
Referenced by EditorManager(), and ManageActiveEditors().
|
private |
Definition at line 92 of file editor_manager.h.
Referenced by DrawRomMenu().
|
private |
Definition at line 93 of file editor_manager.h.
Referenced by DrawRomMenu(), LoadRom(), OpenProject(), OpenRomOrProject(), and Update().
|
private |
Definition at line 95 of file editor_manager.h.
Referenced by DrawMenuContent(), OpenProject(), and OpenRomOrProject().
|
private |
Definition at line 96 of file editor_manager.h.
Referenced by ManageKeyboardShortcuts().
|
private |
Definition at line 98 of file editor_manager.h.
Referenced by DrawMenuContent(), EditorManager(), ManageActiveEditors(), and ManageKeyboardShortcuts().
|
private |
Definition at line 99 of file editor_manager.h.
Referenced by DrawMenuContent(), ManageActiveEditors(), and OpenProject().
|
private |
Definition at line 100 of file editor_manager.h.
Referenced by EditorManager(), and ManageActiveEditors().
|
private |
Definition at line 101 of file editor_manager.h.
Referenced by EditorManager(), and ManageActiveEditors().
|
private |
Definition at line 102 of file editor_manager.h.
Referenced by ManageActiveEditors().
|
private |
Definition at line 103 of file editor_manager.h.
Referenced by EditorManager(), Initialize(), ManageActiveEditors(), SaveRom(), and Update().
|
private |
Definition at line 104 of file editor_manager.h.
Referenced by DrawMenuContent(), EditorManager(), and ManageActiveEditors().
|
private |
Definition at line 105 of file editor_manager.h.
Referenced by EditorManager(), ManageActiveEditors(), and SaveRom().
|
private |
Definition at line 106 of file editor_manager.h.
Referenced by EditorManager(), and ManageActiveEditors().
|
private |
Definition at line 107 of file editor_manager.h.
Referenced by DrawHomepage(), EditorManager(), and ManageActiveEditors().
|
private |
Definition at line 108 of file editor_manager.h.
Referenced by EditorManager(), and ManageActiveEditors().
|
private |
Definition at line 109 of file editor_manager.h.
Referenced by DrawMenuContent().