Merge with bibnikv.

Added some functions to TabIface.
Added BedShapeDialog & Bed2D classes.
Added new_scale to Polygon.
In class Field: Point renamed to PointCtrl and added set_value for PointCtrl, extended get_value for Choice.
This commit is contained in:
YuSanka 2018-01-25 13:46:04 +01:00
parent a1705c093b
commit f0b035059a
18 changed files with 774 additions and 95 deletions

View file

@ -0,0 +1,40 @@
#include <wx/wx.h>
#include "Config.hpp"
namespace Slic3r {
namespace GUI {
class Bed_2D : public wxPanel
{
bool m_user_drawn_background = false;
bool m_painted = false;
double m_scale_factor;
Pointf m_shift;
Point m_pos;
Point to_pixels(Pointf point);
void repaint();
public:
Bed_2D(wxWindow* parent)
{
Create(parent, wxID_ANY, wxDefaultPosition, wxSize(250, -1), wxTAB_TRAVERSAL);
// m_user_drawn_background = $^O ne 'darwin';
m_user_drawn_background = true;
Bind(wxEVT_PAINT, ([this](wxPaintEvent e)
{
repaint();
}));
// EVT_ERASE_BACKGROUND($self, sub{}) if $self->{user_drawn_background};
// Bind(wxEVT_MOUSE_EVENTS, ([this](wxCommandEvent){/*mouse_event()*/; }));
Bind(wxEVT_SIZE, ([this](wxSizeEvent){Refresh(); }));
}
~Bed_2D(){}
std::vector<Pointf> m_bed_shape;
};
} // GUI
} // Slic3r