1#ifndef YAZE_APP_EDITOR_SYSTEM_SESSION_COORDINATOR_H_
2#define YAZE_APP_EDITOR_SYSTEM_SESSION_COORDINATOR_H_
8#include "absl/status/status.h"
12#include "imgui/imgui.h"
20class EditorCardRegistry;
80 void RenameSession(
size_t index,
const std::string& new_name);
104 absl::Status
LoadRomIntoSession(
const std::string& filename,
size_t session_index = SIZE_MAX);
106 absl::Status
SaveSessionAs(
size_t session_index,
const std::string& filename);
The Rom class is used to load, save, and modify Rom data.
Central registry for all editor cards with session awareness and dependency injection.
The EditorManager controls the main editor window and manages the various editor classes.
Contains a complete set of editors for a single ROM instance.
High-level orchestrator for multi-session UI.
void ShowSessionManager()
void SwitchToSession(size_t index)
void * GetActiveSession() const
char session_rename_buffer_[256]
void * GetSession(size_t index) const
size_t GetEmptySessionCount() const
std::string GenerateUniqueEditorTitle(const std::string &editor_name, size_t session_index) const
void CleanupClosedSessions()
bool IsSessionSwitcherVisible() const
EditorSet * GetCurrentEditorSet() const
size_t GetActiveSessionIndex() const
void CloseCurrentSession()
EditorManager * editor_manager_
~SessionCoordinator()=default
void ToggleSessionManager()
RomSession * GetActiveRomSession() const
void CloseSession(size_t index)
size_t GetActiveSessionCount() const
void FocusPreviousSession()
void UpdateSessionCount()
void DrawSessionManager()
absl::StatusOr< RomSession * > CreateSessionFromRom(Rom &&rom, const std::string &filepath)
UserSettings * user_settings_
void DuplicateCurrentSession()
void HideSessionSwitcher()
void DrawSessionContextMenu(size_t index)
absl::Status SaveSessionAs(size_t session_index, const std::string &filename)
size_t active_session_index_
absl::Status SaveActiveSession(const std::string &filename="")
void ActivateSession(size_t index)
ImVec4 GetSessionColor(size_t index) const
absl::Status LoadRomIntoSession(const std::string &filename, size_t session_index=SIZE_MAX)
void ShowAllCardsInActiveSession()
std::string GetSessionDisplayName(size_t index) const
void ShowSessionSwitcher()
void RenameSession(size_t index, const std::string &new_name)
bool IsSessionModified(size_t index) const
void SetEditorManager(EditorManager *manager)
size_t session_to_rename_
size_t GetTotalSessionCount() const
void UpdateActiveSession()
bool HasDuplicateSession(const std::string &filepath) const
static constexpr size_t kMinSessions
void ToggleSessionSwitcher()
ToastManager * toast_manager_
bool IsSessionClosed(size_t index) const
std::string GetSessionIcon(size_t index) const
bool show_session_manager_
void DrawSessionRenameDialog()
void ShowSessionLimitWarning()
void DrawSessionSwitcher()
void ShowCardsInCategory(const std::string &category)
std::string GetActiveSessionDisplayName() const
bool show_session_switcher_
Rom * GetCurrentRom() const
void ShowSessionOperationResult(const std::string &operation, bool success)
bool IsValidSessionIndex(size_t index) const
void HideAllCardsInActiveSession()
bool IsSessionEmpty(size_t index) const
bool HasMultipleSessions() const
void DrawSessionTab(size_t index, bool is_active)
void DrawSessionBadge(size_t index)
void RemoveSession(size_t index)
void SetActiveSessionIndex(size_t index)
bool IsSessionActive(size_t index) const
void HideCardsInCategory(const std::string &category)
void ValidateSessionIndex(size_t index) const
EditorCardRegistry * card_registry_
void DrawSessionIndicator()
bool IsSessionManagerVisible() const
bool IsSessionLoaded(size_t index) const
size_t GetLoadedSessionCount() const
std::string GenerateUniqueSessionName(const std::string &base_name) const
bool show_session_rename_dialog_
static constexpr size_t kMaxSessions
void HideSessionManager()
Manages user preferences and settings persistence.
Main namespace for the application.
Represents a single session, containing a ROM and its associated editors.