mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-03 20:20:40 +08:00
Fleshed out a StartBusy() function and moved Run to be public.
Also added functional as a header.
This commit is contained in:
parent
5b13c5a134
commit
4bf2a7d3dc
@ -5,6 +5,7 @@
|
||||
#include <wx/timer.h>
|
||||
#include <wx/gauge.h>
|
||||
#include <wx/button.h>
|
||||
#include <functional>
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
@ -42,10 +43,14 @@ public:
|
||||
|
||||
void SetRange(int range) { if (range != this->prog->GetRange() ) this->prog->SetRange(range);}
|
||||
|
||||
/// Start the timer.
|
||||
void Run(int rate = 100) { if (this->timer->IsRunning()) this->timer->Start(rate);};
|
||||
|
||||
void StartBusy(int rate = 100) { this->busy = true; this->ShowProgress(true); if (!this->timer->IsRunning()) this->timer->Start(rate); }
|
||||
|
||||
private:
|
||||
void OnSize(wxSizeEvent& e);
|
||||
void OnTimer(wxTimerEvent& e);
|
||||
void Run(int rate = 100) { if (this->timer->IsRunning()) this->timer->Start(rate);};
|
||||
|
||||
// Cancel callback function
|
||||
std::function<void()> cancel_cb {[](){;}};
|
||||
|
Loading…
x
Reference in New Issue
Block a user