diff options
author | YuSanka <yusanka@gmail.com> | 2021-12-22 16:38:23 +0300 |
---|---|---|
committer | YuSanka <yusanka@gmail.com> | 2021-12-22 16:38:23 +0300 |
commit | f2aeca3a716d8d3d4233be321cddcf463c1bf21f (patch) | |
tree | 445b819c8a4eaa68dd10dae415e5dd15a9430533 /src/slic3r/GUI/wxExtensions.hpp | |
parent | 1fe4ba289bf68a7e4ceb575b5e63194441bc1bfa (diff) |
Options from the "Preferences" dialog added to the Search
Some code refactoring:
* use GUI_App::open_preferences() on all places where it's needed
* Preferences Dialog is an attribute of a ManeFrame class and created just ones during the MainFrame creation now.
* Created class Highlighter. Use it in Preferences and Tab
Diffstat (limited to 'src/slic3r/GUI/wxExtensions.hpp')
-rw-r--r-- | src/slic3r/GUI/wxExtensions.hpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/slic3r/GUI/wxExtensions.hpp b/src/slic3r/GUI/wxExtensions.hpp index f78621a5c..5478c244e 100644 --- a/src/slic3r/GUI/wxExtensions.hpp +++ b/src/slic3r/GUI/wxExtensions.hpp @@ -374,6 +374,34 @@ private: bool show {false}; }; +// ---------------------------------------------------------------------------- +// Highlighter +// ---------------------------------------------------------------------------- + +namespace Slic3r { +namespace GUI { + +class OG_CustomCtrl; +class Highlighter +{ + OG_CustomCtrl* m_custom_ctrl{ nullptr }; + bool* m_show_blink_ptr{ nullptr }; + BlinkingBitmap* m_blinking_bitmap{ nullptr }; + + int m_blink_counter{ 0 }; + wxTimer m_timer; + +public: + void set_timer_owner(wxEvtHandler* owner, int timerid = wxID_ANY); + void init(std::pair<OG_CustomCtrl*, bool*>); + void init(BlinkingBitmap* blinking_bitmap); + void blink(); + void invalidate(); +}; + +} // GUI +} // Slic3r + #endif // slic3r_GUI_wxExtensions_hpp_ |