mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-14 21:22:03 +08:00
55 lines
1.5 KiB
C++
55 lines
1.5 KiB
C++
#ifndef slic3r_GUI_CalibrationAbstractDialog_hpp_
|
|
#define slic3r_GUI_CalibrationAbstractDialog_hpp_
|
|
|
|
#include <wx/wx.h>
|
|
#include <map>
|
|
#include <vector>
|
|
|
|
#include "GUI_App.hpp"
|
|
#include "GUI_Utils.hpp"
|
|
#include "MainFrame.hpp"
|
|
#include "wxExtensions.hpp"
|
|
#include <wx/html/htmlwin.h>
|
|
|
|
namespace Slic3r {
|
|
namespace GUI {
|
|
|
|
class CalibrationAbstractDialog : public DPIDialog
|
|
{
|
|
|
|
public:
|
|
CalibrationAbstractDialog(GUI_App* app, MainFrame* mainframe, std::string name);
|
|
virtual ~CalibrationAbstractDialog(){ if(gui_app!=nullptr) gui_app->change_calibration_dialog(this, nullptr);}
|
|
|
|
private:
|
|
wxPanel* create_header(wxWindow* parent, const wxFont& bold_font);
|
|
protected:
|
|
void create(std::string html_path, wxSize dialogsize = wxSize(800, 500));
|
|
virtual void create_buttons(wxStdDialogButtonSizer*) = 0;
|
|
void on_dpi_changed(const wxRect& suggested_rect) override;
|
|
void closeMe(wxCommandEvent& event_args);
|
|
ModelObject* add_part(ModelObject* model_object, std::string input_file, Vec3d move, Vec3d scale = Vec3d{ 1,1,1 });
|
|
|
|
wxHtmlWindow* html_viewer;
|
|
MainFrame* main_frame;
|
|
GUI_App* gui_app;
|
|
|
|
};
|
|
|
|
|
|
class HtmlDialog : public CalibrationAbstractDialog
|
|
{
|
|
|
|
public:
|
|
HtmlDialog(GUI_App* app, MainFrame* mainframe, std::string title, std::string html_path) : CalibrationAbstractDialog(app, mainframe, title) { create(html_path); }
|
|
virtual ~HtmlDialog() {}
|
|
protected:
|
|
void create_buttons(wxStdDialogButtonSizer* sizer) override {}
|
|
|
|
};
|
|
|
|
} // namespace GUI
|
|
} // namespace Slic3r
|
|
|
|
#endif
|