2018-11-09 17:39:07 +00:00
|
|
|
#ifndef slic3r_GUI_ObjectSettings_hpp_
|
|
|
|
#define slic3r_GUI_ObjectSettings_hpp_
|
|
|
|
|
|
|
|
#include <memory>
|
2019-03-02 06:45:20 +00:00
|
|
|
#include <vector>
|
2018-11-09 17:39:07 +00:00
|
|
|
#include <wx/panel.h>
|
2019-04-13 21:46:52 +00:00
|
|
|
#include "wxExtensions.hpp"
|
2018-11-09 17:39:07 +00:00
|
|
|
|
|
|
|
class wxBoxSizer;
|
|
|
|
|
|
|
|
namespace Slic3r {
|
2019-08-29 11:17:10 +00:00
|
|
|
class DynamicPrintConfig;
|
2018-11-09 17:39:07 +00:00
|
|
|
namespace GUI {
|
|
|
|
class ConfigOptionsGroup;
|
|
|
|
|
|
|
|
class OG_Settings
|
|
|
|
{
|
|
|
|
protected:
|
|
|
|
std::shared_ptr<ConfigOptionsGroup> m_og;
|
|
|
|
wxWindow* m_parent;
|
|
|
|
public:
|
|
|
|
OG_Settings(wxWindow* parent, const bool staticbox);
|
2018-12-11 12:34:37 +00:00
|
|
|
virtual ~OG_Settings() {}
|
2018-11-09 17:39:07 +00:00
|
|
|
|
|
|
|
virtual bool IsShown();
|
|
|
|
virtual void Show(const bool show);
|
|
|
|
virtual void Hide();
|
|
|
|
virtual void UpdateAndShow(const bool show);
|
|
|
|
|
2019-01-15 08:31:53 +00:00
|
|
|
virtual wxSizer* get_sizer();
|
2018-11-09 17:39:07 +00:00
|
|
|
ConfigOptionsGroup* get_og() { return m_og.get(); }
|
2019-08-16 14:47:29 +00:00
|
|
|
wxWindow* parent() const {return m_parent; }
|
2018-11-09 17:39:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class ObjectSettings : public OG_Settings
|
|
|
|
{
|
|
|
|
// sizer for extra Object/Part's settings
|
|
|
|
wxBoxSizer* m_settings_list_sizer{ nullptr };
|
|
|
|
// option groups for settings
|
|
|
|
std::vector <std::shared_ptr<ConfigOptionsGroup>> m_og_settings;
|
|
|
|
|
2019-04-24 23:45:00 +00:00
|
|
|
ScalableBitmap m_bmp_delete;
|
2019-07-29 13:13:17 +00:00
|
|
|
ScalableBitmap m_bmp_delete_focus;
|
2019-04-13 21:46:52 +00:00
|
|
|
|
2018-11-09 17:39:07 +00:00
|
|
|
public:
|
|
|
|
ObjectSettings(wxWindow* parent);
|
|
|
|
~ObjectSettings() {}
|
|
|
|
|
2019-07-11 21:46:23 +00:00
|
|
|
bool update_settings_list();
|
2019-09-16 08:22:26 +00:00
|
|
|
/* Additional check for override options: Add options, if its needed.
|
|
|
|
* Example: if Infill is set to 100%, and Fill Pattern is missed in config_to,
|
|
|
|
* we should add fill_pattern to avoid endless loop in update
|
|
|
|
*/
|
|
|
|
bool add_missed_options(DynamicPrintConfig *config_to, const DynamicPrintConfig &config_from);
|
2019-08-16 14:47:29 +00:00
|
|
|
void update_config_values(DynamicPrintConfig*config);
|
2018-11-09 17:39:07 +00:00
|
|
|
void UpdateAndShow(const bool show) override;
|
2019-04-24 23:45:00 +00:00
|
|
|
void msw_rescale();
|
2018-11-09 17:39:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
#endif // slic3r_GUI_ObjectSettings_hpp_
|