2019-05-28 14:38:04 +00:00
|
|
|
#ifndef slic3r_GUI_ObjectLayers_hpp_
|
|
|
|
#define slic3r_GUI_ObjectLayers_hpp_
|
|
|
|
|
|
|
|
#include "GUI_ObjectSettings.hpp"
|
|
|
|
#include "wxExtensions.hpp"
|
|
|
|
|
|
|
|
class wxBoxSizer;
|
|
|
|
|
|
|
|
namespace Slic3r {
|
|
|
|
class ModelObject;
|
|
|
|
|
|
|
|
namespace GUI {
|
|
|
|
class ConfigOptionsGroup;
|
|
|
|
|
2019-06-04 13:22:29 +00:00
|
|
|
class LayerRangeEditor : public wxTextCtrl
|
|
|
|
{
|
2019-06-05 09:03:46 +00:00
|
|
|
bool m_enter_pressed { false };
|
|
|
|
bool m_call_kill_focus { false };
|
|
|
|
|
2019-06-04 13:22:29 +00:00
|
|
|
public:
|
|
|
|
LayerRangeEditor( wxWindow* parent,
|
|
|
|
const wxString& value = wxEmptyString,
|
2019-06-05 09:03:46 +00:00
|
|
|
std::function<bool(coordf_t val)> edit_fn = [](coordf_t) {return false; }
|
2019-06-04 13:22:29 +00:00
|
|
|
);
|
|
|
|
~LayerRangeEditor() {}
|
|
|
|
|
|
|
|
private:
|
|
|
|
coordf_t get_value();
|
|
|
|
};
|
|
|
|
|
2019-05-28 14:38:04 +00:00
|
|
|
class ObjectLayers : public OG_Settings
|
|
|
|
{
|
2019-05-30 10:41:16 +00:00
|
|
|
ScalableBitmap m_bmp_delete;
|
|
|
|
ScalableBitmap m_bmp_add;
|
|
|
|
ModelObject* m_object {nullptr};
|
2019-05-28 14:38:04 +00:00
|
|
|
|
2019-06-05 09:03:46 +00:00
|
|
|
wxFlexGridSizer* m_grid_sizer;
|
|
|
|
std::pair<coordf_t, coordf_t> m_last_edited_range;
|
|
|
|
|
|
|
|
enum SelectedItemType
|
|
|
|
{
|
|
|
|
sitUndef,
|
|
|
|
sitMinZ,
|
|
|
|
sitMaxZ,
|
|
|
|
sitLayerHeight,
|
|
|
|
} m_selection_type {sitUndef};
|
2019-05-28 14:38:04 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
ObjectLayers(wxWindow* parent);
|
|
|
|
~ObjectLayers() {}
|
|
|
|
|
2019-06-04 09:51:25 +00:00
|
|
|
wxSizer* create_layer_without_buttons(const std::map<std::pair<coordf_t, coordf_t>, DynamicPrintConfig>::value_type& layer);
|
2019-05-30 12:41:16 +00:00
|
|
|
void create_layer(int id);
|
2019-06-04 09:51:25 +00:00
|
|
|
void create_layers_list();
|
2019-05-28 14:38:04 +00:00
|
|
|
void update_layers_list();
|
|
|
|
|
|
|
|
void UpdateAndShow(const bool show) override;
|
|
|
|
void msw_rescale();
|
|
|
|
};
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
#endif // slic3r_GUI_ObjectLayers_hpp_
|