Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuSanka <yusanka@gmail.com>2019-04-25 02:45:00 +0300
committerYuSanka <yusanka@gmail.com>2019-04-25 02:45:00 +0300
commit065448e9e5f63f412ac59c8fbbea560f2cccf77e (patch)
tree03dc97265e1f4f750f12e0f6b7cf1e5b37399ed7 /src/slic3r/GUI/Tab.hpp
parentbe60f0a53c6da7121d99a5a2bfaa58519ebf4c8d (diff)
Big Refactoring: - deleted/renamed all _Prusa_ prefixes,
- cleaned code from commented parts - rescale() -> msw_rescale()
Diffstat (limited to 'src/slic3r/GUI/Tab.hpp')
-rw-r--r--src/slic3r/GUI/Tab.hpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/slic3r/GUI/Tab.hpp b/src/slic3r/GUI/Tab.hpp
index 0e0e0ad5e..ae13cb4b5 100644
--- a/src/slic3r/GUI/Tab.hpp
+++ b/src/slic3r/GUI/Tab.hpp
@@ -36,8 +36,8 @@ namespace Slic3r {
namespace GUI {
-typedef std::pair</*wxBitmap*/PrusaBitmap*, std::string> t_icon_description;
-typedef std::vector<std::pair</*wxBitmap*/PrusaBitmap*, std::string>> t_icon_descriptions;
+typedef std::pair<ScalableBitmap*, std::string> t_icon_description;
+typedef std::vector<std::pair<ScalableBitmap*, std::string>> t_icon_descriptions;
// Single Tab page containing a{ vsizer } of{ optgroups }
// package Slic3r::GUI::Tab::Page;
@@ -50,7 +50,7 @@ class Page : public wxScrolledWindow
wxBoxSizer* m_vsizer;
bool m_show = true;
public:
- Page(wxWindow* parent, const wxString title, const int iconID, const std::vector<PrusaBitmap>& mode_bmp_cache) :
+ Page(wxWindow* parent, const wxString title, const int iconID, const std::vector<ScalableBitmap>& mode_bmp_cache) :
m_parent(parent),
m_title(title),
m_iconID(iconID),
@@ -68,7 +68,7 @@ public:
// Delayed layout after resizing the main window.
bool layout_valid = false;
- const std::vector<PrusaBitmap>& m_mode_bitmap_cache;
+ const std::vector<ScalableBitmap>& m_mode_bitmap_cache;
public:
std::vector <ConfigOptionsGroupShp> m_optgroups;
@@ -81,7 +81,7 @@ public:
void set_config(DynamicPrintConfig* config_in) { m_config = config_in; }
void reload_config();
void update_visibility(ConfigOptionMode mode);
- void rescale();
+ void msw_rescale();
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);
@@ -122,20 +122,20 @@ protected:
std::string m_name;
const wxString m_title;
wxBitmapComboBox* m_presets_choice;
- /*wxBitmap*/PrusaButton* m_btn_save_preset;
- /*wxBitmap*/PrusaButton* m_btn_delete_preset;
- /*wxBitmap*/PrusaButton* m_btn_hide_incompatible_presets;
+ ScalableButton* m_btn_save_preset;
+ ScalableButton* m_btn_delete_preset;
+ ScalableButton* m_btn_hide_incompatible_presets;
wxBoxSizer* m_hsizer;
wxBoxSizer* m_left_sizer;
wxTreeCtrl* m_treectrl;
wxImageList* m_icons;
- PrusaModeSizer* m_mode_sizer;
+ ModeSizer* m_mode_sizer;
struct PresetDependencies {
Preset::Type type = Preset::TYPE_INVALID;
wxCheckBox *checkbox = nullptr;
- /*wxButton*/PrusaButton *btn = nullptr;
+ ScalableButton *btn = nullptr;
std::string key_list; // "compatible_printers"
std::string key_condition;
std::string dialog_title;
@@ -144,27 +144,27 @@ protected:
PresetDependencies m_compatible_printers;
PresetDependencies m_compatible_prints;
- /*wxButton*/PrusaButton* m_undo_btn;
- /*wxButton*/PrusaButton* m_undo_to_sys_btn;
- /*wxButton*/PrusaButton* m_question_btn;
+ ScalableButton* m_undo_btn;
+ ScalableButton* m_undo_to_sys_btn;
+ ScalableButton* m_question_btn;
// Cached bitmaps.
// A "flag" icon to be displayned next to the preset name in the Tab's combo box.
- /*wxBitmap*/PrusaBitmap m_bmp_show_incompatible_presets;
- /*wxBitmap*/PrusaBitmap m_bmp_hide_incompatible_presets;
+ ScalableBitmap m_bmp_show_incompatible_presets;
+ ScalableBitmap 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*/PrusaBitmap m_bmp_value_lock;
- /*wxBitmap*/PrusaBitmap m_bmp_value_unlock;
- /*wxBitmap*/PrusaBitmap m_bmp_white_bullet;
+ ScalableBitmap m_bmp_value_lock;
+ ScalableBitmap m_bmp_value_unlock;
+ ScalableBitmap 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*/PrusaBitmap *m_bmp_non_system;
+ ScalableBitmap *m_bmp_non_system;
// Bitmaps to be shown on the "Undo user changes" button next to each input field.
- /*wxBitmap*/PrusaBitmap m_bmp_value_revert;
+ ScalableBitmap m_bmp_value_revert;
- std::vector<PrusaButton*> m_scaled_buttons = {};
- std::vector<PrusaBitmap*> m_scaled_bitmaps = {};
- std::vector<PrusaBitmap> m_scaled_icons_list = {};
- std::vector<PrusaBitmap> m_mode_bitmap_cache = {};
+ std::vector<ScalableButton*> m_scaled_buttons = {};
+ std::vector<ScalableBitmap*> m_scaled_bitmaps = {};
+ std::vector<ScalableBitmap> m_scaled_icons_list = {};
+ std::vector<ScalableBitmap> m_mode_bitmap_cache = {};
// Colors for ui "decoration"
wxColour m_sys_label_clr;
@@ -241,10 +241,10 @@ public:
virtual bool supports_printer_technology(const PrinterTechnology tech) = 0;
void create_preset_tab();
- void add_scaled_button(wxWindow* parent, PrusaButton** btn, const std::string& icon_name,
+ void add_scaled_button(wxWindow* parent, ScalableButton** btn, const std::string& icon_name,
const wxString& label = wxEmptyString,
long style = wxBU_EXACTFIT | wxNO_BORDER);
- void add_scaled_bitmap(wxWindow* parent, PrusaBitmap& btn, const std::string& icon_name);
+ void add_scaled_bitmap(wxWindow* parent, ScalableBitmap& btn, const std::string& icon_name);
void load_current_preset();
void rebuild_page_tree();
void update_page_tree_visibility();
@@ -283,7 +283,7 @@ public:
virtual void reload_config();
void update_mode();
void update_visibility();
- void rescale();
+ void msw_rescale();
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);
wxSizer* description_line_widget(wxWindow* parent, ogStaticText** StaticText);
@@ -355,8 +355,8 @@ class TabPrinter : public Tab
void build_printhost(ConfigOptionsGroup *optgroup);
public:
wxButton* m_serial_test_btn = nullptr;
- /*wxButton*/PrusaButton* m_print_host_test_btn = nullptr;
- /*wxButton*/PrusaButton* m_printhost_browse_btn = nullptr;
+ ScalableButton* m_print_host_test_btn = nullptr;
+ ScalableButton* m_printhost_browse_btn = nullptr;
size_t m_extruders_count;
size_t m_extruders_count_old = 0;