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-10-09 10:28:50 +0300
committerYuSanka <yusanka@gmail.com>2019-10-09 10:28:50 +0300
commit8cdcac6ad86a9186df489705aca1a18787ac89ea (patch)
tree7c2ff5887595384220f56e72138bb0bc052935cf /src/slic3r/GUI/wxExtensions.hpp
parent47a8b49f8bbb6765a9fd0ab4c2b3238884e9ed52 (diff)
First implementations for an extension of color change feature :
Added context menu for "plus" button on DoubleSlider
Diffstat (limited to 'src/slic3r/GUI/wxExtensions.hpp')
-rw-r--r--src/slic3r/GUI/wxExtensions.hpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/slic3r/GUI/wxExtensions.hpp b/src/slic3r/GUI/wxExtensions.hpp
index d4d5e7998..123dc3afa 100644
--- a/src/slic3r/GUI/wxExtensions.hpp
+++ b/src/slic3r/GUI/wxExtensions.hpp
@@ -821,6 +821,7 @@ public:
void OnChar(wxKeyEvent &event);
void OnRightDown(wxMouseEvent& event);
void OnRightUp(wxMouseEvent& event);
+ void add_code(std::string code);
protected:
@@ -884,6 +885,7 @@ private:
bool m_is_action_icon_focesed = false;
bool m_is_one_layer_icon_focesed = false;
bool m_is_enabled_tick_manipulation = true;
+ bool m_show_context_menu = false;
wxRect m_rect_lower_thumb;
wxRect m_rect_higher_thumb;
@@ -912,6 +914,25 @@ private:
std::vector<wxPen*> m_segm_pens;
std::set<int> m_ticks;
std::vector<double> m_values;
+
+ struct TICK_CODE
+ {
+ TICK_CODE(int tick):tick(tick), gcode("M600"), extruder(0) {}
+ TICK_CODE(int tick, const std::string& code) :
+ tick(tick), gcode(code), extruder(0) {}
+ TICK_CODE(int tick, int extruder) :
+ tick(tick), gcode("M600"), extruder(extruder) {}
+ TICK_CODE(int tick, const std::string& code, int extruder) :
+ tick(tick), gcode(code), extruder(extruder) {}
+
+ bool operator<(const TICK_CODE& other) const { return other.tick > this->tick; }
+
+ int tick;
+ std::string gcode;
+ int extruder;
+ };
+
+ std::set<TICK_CODE> m_ticks_;
};