2018-04-20 10:58:07 +00:00
|
|
|
#ifndef slic3r_BedShapeDialog_hpp_
|
|
|
|
#define slic3r_BedShapeDialog_hpp_
|
2018-01-25 12:46:04 +00:00
|
|
|
// The bed shape dialog.
|
|
|
|
// The dialog opens from Print Settins tab->Bed Shape : Set...
|
|
|
|
|
|
|
|
#include "OptionsGroup.hpp"
|
|
|
|
#include "2DBed.hpp"
|
2018-11-26 13:41:58 +00:00
|
|
|
#include "I18N.hpp"
|
2018-01-25 12:46:04 +00:00
|
|
|
|
|
|
|
#include <wx/dialog.h>
|
|
|
|
#include <wx/choicebk.h>
|
|
|
|
|
|
|
|
namespace Slic3r {
|
|
|
|
namespace GUI {
|
|
|
|
|
|
|
|
using ConfigOptionsGroupShp = std::shared_ptr<ConfigOptionsGroup>;
|
|
|
|
class BedShapePanel : public wxPanel
|
|
|
|
{
|
|
|
|
Bed_2D* m_canvas;
|
|
|
|
|
|
|
|
public:
|
2018-10-31 11:56:08 +00:00
|
|
|
BedShapePanel(wxWindow* parent) : wxPanel(parent, wxID_ANY) {}
|
|
|
|
~BedShapePanel() {}
|
2018-01-25 12:46:04 +00:00
|
|
|
|
|
|
|
void build_panel(ConfigOptionPoints* default_pt);
|
2018-01-30 11:10:12 +00:00
|
|
|
|
2018-02-07 16:13:52 +00:00
|
|
|
ConfigOptionsGroupShp init_shape_options_page(wxString title);
|
2018-01-25 12:46:04 +00:00
|
|
|
void set_shape(ConfigOptionPoints* points);
|
|
|
|
void update_preview();
|
|
|
|
void update_shape();
|
|
|
|
void load_stl();
|
2018-01-30 11:10:12 +00:00
|
|
|
|
|
|
|
// Returns the resulting bed shape polygon. This value will be stored to the ini file.
|
2018-08-21 19:05:24 +00:00
|
|
|
std::vector<Vec2d> GetValue() { return m_canvas->m_bed_shape; }
|
2019-04-18 00:03:40 +00:00
|
|
|
|
|
|
|
wxChoicebook* m_shape_options_book;
|
|
|
|
std::vector <ConfigOptionsGroupShp> m_optgroups;
|
|
|
|
|
2018-01-25 12:46:04 +00:00
|
|
|
};
|
|
|
|
|
2019-04-18 00:03:40 +00:00
|
|
|
class BedShapeDialog : public DPIDialog
|
2018-01-25 12:46:04 +00:00
|
|
|
{
|
2018-02-05 15:12:16 +00:00
|
|
|
BedShapePanel* m_panel;
|
2018-01-25 12:46:04 +00:00
|
|
|
public:
|
2019-04-18 00:03:40 +00:00
|
|
|
BedShapeDialog(wxWindow* parent) : DPIDialog(parent, wxID_ANY, _(L("Bed Shape")),
|
2019-02-06 08:49:32 +00:00
|
|
|
wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) {}
|
2018-10-31 11:56:08 +00:00
|
|
|
~BedShapeDialog() {}
|
2018-01-25 12:46:04 +00:00
|
|
|
|
|
|
|
void build_dialog(ConfigOptionPoints* default_pt);
|
2018-08-21 19:05:24 +00:00
|
|
|
std::vector<Vec2d> GetValue() { return m_panel->GetValue(); }
|
2019-04-18 00:03:40 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void on_dpi_changed(const wxRect &suggested_rect) override;
|
2018-01-25 12:46:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // GUI
|
|
|
|
} // Slic3r
|
2018-04-20 10:58:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
#endif /* slic3r_BedShapeDialog_hpp_ */
|