]> Dogcows Code - chaz/yoink/blobdiff - src/moof/view.hh
the massive refactoring effort
[chaz/yoink] / src / moof / view.hh
similarity index 59%
rename from src/Moof/View.hh
rename to src/moof/view.hh
index 9fae113025a34f7cb925ccf5edef65cef9ec3a52..406c8ae98dc49a502ee8a20ca9fdfbcdc9994fde 100644 (file)
 #ifndef _MOOF_VIEW_HH_
 #define _MOOF_VIEW_HH_
 
 #ifndef _MOOF_VIEW_HH_
 #define _MOOF_VIEW_HH_
 
+/**
+ * \file view.hh
+ * Fundamental architectural classes.
+ */
+
 #include <list>
 #include <string>
 
 #include <boost/shared_ptr.hpp>
 
 #include <list>
 #include <string>
 
 #include <boost/shared_ptr.hpp>
 
-#include <Moof/Event.hh>
-#include <Moof/Math.hh>
+#include <moof/event.hh>
+#include <moof/math.hh>
 
 
 
 
-namespace Mf {
+namespace moof {
 
        
 
        
-class Settings;
-class Video;
+class settings;
+class video;
+
+class view;
+typedef boost::shared_ptr<view> view_ptr;
 
 
-class View;
-typedef boost::shared_ptr<View> ViewP;
 
 /**
  * The core is essentially a stack of layers.  While running, it updates
 
 /**
  * The core is essentially a stack of layers.  While running, it updates
@@ -38,51 +44,51 @@ typedef boost::shared_ptr<View> ViewP;
  * handled.  The core is also responsible for firing timers on time.  The
  * core will continue running as long as there are layers on the stack.
  */
  * handled.  The core is also responsible for firing timers on time.  The
  * core will continue running as long as there are layers on the stack.
  */
-
-class View
+class view
 {
 public:
 
        // loads settings: rngseed, timestep, framerate, showfps
 {
 public:
 
        // loads settings: rngseed, timestep, framerate, showfps
-       View(Settings& settings, Video& video);
-       View();
+       view(moof::settings& settings, moof::video& video);
+       view();
 
 
-       virtual ~View() {}
+       virtual ~view() {}
 
 
-       virtual void didAddToView() {}
-       virtual void willRemoveFromView() {}
+       virtual void did_add_to_view() {}
+       virtual void will_remove_from_view() {}
 
 
-       virtual void update(Scalar t, Scalar dt);
-       virtual void draw(Scalar alpha) const;
-       virtual bool handleEvent(const Event& event);
+       virtual void update(scalar t, scalar dt);
+       virtual void draw(scalar alpha) const;
+       virtual bool handle_event(const event& event);
 
 
 
 
-       void addChild(ViewP view);
-       ViewP removeChild(View* view);
-       ViewP removeChild(ViewP view);
+       void add_child(view_ptr view);
+       view_ptr remove_child(view* view);
+       view_ptr remove_child(view_ptr view);
        void clear();
 
        void clear();
 
-       View& parent() const;
-       const std::list<ViewP>& children() const;
+       view& parent() const;
+       const std::list<view_ptr>& children() const;
 
        // do not call these without adding the view to a hierarchy with a base
        // view constructed with settings and a video context
 
        // do not call these without adding the view to a hierarchy with a base
        // view constructed with settings and a video context
-       Settings& settings() const;
-       Video& video() const;
+       moof::settings& settings() const;
+       moof::video& video() const;
 
        // set this machine in motion
        void run();
        void stop();
 
        // set this machine in motion
        void run();
        void stop();
-       bool isRunning() const;
+       bool is_running() const;
+
 
 private:
 
 
 private:
 
-       class Impl;
-       boost::shared_ptr<Impl> mImpl;
+       class impl;
+       boost::shared_ptr<impl> impl_;
 };
 
 
 };
 
 
-} // namespace Mf
+} // namespace moof
 
 #endif // _MOOF_VIEW_HH_
 
 
 #endif // _MOOF_VIEW_HH_
 
This page took 0.022713 seconds and 4 git commands to generate.