2018-04-20 10:58:07 +00:00
|
|
|
#ifndef slic3r_Tab_hpp_
|
|
|
|
#define slic3r_Tab_hpp_
|
|
|
|
|
2017-12-05 14:54:01 +00:00
|
|
|
// The "Expert" tab at the right of the main tabbed window.
|
|
|
|
//
|
|
|
|
// This file implements following packages:
|
|
|
|
// Slic3r::GUI::Tab;
|
|
|
|
// Slic3r::GUI::Tab::Print;
|
|
|
|
// Slic3r::GUI::Tab::Filament;
|
|
|
|
// Slic3r::GUI::Tab::Printer;
|
|
|
|
// Slic3r::GUI::Tab::Page
|
|
|
|
// - Option page: For example, the Slic3r::GUI::Tab::Print has option pages "Layers and perimeters", "Infill", "Skirt and brim" ...
|
|
|
|
// Slic3r::GUI::SavePresetWindow
|
|
|
|
// - Dialog to select a new preset name to store the configuration.
|
|
|
|
// Slic3r::GUI::Tab::Preset;
|
|
|
|
// - Single preset item: name, file is default or external.
|
|
|
|
|
|
|
|
#include <wx/panel.h>
|
|
|
|
#include <wx/notebook.h>
|
|
|
|
#include <wx/scrolwin.h>
|
|
|
|
#include <wx/sizer.h>
|
|
|
|
#include <wx/bmpcbox.h>
|
|
|
|
#include <wx/bmpbuttn.h>
|
|
|
|
#include <wx/treectrl.h>
|
|
|
|
#include <wx/imaglist.h>
|
2017-12-13 13:45:10 +00:00
|
|
|
#include <wx/statbox.h>
|
2018-04-06 11:37:00 +00:00
|
|
|
#include <wx/dataview.h>
|
2017-12-05 14:54:01 +00:00
|
|
|
|
|
|
|
#include <map>
|
|
|
|
#include <vector>
|
2017-12-13 13:45:10 +00:00
|
|
|
#include <memory>
|
|
|
|
|
2018-01-25 12:46:04 +00:00
|
|
|
#include "BedShapeDialog.hpp"
|
2017-12-13 13:45:10 +00:00
|
|
|
|
|
|
|
//!enum { ID_TAB_TREE = wxID_HIGHEST + 1 };
|
2017-12-05 14:54:01 +00:00
|
|
|
|
|
|
|
namespace Slic3r {
|
|
|
|
namespace GUI {
|
|
|
|
|
2018-04-20 10:58:07 +00:00
|
|
|
typedef std::pair<wxBitmap*, std::string> t_icon_description;
|
|
|
|
typedef std::vector<std::pair<wxBitmap*, std::string>> t_icon_descriptions;
|
|
|
|
|
2017-12-05 14:54:01 +00:00
|
|
|
// Single Tab page containing a{ vsizer } of{ optgroups }
|
|
|
|
// package Slic3r::GUI::Tab::Page;
|
2017-12-13 13:45:10 +00:00
|
|
|
using ConfigOptionsGroupShp = std::shared_ptr<ConfigOptionsGroup>;
|
2018-01-05 14:11:33 +00:00
|
|
|
class Page : public wxScrolledWindow
|
2017-12-05 14:54:01 +00:00
|
|
|
{
|
2017-12-26 22:04:54 +00:00
|
|
|
wxWindow* m_parent;
|
|
|
|
wxString m_title;
|
|
|
|
size_t m_iconID;
|
|
|
|
wxBoxSizer* m_vsizer;
|
2017-12-05 14:54:01 +00:00
|
|
|
public:
|
2018-01-05 14:11:33 +00:00
|
|
|
Page(wxWindow* parent, const wxString title, const int iconID) :
|
2017-12-26 22:04:54 +00:00
|
|
|
m_parent(parent),
|
|
|
|
m_title(title),
|
|
|
|
m_iconID(iconID)
|
2017-12-05 14:54:01 +00:00
|
|
|
{
|
2017-12-26 22:04:54 +00:00
|
|
|
Create(m_parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
|
|
|
|
m_vsizer = new wxBoxSizer(wxVERTICAL);
|
2018-04-18 11:32:21 +00:00
|
|
|
m_item_color = &get_default_label_clr();
|
2017-12-26 22:04:54 +00:00
|
|
|
SetSizer(m_vsizer);
|
2017-12-05 14:54:01 +00:00
|
|
|
}
|
2018-01-05 14:11:33 +00:00
|
|
|
~Page(){}
|
2017-12-13 13:45:10 +00:00
|
|
|
|
2018-03-22 08:37:42 +00:00
|
|
|
bool m_is_modified_values{ false };
|
|
|
|
bool m_is_nonsys_values{ true };
|
|
|
|
|
2017-12-13 13:45:10 +00:00
|
|
|
public:
|
2018-02-07 16:13:52 +00:00
|
|
|
std::vector <ConfigOptionsGroupShp> m_optgroups;
|
2017-12-26 22:04:54 +00:00
|
|
|
DynamicPrintConfig* m_config;
|
2017-12-13 13:45:10 +00:00
|
|
|
|
2017-12-26 22:04:54 +00:00
|
|
|
wxBoxSizer* vsizer() const { return m_vsizer; }
|
|
|
|
wxWindow* parent() const { return m_parent; }
|
|
|
|
wxString title() const { return m_title; }
|
|
|
|
size_t iconID() const { return m_iconID; }
|
|
|
|
void set_config(DynamicPrintConfig* config_in) { m_config = config_in; }
|
2018-01-11 09:33:17 +00:00
|
|
|
void reload_config();
|
2018-04-13 10:35:04 +00:00
|
|
|
Field* get_field(const t_config_option_key& opt_key, int opt_index = -1) const;
|
|
|
|
bool set_value(const t_config_option_key& opt_key, const boost::any& value);
|
|
|
|
ConfigOptionsGroupShp new_optgroup(const wxString& title, int noncommon_label_width = -1);
|
2018-04-18 11:32:21 +00:00
|
|
|
|
|
|
|
bool set_item_colour(const wxColour *clr) {
|
|
|
|
if (m_item_color != clr) {
|
|
|
|
m_item_color = clr;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
const wxColour get_item_colour() {
|
|
|
|
return *m_item_color;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected:
|
|
|
|
// Color of TreeCtrlItem. The wxColour will be updated only if the new wxColour pointer differs from the currently rendered one.
|
|
|
|
const wxColour* m_item_color;
|
2017-12-05 14:54:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// Slic3r::GUI::Tab;
|
2017-12-13 13:45:10 +00:00
|
|
|
|
2018-01-05 14:11:33 +00:00
|
|
|
using PageShp = std::shared_ptr<Page>;
|
|
|
|
class Tab: public wxPanel
|
2017-12-05 14:54:01 +00:00
|
|
|
{
|
2017-12-26 22:04:54 +00:00
|
|
|
wxNotebook* m_parent;
|
2017-12-05 14:54:01 +00:00
|
|
|
protected:
|
2018-01-25 20:44:22 +00:00
|
|
|
std::string m_name;
|
2017-12-26 22:04:54 +00:00
|
|
|
const wxString m_title;
|
|
|
|
wxBitmapComboBox* m_presets_choice;
|
|
|
|
wxBitmapButton* m_btn_save_preset;
|
|
|
|
wxBitmapButton* m_btn_delete_preset;
|
|
|
|
wxBitmapButton* m_btn_hide_incompatible_presets;
|
|
|
|
wxBoxSizer* m_hsizer;
|
|
|
|
wxBoxSizer* m_left_sizer;
|
|
|
|
wxTreeCtrl* m_treectrl;
|
|
|
|
wxImageList* m_icons;
|
|
|
|
wxCheckBox* m_compatible_printers_checkbox;
|
|
|
|
wxButton* m_compatible_printers_btn;
|
2018-03-21 21:21:37 +00:00
|
|
|
wxButton* m_undo_btn;
|
2018-04-19 14:20:30 +00:00
|
|
|
wxButton* m_undo_to_sys_btn;
|
|
|
|
wxButton* m_question_btn;
|
2018-04-20 10:58:07 +00:00
|
|
|
// wxStaticText* m_undo_btns_legent;
|
2018-04-19 14:20:30 +00:00
|
|
|
|
2018-04-06 11:37:00 +00:00
|
|
|
wxComboCtrl* m_cc_presets_choice;
|
2018-04-10 12:00:48 +00:00
|
|
|
wxDataViewTreeCtrl* m_presetctrl;
|
|
|
|
wxImageList* m_preset_icons;
|
2017-12-26 22:04:54 +00:00
|
|
|
|
2018-04-16 09:03:08 +00:00
|
|
|
// Cached bitmaps.
|
|
|
|
// A "flag" icon to be displayned next to the preset name in the Tab's combo box.
|
|
|
|
wxBitmap m_bmp_show_incompatible_presets;
|
|
|
|
wxBitmap m_bmp_hide_incompatible_presets;
|
|
|
|
// Bitmaps to be shown on the "Revert to system" aka "Lock to system" button next to each input field.
|
|
|
|
wxBitmap m_bmp_value_lock;
|
|
|
|
wxBitmap m_bmp_value_unlock;
|
|
|
|
wxBitmap m_bmp_white_bullet;
|
|
|
|
// The following bitmap points to either m_bmp_value_unlock or m_bmp_white_bullet, depending on whether the current preset has a parent preset.
|
|
|
|
wxBitmap *m_bmp_non_system;
|
|
|
|
// Bitmaps to be shown on the "Undo user changes" button next to each input field.
|
|
|
|
wxBitmap m_bmp_value_revert;
|
|
|
|
wxBitmap m_bmp_value_unmodified;
|
2018-04-19 14:20:30 +00:00
|
|
|
wxBitmap m_bmp_question;
|
2018-04-16 09:03:08 +00:00
|
|
|
|
2018-04-17 08:15:48 +00:00
|
|
|
// Colors for ui "decoration"
|
|
|
|
wxColour m_sys_label_clr;
|
|
|
|
wxColour m_modified_label_clr;
|
|
|
|
wxColour m_default_text_clr;
|
|
|
|
|
2017-12-26 22:04:54 +00:00
|
|
|
int m_icon_count;
|
2018-03-21 21:21:37 +00:00
|
|
|
std::map<std::string, size_t> m_icon_index; // Map from an icon file name to its index
|
|
|
|
std::vector<PageShp> m_pages;
|
2017-12-26 22:04:54 +00:00
|
|
|
bool m_disable_tree_sel_changed_event;
|
2018-01-16 15:28:01 +00:00
|
|
|
bool m_show_incompatible_presets;
|
2018-01-26 00:44:34 +00:00
|
|
|
bool m_no_controller;
|
2018-01-16 15:28:01 +00:00
|
|
|
|
|
|
|
std::vector<std::string> m_reload_dependent_tabs = {};
|
2018-04-18 11:32:21 +00:00
|
|
|
enum OptStatus { osSystemValue = 1, osInitValue = 2 };
|
|
|
|
std::map<std::string, int> m_options_list;
|
|
|
|
int m_opt_status_value;
|
2017-12-13 13:45:10 +00:00
|
|
|
|
2018-04-20 10:58:07 +00:00
|
|
|
t_icon_descriptions m_icon_descriptions = {};
|
|
|
|
|
2018-01-21 22:35:00 +00:00
|
|
|
// The two following two event IDs are generated at Plater.pm by calling Wx::NewEventType.
|
|
|
|
wxEventType m_event_value_change = 0;
|
|
|
|
wxEventType m_event_presets_changed = 0;
|
|
|
|
|
2018-03-22 08:37:42 +00:00
|
|
|
bool m_is_modified_values{ false };
|
|
|
|
bool m_is_nonsys_values{ true };
|
2018-04-16 11:43:01 +00:00
|
|
|
bool m_postpone_update_ui {false};
|
2018-03-22 08:37:42 +00:00
|
|
|
|
2018-04-19 10:08:59 +00:00
|
|
|
size_t m_selected_preset_item{ 0 };
|
|
|
|
|
2017-12-13 13:45:10 +00:00
|
|
|
public:
|
2017-12-26 22:04:54 +00:00
|
|
|
PresetBundle* m_preset_bundle;
|
2018-02-27 08:51:14 +00:00
|
|
|
bool m_show_btn_incompatible_presets = false;
|
2018-01-05 14:11:33 +00:00
|
|
|
PresetCollection* m_presets;
|
2018-01-12 16:16:59 +00:00
|
|
|
DynamicPrintConfig* m_config;
|
2018-03-22 10:46:15 +00:00
|
|
|
ogStaticText* m_parent_preset_description_line;
|
2018-04-13 16:22:06 +00:00
|
|
|
wxStaticText* m_colored_Label = nullptr;
|
2017-12-13 13:45:10 +00:00
|
|
|
|
2017-12-05 14:54:01 +00:00
|
|
|
public:
|
2018-01-05 14:11:33 +00:00
|
|
|
Tab() {}
|
2018-04-13 10:35:04 +00:00
|
|
|
Tab(wxNotebook* parent, const wxString& title, const char* name, bool no_controller) :
|
2018-01-26 00:44:34 +00:00
|
|
|
m_parent(parent), m_title(title), m_name(name), m_no_controller(no_controller) {
|
2017-12-13 13:45:10 +00:00
|
|
|
Create(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBK_LEFT | wxTAB_TRAVERSAL);
|
2018-02-09 10:04:34 +00:00
|
|
|
get_tabs_list().push_back(this);
|
2017-12-13 13:45:10 +00:00
|
|
|
}
|
2018-04-19 14:20:30 +00:00
|
|
|
~Tab(){
|
|
|
|
delete_tab_from_list(this);
|
|
|
|
}
|
2017-12-13 13:45:10 +00:00
|
|
|
|
2017-12-26 22:04:54 +00:00
|
|
|
wxWindow* parent() const { return m_parent; }
|
|
|
|
wxString title() const { return m_title; }
|
2018-01-25 20:44:22 +00:00
|
|
|
std::string name() const { return m_name; }
|
2018-01-21 22:35:00 +00:00
|
|
|
|
|
|
|
// Set the events to the callbacks posted to the main frame window (currently implemented in Perl).
|
|
|
|
void set_event_value_change(wxEventType evt) { m_event_value_change = evt; }
|
|
|
|
void set_event_presets_changed(wxEventType evt) { m_event_presets_changed = evt; }
|
2017-12-05 14:54:01 +00:00
|
|
|
|
2018-01-05 14:11:33 +00:00
|
|
|
void create_preset_tab(PresetBundle *preset_bundle);
|
|
|
|
void load_current_preset();
|
2017-12-13 13:45:10 +00:00
|
|
|
void rebuild_page_tree();
|
2018-04-13 10:35:04 +00:00
|
|
|
void select_preset(const std::string& preset_name = "");
|
|
|
|
bool may_discard_current_dirty_preset(PresetCollection* presets = nullptr, const std::string& new_printer_name = "");
|
2018-01-15 11:13:05 +00:00
|
|
|
wxSizer* compatible_printers_widget(wxWindow* parent, wxCheckBox** checkbox, wxButton** btn);
|
2017-12-22 10:50:28 +00:00
|
|
|
|
2018-04-10 12:00:48 +00:00
|
|
|
void update_presetsctrl(wxDataViewTreeCtrl* ui, bool show_incompatible);
|
2018-04-16 11:43:01 +00:00
|
|
|
void load_key_value(const std::string& opt_key, const boost::any& value, bool saved_value = false);
|
2018-01-12 11:41:13 +00:00
|
|
|
void reload_compatible_printers_widget();
|
2017-12-19 10:59:42 +00:00
|
|
|
|
2017-12-13 13:45:10 +00:00
|
|
|
void OnTreeSelChange(wxTreeEvent& event);
|
|
|
|
void OnKeyDown(wxKeyEvent& event);
|
2018-02-01 09:01:05 +00:00
|
|
|
|
2018-01-16 15:28:01 +00:00
|
|
|
void save_preset(std::string name = "");
|
2018-01-18 10:45:25 +00:00
|
|
|
void delete_preset();
|
|
|
|
void toggle_show_hide_incompatible();
|
2018-01-16 15:28:01 +00:00
|
|
|
void update_show_hide_incompatible_button();
|
|
|
|
void update_ui_from_settings();
|
2018-03-09 07:34:32 +00:00
|
|
|
void update_changed_ui();
|
2018-04-13 16:22:06 +00:00
|
|
|
void get_sys_and_mod_flags(const std::string& opt_key, bool& sys_page, bool& modified_page);
|
2018-03-21 21:21:37 +00:00
|
|
|
void update_changed_tree_ui();
|
2018-03-22 08:37:42 +00:00
|
|
|
void update_undo_buttons();
|
2018-03-21 21:21:37 +00:00
|
|
|
|
2018-04-18 11:32:21 +00:00
|
|
|
void on_roll_back_value(const bool to_sys = false);
|
2018-03-22 09:56:57 +00:00
|
|
|
|
2018-04-13 10:35:04 +00:00
|
|
|
PageShp add_options_page(const wxString& title, const std::string& icon, bool is_extruder_pages = false);
|
2017-12-13 13:45:10 +00:00
|
|
|
|
2018-01-16 15:28:01 +00:00
|
|
|
virtual void OnActivate(){}
|
|
|
|
virtual void on_preset_loaded(){}
|
2018-01-03 09:12:42 +00:00
|
|
|
virtual void build() = 0;
|
|
|
|
virtual void update() = 0;
|
2018-04-18 11:32:21 +00:00
|
|
|
virtual void init_options_list();
|
2018-03-16 11:56:03 +00:00
|
|
|
void load_initial_data();
|
2018-01-05 14:11:33 +00:00
|
|
|
void update_dirty();
|
2018-01-16 15:28:01 +00:00
|
|
|
void update_tab_ui();
|
2018-04-13 10:35:04 +00:00
|
|
|
void load_config(const DynamicPrintConfig& config);
|
2018-01-12 11:41:13 +00:00
|
|
|
virtual void reload_config();
|
2018-04-13 10:35:04 +00:00
|
|
|
Field* get_field(const t_config_option_key& opt_key, int opt_index = -1) const;
|
|
|
|
bool set_value(const t_config_option_key& opt_key, const boost::any& value);
|
2018-01-15 11:13:05 +00:00
|
|
|
wxSizer* description_line_widget(wxWindow* parent, ogStaticText** StaticText);
|
2018-01-25 12:46:04 +00:00
|
|
|
bool current_preset_is_dirty();
|
2018-04-20 15:32:08 +00:00
|
|
|
|
2018-01-25 12:46:04 +00:00
|
|
|
DynamicPrintConfig* get_config() { return m_config; }
|
2018-04-20 15:32:08 +00:00
|
|
|
PresetCollection* get_presets() { return m_presets; }
|
2018-01-25 20:44:22 +00:00
|
|
|
std::vector<std::string> get_dependent_tabs() { return m_reload_dependent_tabs; }
|
2018-04-20 15:32:08 +00:00
|
|
|
size_t get_selected_preset_item() { return m_selected_preset_item; }
|
2018-01-21 22:35:00 +00:00
|
|
|
|
2018-04-13 10:35:04 +00:00
|
|
|
void on_value_change(const std::string& opt_key, const boost::any& value);
|
2018-01-21 22:35:00 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void on_presets_changed();
|
2018-03-13 15:14:36 +00:00
|
|
|
void update_frequently_changed_parameters();
|
2018-04-05 08:44:31 +00:00
|
|
|
void update_wiping_button_visibility();
|
2018-04-06 13:42:52 +00:00
|
|
|
void update_tab_presets(wxComboCtrl* ui, bool show_incompatible);
|
2018-04-20 10:58:07 +00:00
|
|
|
void fill_icon_descriptions();
|
2017-12-05 14:54:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//Slic3r::GUI::Tab::Print;
|
2018-01-05 14:11:33 +00:00
|
|
|
class TabPrint : public Tab
|
2017-12-05 14:54:01 +00:00
|
|
|
{
|
|
|
|
public:
|
2018-01-05 14:11:33 +00:00
|
|
|
TabPrint() {}
|
2018-01-26 00:44:34 +00:00
|
|
|
TabPrint(wxNotebook* parent, bool no_controller) :
|
2018-02-23 08:16:35 +00:00
|
|
|
Tab(parent, _(L("Print Settings")), "print", no_controller) {}
|
2018-01-05 14:11:33 +00:00
|
|
|
~TabPrint(){}
|
2017-12-13 13:45:10 +00:00
|
|
|
|
2018-01-15 11:13:05 +00:00
|
|
|
ogStaticText* m_recommended_thin_wall_thickness_description_line;
|
2018-01-11 09:33:17 +00:00
|
|
|
bool m_support_material_overhangs_queried = false;
|
|
|
|
|
2018-01-03 09:12:42 +00:00
|
|
|
void build() override;
|
2018-01-12 11:41:13 +00:00
|
|
|
void reload_config() override;
|
2018-01-05 14:11:33 +00:00
|
|
|
void update() override;
|
2018-01-16 15:28:01 +00:00
|
|
|
void OnActivate() override;
|
2017-12-05 14:54:01 +00:00
|
|
|
};
|
|
|
|
|
2017-12-26 22:04:54 +00:00
|
|
|
//Slic3r::GUI::Tab::Filament;
|
2018-01-05 14:11:33 +00:00
|
|
|
class TabFilament : public Tab
|
2017-12-22 10:50:28 +00:00
|
|
|
{
|
2018-01-15 11:13:05 +00:00
|
|
|
ogStaticText* m_volumetric_speed_description_line;
|
|
|
|
ogStaticText* m_cooling_description_line;
|
2017-12-22 10:50:28 +00:00
|
|
|
public:
|
2018-01-05 14:11:33 +00:00
|
|
|
TabFilament() {}
|
2018-01-26 00:44:34 +00:00
|
|
|
TabFilament(wxNotebook* parent, bool no_controller) :
|
2018-02-23 08:16:35 +00:00
|
|
|
Tab(parent, _(L("Filament Settings")), "filament", no_controller) {}
|
2018-01-05 14:11:33 +00:00
|
|
|
~TabFilament(){}
|
2017-12-22 10:50:28 +00:00
|
|
|
|
2018-01-03 09:12:42 +00:00
|
|
|
void build() override;
|
2018-01-12 11:41:13 +00:00
|
|
|
void reload_config() override;
|
|
|
|
void update() override;
|
|
|
|
void OnActivate() override;
|
2017-12-22 10:50:28 +00:00
|
|
|
};
|
|
|
|
|
2017-12-26 22:04:54 +00:00
|
|
|
//Slic3r::GUI::Tab::Printer;
|
2018-01-05 14:11:33 +00:00
|
|
|
class TabPrinter : public Tab
|
2017-12-22 10:50:28 +00:00
|
|
|
{
|
|
|
|
public:
|
2018-01-12 16:16:59 +00:00
|
|
|
wxButton* m_serial_test_btn;
|
|
|
|
wxButton* m_octoprint_host_test_btn;
|
2018-01-02 11:50:27 +00:00
|
|
|
|
|
|
|
size_t m_extruders_count;
|
2018-04-18 11:32:21 +00:00
|
|
|
size_t m_extruders_count_old = 0;
|
2018-03-07 14:05:41 +00:00
|
|
|
size_t m_initial_extruders_count;
|
2018-03-19 16:21:37 +00:00
|
|
|
size_t m_sys_extruders_count;
|
2018-01-02 11:50:27 +00:00
|
|
|
|
2018-01-05 14:11:33 +00:00
|
|
|
TabPrinter() {}
|
2018-03-15 17:06:26 +00:00
|
|
|
TabPrinter(wxNotebook* parent, bool no_controller) : Tab(parent, _(L("Printer Settings")), "printer", no_controller) {}
|
2018-01-05 14:11:33 +00:00
|
|
|
~TabPrinter(){}
|
2017-12-22 10:50:28 +00:00
|
|
|
|
2018-01-03 09:12:42 +00:00
|
|
|
void build() override;
|
2018-01-12 16:16:59 +00:00
|
|
|
void update() override;
|
|
|
|
void update_serial_ports();
|
|
|
|
void extruders_count_changed(size_t extruders_count);
|
2018-01-03 09:12:42 +00:00
|
|
|
void build_extruder_pages();
|
2018-01-16 15:28:01 +00:00
|
|
|
void on_preset_loaded() override;
|
2018-04-18 11:32:21 +00:00
|
|
|
void init_options_list() override;
|
2017-12-22 10:50:28 +00:00
|
|
|
};
|
|
|
|
|
2018-01-18 10:45:25 +00:00
|
|
|
class SavePresetWindow :public wxDialog
|
|
|
|
{
|
|
|
|
public:
|
2018-02-23 08:16:35 +00:00
|
|
|
SavePresetWindow(wxWindow* parent) :wxDialog(parent, wxID_ANY, _(L("Save preset"))){}
|
2018-01-18 10:45:25 +00:00
|
|
|
~SavePresetWindow(){}
|
|
|
|
|
|
|
|
std::string m_chosen_name;
|
|
|
|
wxComboBox* m_combo;
|
|
|
|
|
2018-04-13 10:35:04 +00:00
|
|
|
void build(const wxString& title, const std::string& default_name, std::vector<std::string> &values);
|
2018-01-18 10:45:25 +00:00
|
|
|
void accept();
|
|
|
|
std::string get_name() { return m_chosen_name; }
|
|
|
|
};
|
|
|
|
|
2017-12-05 14:54:01 +00:00
|
|
|
} // GUI
|
|
|
|
} // Slic3r
|
2018-04-20 10:58:07 +00:00
|
|
|
|
|
|
|
#endif /* slic3r_Tab_hpp_ */
|