3#include "absl/strings/str_format.h"
30 : editor_manager_(editor_manager),
31 menu_builder_(menu_builder),
32 rom_manager_(rom_manager),
33 project_manager_(project_manager),
34 editor_registry_(editor_registry),
35 session_coordinator_(session_coordinator),
36 toast_manager_(toast_manager),
37 popup_manager_(popup_manager) {
110 [
this]() {
OnQuit(); },
"Ctrl+Q");
123 [
this]() {
OnUndo(); },
"Ctrl+Z",
126 [
this]() {
OnRedo(); },
"Ctrl+Y",
133 [
this]() {
OnCut(); },
"Ctrl+X",
136 [
this]() {
OnCopy(); },
"Ctrl+C",
139 [
this]() {
OnPaste(); },
"Ctrl+V",
146 [
this]() {
OnFind(); },
"Ctrl+F",
193 [
this]() { OnShowAIAgent(); },
"Ctrl+Shift+A")
195 [
this]() { OnShowChatHistory(); },
"Ctrl+H")
197 [
this]() { OnShowProposalDrawer(); },
"Ctrl+Shift+R");
245 [
this]() { OnStartCollaboration(); })
247 [
this]() { OnJoinCollaboration(); })
249 [
this]() { OnShowNetworkStatus(); })
262#ifdef YAZE_ENABLE_TESTING
266 [
this]() { OnShowTestDashboard(); },
"Ctrl+T")
268 [
this]() { OnRunAllTests(); })
270 [
this]() { OnRunUnitTests(); })
272 [
this]() { OnRunIntegrationTests(); })
274 [
this]() { OnRunE2ETests(); })
335 [
this]() { OnShowProposalDrawer(); });
452 absl::StrFormat(
"Failed to load ROM: %s", status.message()),
464 absl::StrFormat(
"Failed to save ROM: %s", status.message()),
482 absl::StrFormat(
"Failed to create project: %s", status.message()),
494 absl::StrFormat(
"Failed to open project: %s", status.message()),
506 absl::StrFormat(
"Failed to save project: %s", status.message()),
520 absl::StrFormat(
"Failed to save project as: %s", status.message()),
530 if (current_editor) {
531 auto status = current_editor->Undo();
543 if (current_editor) {
544 auto status = current_editor->Redo();
556 if (current_editor) {
557 auto status = current_editor->Cut();
569 if (current_editor) {
570 auto status = current_editor->Copy();
582 if (current_editor) {
583 auto status = current_editor->Paste();
595 if (current_editor) {
596 auto status = current_editor->Find();
617 ui->ShowEditorSelection();
652void MenuOrchestrator::OnShowAIAgent() {
658void MenuOrchestrator::OnShowChatHistory() {
664void MenuOrchestrator::OnShowProposalDrawer() {
692 ui->ShowSessionSwitcher();
804#ifdef YAZE_ENABLE_TESTING
805void MenuOrchestrator::OnShowTestDashboard() {
811void MenuOrchestrator::OnRunAllTests() {
816void MenuOrchestrator::OnRunUnitTests() {
821void MenuOrchestrator::OnRunIntegrationTests() {
826void MenuOrchestrator::OnRunE2ETests() {
833void MenuOrchestrator::OnStartCollaboration() {
838void MenuOrchestrator::OnJoinCollaboration() {
843void MenuOrchestrator::OnShowNetworkStatus() {
895 if (rom && rom->is_loaded()) {
898 settings.
filename = rom->filename();
899 auto status = rom->SaveToFile(settings);
904 absl::StrFormat(
"Backup failed: %s", status.message()),
918 absl::StrFormat(
"ROM validation failed: %s", status.message()),
976 return "Unknown Editor";
994#ifdef YAZE_ENABLE_TESTING
997 if (!rom || !rom->is_loaded())
return;
1009#ifdef YAZE_ENABLE_TESTING
1012 if (!rom || !rom->is_loaded())
return;
1025 if (!rom || !rom->is_loaded())
return;
1029 std::string version_str = (version == 0xFF)
1031 : absl::StrFormat(
"v%d", version);
1034 absl::StrFormat(
"ROM: %s | ZSCustomOverworld: %s",
1035 rom->title().c_str(), version_str.c_str()),
1042 if (!rom || !rom->is_loaded())
return;
1045 "Use Overworld Editor to upgrade ROM version",
1051 flags.overworld.kLoadCustomOverworld = !flags.overworld.kLoadCustomOverworld;
1054 absl::StrFormat(
"Custom Overworld Loading: %s",
1055 flags.overworld.kLoadCustomOverworld ?
"Enabled" :
"Disabled"),
1062 if (!rom || !rom->is_loaded())
return;
1065 flags.overworld.kApplyZSCustomOverworldASM = !flags.overworld.kApplyZSCustomOverworldASM;
1068 absl::StrFormat(
"ZSCustomOverworld ASM Application: %s",
1069 flags.overworld.kApplyZSCustomOverworldASM ?
"Enabled" :
"Disabled"),
The EditorManager controls the main editor window and manages the various editor classes.
absl::Status SaveProjectAs()
void ShowResourceLabelManager()
absl::Status OpenProject()
void SwitchToEditor(EditorType editor_type)
void LoadWorkspaceLayout()
UICoordinator * ui_coordinator()
void ResetWorkspaceLayout()
absl::Status CreateNewProject(const std::string &template_name="Basic ROM Hack")
auto GetCurrentEditor() const -> Editor *
absl::Status SaveProject()
void LoadDesignerLayout()
void SaveWorkspaceLayout()
absl::Status LoadRom()
Load a ROM file into a new or existing session.
void ShowCommandPalette()
void LoadDeveloperLayout()
auto GetCurrentRom() const -> Rom *
void ShowPerformanceDashboard()
absl::Status SaveRom()
Save the current ROM file.
Manages editor types, categories, and lifecycle.
Handles all project file operations.
bool HasActiveProject() const
std::string GetProjectName() const
Handles all ROM file I/O operations.
absl::Status ValidateRom(Rom *rom)
std::string GetRomFilename(Rom *rom) const
bool IsRomLoaded(Rom *rom) const
High-level orchestrator for multi-session UI.
void SwitchToSession(size_t index)
void CloseCurrentSession()
void DuplicateCurrentSession()
bool HasMultipleSessions() const
void Show(const std::string &message, ToastType type=ToastType::kInfo, float ttl_seconds=3.0f)
#define ICON_MD_DEVELOPER_MODE
#define ICON_MD_FOLDER_OPEN
#define ICON_MD_CONTENT_CUT
#define ICON_MD_VOLUNTEER_ACTIVISM
#define ICON_MD_FILE_OPEN
#define ICON_MD_CHECK_BOX
#define ICON_MD_EXIT_TO_APP
#define ICON_MD_VIEW_LIST
#define ICON_MD_DATA_ARRAY
#define ICON_MD_NEW_RELEASES
#define ICON_MD_PLAY_ARROW
#define ICON_MD_DESIGN_SERVICES
#define ICON_MD_INTEGRATION_INSTRUCTIONS
#define ICON_MD_CONSTRUCTION
#define ICON_MD_VIDEOGAME_ASSET
#define ICON_MD_CHAT_BUBBLE
#define ICON_MD_SWITCH_ACCOUNT
#define ICON_MD_VISIBILITY
#define ICON_MD_BUILD_CIRCLE
#define ICON_MD_MUSIC_NOTE
#define ICON_MD_CONTENT_PASTE
#define ICON_MD_VISIBILITY_OFF
#define ICON_MD_DISPLAY_SETTINGS
#define ICON_MD_PLAY_CIRCLE
#define ICON_MD_CHECK_CIRCLE
#define ICON_MD_CREATE_NEW_FOLDER
#define ICON_MD_DASHBOARD
#define ICON_MD_CONTENT_COPY
#define ICON_MD_ANALYTICS
#define ICON_MD_SMART_TOY
#define ICON_MD_GROUP_ADD
constexpr int OverworldCustomASMHasBeenApplied
Main namespace for the application.