Cancellation of parameter page build process.

This commit is contained in:
bubnikv 2020-09-29 13:36:56 +02:00
parent ec8602f8d9
commit b15023dfa9
4 changed files with 116 additions and 64 deletions

View file

@ -24,6 +24,9 @@
namespace Slic3r { namespace GUI {
// Thrown if the building of a parameter page is canceled.
class UIBuildCanceled : public std::exception {};
/// Widget type describes a function object that returns a wxWindow (our widget) and accepts a wxWidget (parent window).
using widget_t = std::function<wxSizer*(wxWindow*)>;//!std::function<wxWindow*(wxWindow*)>;
@ -124,7 +127,7 @@ public:
void activate_line(Line& line);
// create all controls for the option group from the m_lines
bool activate();
bool activate(std::function<void()> throw_if_canceled = [](){});
// delete all controls from the option group
void clear();