X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fprogress.h;h=79043a31eef3549c963deffe9735f0204cc6ebca;hb=6bd583803ea1daf19a1c088766122b5cdf340171;hp=891af22059476e2a401175d84a56ca2bfca86c84;hpb=ac34829f3b46c7f7ded7f2b2164ae37d1b8bf8ab;p=ardour.git diff --git a/libs/ardour/ardour/progress.h b/libs/ardour/ardour/progress.h index 891af22059..79043a31ee 100644 --- a/libs/ardour/ardour/progress.h +++ b/libs/ardour/ardour/progress.h @@ -17,12 +17,17 @@ */ +#ifndef __ardour_progress_h__ +#define __ardour_progress_h__ + #include +#include "ardour/libardour_visibility.h" + namespace ARDOUR { -/** A class to handle reporting of progress of something */ -class Progress +/** A class to handle reporting of progress of something */ +class LIBARDOUR_API Progress { public: Progress (); @@ -32,6 +37,11 @@ public: void ascend (); void descend (float); + bool cancelled () const; + +protected: + void cancel (); + private: /** Report overall progress. * @param p Current progress (from 0 to 1) @@ -40,12 +50,15 @@ private: struct Level { Level (float a) : allocation (a), normalised (0) {} - + float allocation; float normalised; }; std::list _stack; + bool _cancelled; }; } + +#endif