pound-emu_pound/gui/GUIManager.h
Carlo Pezzotti 2bb666a088 feat(gui): Extract and modularize GUI system from main.cpp
- Create modular GUI architecture with base Panel class
- Implement GUIManager to handle window lifecycle and panel management
- Add Window wrapper class for SDL3/OpenGL context management
- Create specialized panels:
  - ConsolePanel: Colored log output with timestamps
  - CPUPanel: CPU debugging with tabs for registers, memory, and disassembly
  - PerformancePanel: Real-time FPS and frame time monitoring
- Apply modern dark theme with purple accents
- Add comprehensive menu bar (File, Emulation, View, Tools, Help)
- Update CMakeLists.txt to include new gui/ directory structure
- Refactor main.cpp to use the new GUI system
- Cutom theme on switch colors
2025-07-09 09:07:32 +02:00

44 lines
No EOL
1 KiB
C++

// Copyright 2025 Pound Emulator Project. All rights reserved.
#pragma once
#include <memory>
#include <vector>
#include <functional>
#include "Window.h"
#include "Panel.h"
namespace Pound::GUI {
class GUIManager {
public:
GUIManager();
~GUIManager();
bool Initialize(const std::string& title, int width, int height);
void Shutdown();
void RunFrame();
bool IsRunning() const { return running && window && !window->ShouldClose(); }
void AddPanel(std::shared_ptr<Panel> panel);
void RemovePanel(const std::string& name);
// Callback for external systems
void SetCPUTestCallback(std::function<void()> callback) { cpu_test_callback = callback; }
private:
void BeginFrame();
void EndFrame();
void RenderMainMenuBar();
void ApplyTheme();
std::unique_ptr<Window> window;
std::vector<std::shared_ptr<Panel>> panels;
bool running = false;
bool show_demo_window = false;
// Callbacks
std::function<void()> cpu_test_callback;
};
} // namespace Pound::GUI