- void setTimestep(Scalar ts);
- Scalar getTimestep() const;
- void setMaxFrameRate(long maxFps);
- long getMaxFrameRate() const;
-
- Video& getVideo() const;
- long getFrameRate() const;
-
- void push(LayerP layer);
- LayerP pop();
- // pops a specific layer and all layers above it
- LayerP pop(Layer* layer);
- void clear();
-
- struct Exception : public Mf::Exception
- {
- explicit Exception(unsigned error) :
- Mf::Exception(error) {}
-
- void raise()
- {
- throw *this;
- }
- };
+ Dispatch::Handler addHandler(const std::string& event,
+ const Dispatch::Function& callback);
+ Dispatch::Handler addHandler(const std::string& event,
+ const Dispatch::Function& callback, Dispatch::Handler handler);
+
+ void dispatch(const std::string& event,
+ const Dispatch::Message* message = 0);
+
+private:
+
+ class Impl;
+ boost::shared_ptr<Impl> mImpl;