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

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/slic3r/GUI/wxExtensions.cpp')
-rw-r--r--src/slic3r/GUI/wxExtensions.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/slic3r/GUI/wxExtensions.cpp b/src/slic3r/GUI/wxExtensions.cpp
index c9f1de168..2402347f8 100644
--- a/src/slic3r/GUI/wxExtensions.cpp
+++ b/src/slic3r/GUI/wxExtensions.cpp
@@ -942,5 +942,40 @@ void ScalableButton::msw_rescale()
}
+// ----------------------------------------------------------------------------
+// BlinkingBitmap
+// ----------------------------------------------------------------------------
+
+BlinkingBitmap::BlinkingBitmap(wxWindow* parent, const std::string& icon_name) :
+ wxStaticBitmap(parent, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize(int(1.6 * Slic3r::GUI::wxGetApp().em_unit()), -1))
+{
+ bmp = ScalableBitmap(parent, icon_name);
+}
+
+void BlinkingBitmap::msw_rescale()
+{
+ bmp.msw_rescale();
+ this->SetSize(bmp.GetBmpSize());
+ this->SetMinSize(bmp.GetBmpSize());
+}
+
+void BlinkingBitmap::invalidate()
+{
+ this->SetBitmap(wxNullBitmap);
+}
+
+void BlinkingBitmap::activate()
+{
+ this->SetBitmap(bmp.bmp());
+ show = true;
+}
+
+void BlinkingBitmap::blink()
+{
+ show = !show;
+ this->SetBitmap(show ? bmp.bmp() : wxNullBitmap);
+}
+
+