*/
+#ifndef __ardour_progress_h__
+#define __ardour_progress_h__
+
#include <list>
+#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 ();
void ascend ();
void descend (float);
+ bool cancelled () const;
+
+protected:
+ void cancel ();
+
private:
/** Report overall progress.
* @param p Current progress (from 0 to 1)
struct Level {
Level (float a) : allocation (a), normalised (0) {}
-
+
float allocation;
float normalised;
};
std::list<Level> _stack;
+ bool _cancelled;
};
}
+
+#endif