mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-11 09:51:06 +00:00
46 lines
1.1 KiB
C++
46 lines
1.1 KiB
C++
#ifndef slic3r_TerminalDialog_hpp_
|
|
#define slic3r_TerminalDialog_hpp_
|
|
|
|
#include "Widgets/WebViewHostDialog.hpp"
|
|
|
|
#include <memory>
|
|
#include <nlohmann/json_fwd.hpp>
|
|
#include <string>
|
|
#include <vector>
|
|
#include <wx/event.h>
|
|
#include <wx/string.h>
|
|
#include <wx/chartype.h>
|
|
#include <wx/gdicmn.h>
|
|
#include <wx/toplevel.h>
|
|
|
|
class wxWindow;
|
|
|
|
namespace Slic3r { namespace GUI {
|
|
|
|
class ProcessRunner;
|
|
|
|
class TerminalDialog : public Slic3r::GUI::WebViewHostDialog
|
|
{
|
|
public:
|
|
TerminalDialog(wxWindow* parent,
|
|
wxWindowID id = wxID_ANY,
|
|
const wxString& title = wxT(""),
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
const wxSize& size = wxDefaultSize,
|
|
long style = wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX | wxMAXIMIZE_BOX);
|
|
|
|
~TerminalDialog() override;
|
|
|
|
private:
|
|
void on_script_message(const nlohmann::json& payload) override;
|
|
nlohmann::json localized_strings() const override;
|
|
|
|
void resolve_and_run(const std::string& cmd);
|
|
|
|
std::unique_ptr<ProcessRunner> m_runner;
|
|
};
|
|
|
|
}} // namespace Slic3r::GUI
|
|
|
|
#endif
|