#ifndef _WX_FRAME_HPP_ #define _WX_FRAME_HPP_ #include class WxFrontend; class wxTreeCtrl; class wxTextCtrl; class wxCommandEvent; // The essim main window. Holds no domain state of its own: it reads and mutates // the System owned by the WxFrontend, calling the core/app operations directly // (load, verify, export, save, restore) and rendering their results into a // model tree, an overview panel and a log. class EssimFrame : public wxFrame { public: explicit EssimFrame(WxFrontend &fe); private: // Menu handlers — each is a thin wrapper over a core/app operation. void OnLoad(wxCommandEvent &); void OnRestore(wxCommandEvent &); void OnSave(wxCommandEvent &); void OnExport(wxCommandEvent &); void OnSetConnectorType(wxCommandEvent &); void OnAttachBsdl(wxCommandEvent &); void OnConnect(wxCommandEvent &); void OnSetSignalType(wxCommandEvent &); void OnVerify(wxCommandEvent &); void OnQuit(wxCommandEvent &); void OnAbout(wxCommandEvent &); // Modal pickers over the current System. `caption` titles the dialogs (e.g. // to distinguish two picks). Each returns nullptr if there is nothing to // pick or the user cancels. class Module *PickModule(const wxString &caption); class Part *PickPart(const wxString &caption = "Select part"); void RebuildModelView(); ///< refresh tree + overview from the System void Log(const wxString &line); ///< append a line to the log pane WxFrontend &fe_; wxTreeCtrl *tree_ = nullptr; wxTextCtrl *overview_ = nullptr; wxTextCtrl *log_ = nullptr; }; #endif // _WX_FRAME_HPP_