yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::app::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::app::editor::EditorManager:
Collaboration diagram for yaze::app::editor::EditorManager:

Public Member Functions

 EditorManager ()
 
void SetupScreen (std::string filename="")
 
absl::Status Update ()
 
auto emulator () -> emu::Emulator &
 
auto quit ()
 
- Public Member Functions inherited from yaze::app::SharedRom
 SharedRom ()=default
 
virtual ~SharedRom ()=default
 
std::shared_ptr< Romshared_rom ()
 
auto rom ()
 
- Public Member Functions inherited from yaze::app::core::ExperimentFlags
 ExperimentFlags ()=default
 
virtual ~ExperimentFlags ()=default
 
auto flags () const
 
Flagsmutable_flags ()
 
std::string Serialize () const
 

Private Member Functions

void ManageActiveEditors ()
 
void ManageKeyboardShortcuts ()
 
void DrawStatusPopup ()
 
void DrawAboutPopup ()
 
void DrawInfoPopup ()
 
void DrawYazeMenu ()
 
void DrawYazeMenuBar ()
 
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
 
absl::Status status_
 
ImVector< int > active_tabs_
 
std::vector< Editor * > active_editors_
 
core::MessageDispatcher dispatcher_
 
emu::Emulator emulator_
 
Project current_project_
 
ConstantManager constant_manager_
 
ExtensionManager extension_manager_
 
yaze_editor_context editor_context_
 
Editorcurrent_editor_ = nullptr
 
AssemblyEditor assembly_editor_
 
DungeonEditor dungeon_editor_
 
GraphicsEditor graphics_editor_
 
MusicEditor music_editor_
 
OverworldEditor overworld_editor_
 
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::app::SharedRom
static std::shared_ptr< Romshared_rom_ = nullptr
 

Detailed Description

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

This class inherits from SharedRom, GfxContext, and ExperimentFlags, and provides functionality for setting up the screen, updating the editor, and shutting down the editor. It also includes methods for drawing various menus and popups, saving the Rom, and managing editor-specific flags.

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.

Note
This class assumes the presence of an SDL_Renderer object for rendering graphics.

Definition at line 50 of file editor_manager.h.

Constructor & Destructor Documentation

◆ EditorManager()

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

Member Function Documentation

◆ SetupScreen()

void yaze::app::editor::EditorManager::SetupScreen ( std::string filename = "")

◆ Update()

◆ emulator()

◆ quit()

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

Definition at line 66 of file editor_manager.h.

References quit_.

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

◆ ManageActiveEditors()

◆ ManageKeyboardShortcuts()

◆ DrawStatusPopup()

void yaze::app::editor::EditorManager::DrawStatusPopup ( )
private

◆ DrawAboutPopup()

void yaze::app::editor::EditorManager::DrawAboutPopup ( )
private

Definition at line 328 of file editor_manager.cc.

References about_, yaze::app::gui::kDefaultModalSize, and yaze::app::core::kYazeVersion.

Referenced by Update().

◆ DrawInfoPopup()

void yaze::app::editor::EditorManager::DrawInfoPopup ( )
private

Definition at line 345 of file editor_manager.cc.

References yaze::app::gui::kDefaultModalSize, yaze::app::SharedRom::rom(), rom_info_, and yaze::app::core::UppercaseHexLongLong().

Referenced by Update().

Here is the call graph for this function:

◆ DrawYazeMenu()

void yaze::app::editor::EditorManager::DrawYazeMenu ( )
private

Definition at line 361 of file editor_manager.cc.

References yaze::app::gui::DrawDisplaySettings(), DrawYazeMenuBar(), ICON_MD_DISPLAY_SETTINGS, and yaze::app::core::kYazeVersion.

Referenced by Update().

Here is the call graph for this function:

◆ DrawYazeMenuBar()

◆ LoadRom()

◆ SaveRom()

◆ OpenRomOrProject()

void yaze::app::editor::EditorManager::OpenRomOrProject ( const std::string & filename)
private

Definition at line 699 of file editor_manager.cc.

References current_project_, yaze::app::Project::Open(), OpenProject(), yaze::app::SharedRom::rom(), and status_.

Referenced by DrawYazeMenuBar(), and ManageKeyboardShortcuts().

Here is the call graph for this function:

◆ OpenProject()

Member Data Documentation

◆ quit_

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

Definition at line 85 of file editor_manager.h.

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

◆ about_

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

Definition at line 86 of file editor_manager.h.

Referenced by DrawAboutPopup(), DrawYazeMenuBar(), and ManageKeyboardShortcuts().

◆ rom_info_

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

Definition at line 87 of file editor_manager.h.

Referenced by DrawInfoPopup(), and DrawYazeMenuBar().

◆ backup_rom_

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

Definition at line 88 of file editor_manager.h.

Referenced by DrawYazeMenuBar(), and SaveRom().

◆ save_new_auto_

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

Definition at line 89 of file editor_manager.h.

Referenced by DrawYazeMenuBar(), and SaveRom().

◆ show_status_

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

Definition at line 90 of file editor_manager.h.

Referenced by DrawStatusPopup().

◆ rom_assets_loaded_

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

Definition at line 91 of file editor_manager.h.

Referenced by DrawYazeMenuBar(), and Update().

◆ status_

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

◆ active_tabs_

ImVector<int> yaze::app::editor::EditorManager::active_tabs_
private

Definition at line 95 of file editor_manager.h.

◆ active_editors_

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

Definition at line 96 of file editor_manager.h.

Referenced by EditorManager(), and ManageActiveEditors().

◆ dispatcher_

core::MessageDispatcher yaze::app::editor::EditorManager::dispatcher_
private

Definition at line 98 of file editor_manager.h.

◆ emulator_

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

Definition at line 99 of file editor_manager.h.

Referenced by DrawYazeMenuBar(), and emulator().

◆ current_project_

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

Definition at line 101 of file editor_manager.h.

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

◆ constant_manager_

ConstantManager yaze::app::editor::EditorManager::constant_manager_
private

Definition at line 102 of file editor_manager.h.

◆ extension_manager_

ExtensionManager yaze::app::editor::EditorManager::extension_manager_
private

Definition at line 103 of file editor_manager.h.

◆ editor_context_

yaze_editor_context yaze::app::editor::EditorManager::editor_context_
private

Definition at line 104 of file editor_manager.h.

◆ current_editor_

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

◆ assembly_editor_

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

Definition at line 107 of file editor_manager.h.

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

◆ dungeon_editor_

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

Definition at line 108 of file editor_manager.h.

Referenced by EditorManager(), and ManageActiveEditors().

◆ graphics_editor_

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

Definition at line 109 of file editor_manager.h.

Referenced by EditorManager(), and ManageActiveEditors().

◆ music_editor_

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

Definition at line 110 of file editor_manager.h.

Referenced by ManageActiveEditors().

◆ overworld_editor_

OverworldEditor yaze::app::editor::EditorManager::overworld_editor_
private

Definition at line 111 of file editor_manager.h.

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

◆ palette_editor_

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

Definition at line 112 of file editor_manager.h.

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

◆ screen_editor_

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

Definition at line 113 of file editor_manager.h.

Referenced by ManageActiveEditors(), and SaveRom().

◆ sprite_editor_

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

Definition at line 114 of file editor_manager.h.

Referenced by EditorManager(), and ManageActiveEditors().

◆ settings_editor_

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

Definition at line 115 of file editor_manager.h.

Referenced by ManageActiveEditors().

◆ message_editor_

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

Definition at line 116 of file editor_manager.h.

Referenced by EditorManager(), and ManageActiveEditors().

◆ memory_editor_

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

Definition at line 117 of file editor_manager.h.

Referenced by DrawYazeMenuBar().


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