namespace ARDOUR {
-/** A class to handle reporting of progress of something */
+/** A class to handle reporting of progress of something */
class Progress
{
public:
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;
};
}