#ifndef GUI_HPP #define GUI_HPP #include #include "MainFrame.hpp" #include "Notifier.hpp" #include #include #include #include #include "Preset.hpp" namespace Slic3r { namespace GUI { class App: public wxApp { public: virtual bool OnInit(); App() : wxApp() {} /// Save position, size, and maximize state for a TopLevelWindow (includes Frames) by name in Settings. void save_window_pos(const wxTopLevelWindow* window, const wxString& name ); /// Move/resize a named TopLevelWindow (includes Frames) from Settings void restore_window_pos(wxTopLevelWindow* window, const wxString& name ); /// Function to add callback functions to the idle loop stack. void CallAfter(std::function cb_function); void OnUnhandledException() override; private: std::unique_ptr notifier {nullptr}; std::vector presets { preset_types, Presets() }; void load_presets(); wxString datadir {""}; const std::string LogChannel {"APP"}; //< Which log these messages should go to. /// Lock to guard the callback stack std::mutex callback_register; /// callbacks registered to run during idle event. std::stack > cb {}; }; }} // namespace Slic3r::GUI #endif // GUI_HPP