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 ()
 
absl::Status DrawDynamicLayout ()
 
void ManageKeyboardShortcuts ()
 
void InitializeCommands ()
 
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
 
bool dynamic_layout_ = false
 
absl::Status status_
 
emu::Emulator emulator_
 
std::vector< Editor * > active_editors_
 
std::vector< EditorLayoutParamsactive_layouts_
 
EditorLayoutParams root_layout_
 
Project current_project_
 
EditorContext 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.

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::app::editor::EditorManager::EditorManager ( )
inline

Member Function Documentation

◆ SetupScreen()

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

◆ Update()

◆ emulator()

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

Definition at line 54 of file editor_manager.h.

References emulator_.

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

◆ quit()

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

Definition at line 55 of file editor_manager.h.

References quit_.

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

◆ ManageActiveEditors()

◆ DrawDynamicLayout()

absl::Status yaze::app::editor::EditorManager::DrawDynamicLayout ( )
private

Definition at line 247 of file editor_manager.cc.

References yaze::app::editor::DrawEditor(), and root_layout_.

Referenced by Update().

Here is the call graph for this function:

◆ ManageKeyboardShortcuts()

◆ InitializeCommands()

◆ DrawStatusPopup()

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

◆ DrawAboutPopup()

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

Definition at line 415 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 432 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 448 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()

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

◆ SaveRom()

◆ OpenRomOrProject()

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

Definition at line 786 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 77 of file editor_manager.h.

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

◆ about_

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

Definition at line 78 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 79 of file editor_manager.h.

Referenced by DrawInfoPopup(), and DrawYazeMenuBar().

◆ backup_rom_

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

Definition at line 80 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 81 of file editor_manager.h.

Referenced by DrawYazeMenuBar(), and SaveRom().

◆ show_status_

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

Definition at line 82 of file editor_manager.h.

Referenced by DrawStatusPopup().

◆ rom_assets_loaded_

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

Definition at line 83 of file editor_manager.h.

Referenced by DrawYazeMenuBar(), and Update().

◆ dynamic_layout_

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

Definition at line 84 of file editor_manager.h.

Referenced by DrawYazeMenuBar(), and Update().

◆ status_

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

◆ emulator_

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

Definition at line 88 of file editor_manager.h.

Referenced by DrawYazeMenuBar(), and emulator().

◆ active_editors_

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

Definition at line 90 of file editor_manager.h.

Referenced by EditorManager(), and ManageActiveEditors().

◆ active_layouts_

std::vector<EditorLayoutParams> yaze::app::editor::EditorManager::active_layouts_
private

Definition at line 91 of file editor_manager.h.

◆ root_layout_

EditorLayoutParams yaze::app::editor::EditorManager::root_layout_
private

Definition at line 93 of file editor_manager.h.

Referenced by DrawDynamicLayout(), and InitializeCommands().

◆ current_project_

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

Definition at line 95 of file editor_manager.h.

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

◆ editor_context_

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

Definition at line 96 of file editor_manager.h.

Referenced by InitializeCommands(), and ManageKeyboardShortcuts().

◆ current_editor_

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

◆ assembly_editor_

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

◆ dungeon_editor_

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

Definition at line 100 of file editor_manager.h.

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

◆ graphics_editor_

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

Definition at line 101 of file editor_manager.h.

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

◆ music_editor_

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

Definition at line 102 of file editor_manager.h.

Referenced by InitializeCommands(), and ManageActiveEditors().

◆ overworld_editor_

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

◆ palette_editor_

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

◆ screen_editor_

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

Definition at line 105 of file editor_manager.h.

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

◆ sprite_editor_

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

Definition at line 106 of file editor_manager.h.

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

◆ settings_editor_

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

Definition at line 107 of file editor_manager.h.

Referenced by InitializeCommands(), and ManageActiveEditors().

◆ message_editor_

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

Definition at line 108 of file editor_manager.h.

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

◆ memory_editor_

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

Definition at line 109 of file editor_manager.h.

Referenced by DrawYazeMenuBar().


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