yaze 0.2.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>

Inheritance diagram for yaze::editor::EditorManager:

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< Romshared_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_
 
Romcurrent_rom_ = nullptr
 
Project current_project_
 
EditorContext editor_context_
 
Editorcurrent_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< Romshared_rom_ = nullptr
 

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 38 of file editor_manager.h.

Constructor & Destructor Documentation

◆ EditorManager()

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

Member Function Documentation

◆ Initialize()

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().

Here is the call graph for this function:

◆ Update()

◆ emulator()

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

Definition at line 59 of file editor_manager.h.

References emulator_.

◆ quit()

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

Definition at line 60 of file editor_manager.h.

References quit_.

◆ ManageActiveEditors()

◆ ManageKeyboardShortcuts()

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

◆ DrawPopups()

void yaze::editor::EditorManager::DrawPopups ( )
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().

Here is the call graph for this function:

◆ DrawHomepage()

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

Definition at line 360 of file editor_manager.cc.

References LoadRom(), and settings_editor_.

Referenced by Update().

Here is the call graph for this function:

◆ DrawMenuBar()

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

Definition at line 381 of file editor_manager.cc.

References yaze::gui::DrawDisplaySettings(), DrawMenuContent(), ICON_MD_DISPLAY_SETTINGS, and version_.

Referenced by Update().

Here is the call graph for this function:

◆ DrawMenuContent()

◆ DrawRomMenu()

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

Definition at line 708 of file editor_manager.cc.

References current_rom_, and roms_.

◆ LoadRom()

◆ SaveRom()

◆ OpenRomOrProject()

void yaze::editor::EditorManager::OpenRomOrProject ( const std::string & filename)
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().

Here is the call graph for this function:

◆ OpenProject()

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

Member Data Documentation

◆ quit_

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

Definition at line 79 of file editor_manager.h.

Referenced by DrawMenuContent(), ManageKeyboardShortcuts(), and quit().

◆ about_

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

Definition at line 80 of file editor_manager.h.

Referenced by DrawMenuContent(), DrawPopups(), and ManageKeyboardShortcuts().

◆ rom_info_

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

Definition at line 81 of file editor_manager.h.

Referenced by DrawMenuContent(), and DrawPopups().

◆ backup_rom_

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

Definition at line 82 of file editor_manager.h.

Referenced by DrawMenuContent(), and SaveRom().

◆ save_new_auto_

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

Definition at line 83 of file editor_manager.h.

Referenced by DrawMenuContent(), and SaveRom().

◆ show_status_

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

Definition at line 84 of file editor_manager.h.

Referenced by DrawPopups().

◆ rom_assets_loaded_

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

Definition at line 85 of file editor_manager.h.

Referenced by DrawMenuContent(), and Update().

◆ version_

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

Definition at line 87 of file editor_manager.h.

Referenced by DrawMenuBar(), DrawPopups(), and EditorManager().

◆ status_

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

◆ emulator_

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

Definition at line 90 of file editor_manager.h.

Referenced by DrawMenuContent(), and emulator().

◆ active_editors_

std::vector<Editor *> yaze::editor::EditorManager::active_editors_
private

Definition at line 91 of file editor_manager.h.

Referenced by EditorManager(), and ManageActiveEditors().

◆ roms_

std::vector<std::unique_ptr<Rom> > yaze::editor::EditorManager::roms_
private

Definition at line 92 of file editor_manager.h.

Referenced by DrawRomMenu().

◆ current_rom_

Rom* yaze::editor::EditorManager::current_rom_ = nullptr
private

Definition at line 93 of file editor_manager.h.

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

◆ current_project_

Project yaze::editor::EditorManager::current_project_
private

Definition at line 95 of file editor_manager.h.

Referenced by DrawMenuContent(), OpenProject(), and OpenRomOrProject().

◆ editor_context_

EditorContext yaze::editor::EditorManager::editor_context_
private

Definition at line 96 of file editor_manager.h.

Referenced by ManageKeyboardShortcuts().

◆ current_editor_

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

◆ assembly_editor_

AssemblyEditor yaze::editor::EditorManager::assembly_editor_
private

Definition at line 99 of file editor_manager.h.

Referenced by DrawMenuContent(), ManageActiveEditors(), and OpenProject().

◆ dungeon_editor_

DungeonEditor yaze::editor::EditorManager::dungeon_editor_
private

Definition at line 100 of file editor_manager.h.

Referenced by EditorManager(), and ManageActiveEditors().

◆ graphics_editor_

GraphicsEditor yaze::editor::EditorManager::graphics_editor_
private

Definition at line 101 of file editor_manager.h.

Referenced by EditorManager(), and ManageActiveEditors().

◆ music_editor_

MusicEditor yaze::editor::EditorManager::music_editor_
private

Definition at line 102 of file editor_manager.h.

Referenced by ManageActiveEditors().

◆ overworld_editor_

OverworldEditor yaze::editor::EditorManager::overworld_editor_ {*rom()}
private

Definition at line 103 of file editor_manager.h.

Referenced by EditorManager(), Initialize(), ManageActiveEditors(), SaveRom(), and Update().

◆ palette_editor_

PaletteEditor yaze::editor::EditorManager::palette_editor_
private

Definition at line 104 of file editor_manager.h.

Referenced by DrawMenuContent(), EditorManager(), and ManageActiveEditors().

◆ screen_editor_

ScreenEditor yaze::editor::EditorManager::screen_editor_
private

Definition at line 105 of file editor_manager.h.

Referenced by EditorManager(), ManageActiveEditors(), and SaveRom().

◆ sprite_editor_

SpriteEditor yaze::editor::EditorManager::sprite_editor_
private

Definition at line 106 of file editor_manager.h.

Referenced by EditorManager(), and ManageActiveEditors().

◆ settings_editor_

SettingsEditor yaze::editor::EditorManager::settings_editor_
private

Definition at line 107 of file editor_manager.h.

Referenced by DrawHomepage(), EditorManager(), and ManageActiveEditors().

◆ message_editor_

MessageEditor yaze::editor::EditorManager::message_editor_
private

Definition at line 108 of file editor_manager.h.

Referenced by EditorManager(), and ManageActiveEditors().

◆ memory_editor_

MemoryEditorWithDiffChecker yaze::editor::EditorManager::memory_editor_
private

Definition at line 109 of file editor_manager.h.

Referenced by DrawMenuContent().


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