diff options
author | YuSanka <yusanka@gmail.com> | 2019-09-25 12:25:05 +0300 |
---|---|---|
committer | YuSanka <yusanka@gmail.com> | 2019-09-25 12:25:05 +0300 |
commit | 6faf67d90cdb31f05758cf12f68a97ad1b01c607 (patch) | |
tree | 839cfb49e7604616e46a5d0ab4b0a6a63bc344f5 /src/slic3r/GUI/GUI_ObjectManipulation.hpp | |
parent | d90a27d5f8fc5841fbad8b997491bd2564325da8 (diff) |
Add binding for ManipulationEditors
Diffstat (limited to 'src/slic3r/GUI/GUI_ObjectManipulation.hpp')
-rw-r--r-- | src/slic3r/GUI/GUI_ObjectManipulation.hpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/slic3r/GUI/GUI_ObjectManipulation.hpp b/src/slic3r/GUI/GUI_ObjectManipulation.hpp index 8ef6ca263..d0fe33dab 100644 --- a/src/slic3r/GUI/GUI_ObjectManipulation.hpp +++ b/src/slic3r/GUI/GUI_ObjectManipulation.hpp @@ -16,6 +16,28 @@ namespace GUI { class Selection; +class ObjectManipulation; +class ManipulationEditor : public wxTextCtrl +{ + std::string m_opt_key; + int m_axis; + bool m_enter_pressed { false }; + wxString m_valid_value {wxEmptyString}; + + std::string m_full_opt_name; + +public: + ManipulationEditor(ObjectManipulation* parent, const std::string& opt_key, int axis); + ~ManipulationEditor() {} + + void msw_rescale(); + void set_value(const wxString& new_value); + +private: + double get_value(); +}; + + class ObjectManipulation : public OG_Settings { struct Cache @@ -101,7 +123,8 @@ class ObjectManipulation : public OG_Settings wxFlexGridSizer* m_main_grid_sizer; wxFlexGridSizer* m_labels_grid_sizer; - wxFlexGridSizer* m_editors_grid_sizer; + + std::vector<ManipulationEditor*> m_editors; public: ObjectManipulation(wxWindow* parent); @@ -132,6 +155,7 @@ public: void update_item_name(const wxString &item_name); void update_warning_icon_state(const wxString& tooltip); void msw_rescale(); + void on_change(const std::string& opt_key, int axis, double new_value); private: void reset_settings_value(); |