#ifndef _WX_FRONTEND_HPP_ #define _WX_FRONTEND_HPP_ #include "frontends/frontend.hpp" #include #include class System; // wxWidgets GUI frontend. Implements the shared Frontend interface so the same // launcher (frontend_main) drives it: it owns the System and a console buffer, // handles boot commands headlessly (for --restore/--batch), and Run() opens the // wxWidgets window. The window itself (EssimFrame) drives essim_core / app::* // operations directly — no command shell, no TUI reuse. class WxFrontend : public Frontend { public: WxFrontend(); ~WxFrontend() override; // --- Frontend interface --- void BootDispatch(const std::string &raw) override; void DumpCommandsMd(std::ostream &out) const override; void DumpOutput(std::ostream &out) const override; void Run() override; // --- used by the window (EssimFrame) --- System *system() const { return sys_.get(); } void set_system(System *fresh); ///< take ownership (used by Restore) void ensure_system(); ///< create an empty System if none yet private: std::unique_ptr sys_; std::string output_; ///< console buffer surfaced by DumpOutput (batch) }; #endif // _WX_FRONTEND_HPP_