+ /** Base class for the GUI implementation.
+ It must be public so that C callback functions can access its
+ daughter classes.
+ */
+ class Impl
+ {
+ public:
+ ///
+ Impl(Timeout & owner) : owner_(owner) {}
+ ///
+ virtual ~Impl() {}
+ /// Is the timer running?
+ virtual bool running() const = 0;
+ /// start the timer
+ virtual void start() = 0;
+ /// stop the timer
+ virtual void stop() = 0;
+ /// reset
+ virtual void reset() = 0;
+
+ protected:
+ ///
+ void emit() { owner_.emit(); }
+ ///
+ unsigned int timeout_ms() const { return owner_.timeout_ms; }
+
+ private:
+ ///
+ Timeout & owner_;
+ };