22 #ifndef GtkCRNProgressWindow_HEADER
23 #define GtkCRNProgressWindow_HEADER
25 #include <libgtkcrnmm_config.h>
38 ProgressWindow(
const Glib::ustring title, Gtk::Window *parent =
nullptr,
bool auto_close =
false);
52 void run(sigc::slot<void> func);
54 template<
typename T>
inline T
run(sigc::slot<T> func)
57 run(sigc::bind(sigc::mem_fun(
this, &ProgressWindow::wrap_run<T>), func, &retval));
65 template<
typename T>
void wrap_run(sigc::slot<T> func, T *retval)
69 bool no_close(GdkEventAny *ev);
70 void do_run(sigc::slot<void> func);
71 void wait(Glib::Thread *thread);
77 std::vector<std::shared_ptr<Progress> > progbars;
79 bool terminate_on_exception;
81 #ifdef CRN_USING_GTKMM3
88 sigc::signal<void> done;
T run(sigc::slot< T > func)
Executes a processing.
Gtk::ProgressBar & get_gtk_progressbar(size_t id)
Gets an existing progress bar widget.
sigc::signal< void > signal_done()
Signals that the progress reached 100%. Connect to void on_done().
virtual ~ProgressWindow() override
Base class for a progress display.
void set_terminate_on_exception(bool term)
Shall the application be terminated if the processing throws an exception?
A UTF32 character string class.
crn::Progress * get_crn_progress(size_t id)
Gets an existing progress bar.
Splash window with progress bars.
ProgressWindow(const Glib::ustring title, Gtk::Window *parent=nullptr, bool auto_close=false)
Constructor.
void run(sigc::slot< void > func)
Executes a processing.
size_t add_progress_bar(const crn::String &name, size_t maxcount=100)
Adds a progress bar to the window.