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 (const std::string &filename="")
 
absl::Status Update ()
 
void DrawMenuBar ()
 
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 DrawHomepage ()
 
void DrawPopups ()
 
void LoadRom ()
 
void LoadAssets ()
 
void SaveRom ()
 
void OpenRomOrProject (const std::string &filename)
 
absl::Status OpenProject ()
 
void SaveProject ()
 

Private Attributes

bool quit_ = false
 
bool about_ = false
 
bool rom_info_ = false
 
bool backup_rom_ = false
 
bool save_as_menu_ = false
 
bool save_new_auto_ = true
 
bool open_rom_help = false
 
bool open_manage_project = false
 
bool open_supported_features = false
 
bool new_project_menu = false
 
bool show_emulator_ = false
 
bool show_memory_editor_ = false
 
bool show_asm_editor_ = false
 
bool show_imgui_metrics_ = false
 
bool show_imgui_demo_ = false
 
bool show_palette_editor_ = false
 
bool show_resource_label_manager = false
 
bool show_workspace_layout = 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 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()

Member Function Documentation

◆ Initialize()

◆ Update()

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_.

Here is the call graph for this function:

◆ DrawMenuBar()

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

◆ DrawHomepage()

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

Definition at line 445 of file editor_manager.cc.

References yaze::gui::ClickableText(), and LoadRom().

Referenced by Update().

Here is the call graph for this function:

◆ DrawPopups()

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

Here is the call graph for this function:

◆ LoadRom()

◆ LoadAssets()

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

◆ SaveRom()

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

◆ OpenRomOrProject()

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

Here is the call graph for this function:

◆ OpenProject()

◆ SaveProject()

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

Definition at line 767 of file editor_manager.cc.

References current_project_, new_project_menu, and status_.

Referenced by Initialize().

Member Data Documentation

◆ quit_

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

Definition at line 74 of file editor_manager.h.

Referenced by Initialize(), and quit().

◆ about_

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

Definition at line 75 of file editor_manager.h.

Referenced by DrawPopups(), and Initialize().

◆ rom_info_

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

Definition at line 76 of file editor_manager.h.

Referenced by DrawPopups(), and Initialize().

◆ backup_rom_

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

Definition at line 77 of file editor_manager.h.

Referenced by Initialize(), and SaveRom().

◆ save_as_menu_

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

Definition at line 78 of file editor_manager.h.

Referenced by Initialize().

◆ save_new_auto_

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

Definition at line 79 of file editor_manager.h.

Referenced by Initialize(), and SaveRom().

◆ open_rom_help

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

Definition at line 80 of file editor_manager.h.

Referenced by DrawMenuBar(), and Initialize().

◆ open_manage_project

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

Definition at line 81 of file editor_manager.h.

Referenced by DrawMenuBar(), and Initialize().

◆ open_supported_features

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

Definition at line 82 of file editor_manager.h.

Referenced by DrawMenuBar(), and Initialize().

◆ new_project_menu

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

Definition at line 83 of file editor_manager.h.

Referenced by DrawMenuBar(), Initialize(), and SaveProject().

◆ show_emulator_

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

Definition at line 85 of file editor_manager.h.

Referenced by DrawMenuBar(), and Initialize().

◆ show_memory_editor_

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

Definition at line 86 of file editor_manager.h.

Referenced by DrawMenuBar(), and Initialize().

◆ show_asm_editor_

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

Definition at line 87 of file editor_manager.h.

Referenced by DrawMenuBar(), and Initialize().

◆ show_imgui_metrics_

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

Definition at line 88 of file editor_manager.h.

Referenced by DrawMenuBar(), and Initialize().

◆ show_imgui_demo_

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

Definition at line 89 of file editor_manager.h.

Referenced by DrawMenuBar(), and Initialize().

◆ show_palette_editor_

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

Definition at line 90 of file editor_manager.h.

Referenced by DrawMenuBar().

◆ show_resource_label_manager

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

Definition at line 91 of file editor_manager.h.

Referenced by DrawMenuBar().

◆ show_workspace_layout

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

Definition at line 92 of file editor_manager.h.

Referenced by Initialize().

◆ version_

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

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

Referenced by DrawMenuBar(), and emulator().

◆ active_editors_

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

Definition at line 98 of file editor_manager.h.

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

◆ roms_

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

Definition at line 99 of file editor_manager.h.

◆ current_rom_

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

Definition at line 100 of file editor_manager.h.

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

◆ current_project_

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

Definition at line 102 of file editor_manager.h.

Referenced by DrawMenuBar(), Initialize(), OpenProject(), OpenRomOrProject(), and SaveProject().

◆ context_

EditorContext yaze::editor::EditorManager::context_
private

Definition at line 103 of file editor_manager.h.

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

◆ current_editor_

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

Definition at line 105 of file editor_manager.h.

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

◆ assembly_editor_

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

Definition at line 106 of file editor_manager.h.

Referenced by DrawMenuBar(), EditorManager(), ManageActiveEditors(), and OpenProject().

◆ dungeon_editor_

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

Definition at line 107 of file editor_manager.h.

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

◆ graphics_editor_

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

Definition at line 108 of file editor_manager.h.

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

◆ music_editor_

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

Definition at line 109 of file editor_manager.h.

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

◆ overworld_editor_

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

Definition at line 110 of file editor_manager.h.

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

◆ palette_editor_

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

Definition at line 111 of file editor_manager.h.

Referenced by DrawMenuBar(), EditorManager(), Initialize(), and ManageActiveEditors().

◆ screen_editor_

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

Definition at line 112 of file editor_manager.h.

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

◆ sprite_editor_

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

Definition at line 113 of file editor_manager.h.

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

◆ settings_editor_

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

Definition at line 114 of file editor_manager.h.

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

◆ message_editor_

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

Definition at line 115 of file editor_manager.h.

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

◆ memory_editor_

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

Definition at line 116 of file editor_manager.h.

Referenced by DrawMenuBar().


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