fshake3d  0.0.1
FreeformDensity3DSurfaceEditor
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
ui_View.hpp
Go to the documentation of this file.
00001 #ifndef UI_VIEW_HPP
00002 #define UI_VIEW_HPP
00003 
00004 #include "opengl.hpp"
00005 #include "ui_Event.hpp"
00006 
00007 class Window;
00008 
00009 class View : public EventTarget
00010 {
00011 public:
00012   View();
00013   void setParent(View* pParent);
00014   virtual void reshape(int w, int h);
00015   virtual void setViewport(const Vec4i& vp);
00016   const int& width()  const;
00017   const int& height() const;
00018 
00019   void setBGColor(const Vec3d& color);
00020 
00021   virtual void display();
00022   // user input
00023 
00024   virtual void mouse(int button, int state, int x, int y);
00025   virtual void motion(int x, int y);
00026 
00027   virtual void onEvent(Event& e);
00028 
00029   virtual Window* getWindow();
00030 
00031 protected:
00032   void drawClearRect();
00041   void setupProjectionOrthoNormal();
00042 // public:
00043   void setupTransformationNormal();
00052   void setupTransformationScreen();
00053   void setupViewport();
00054 protected:
00055   virtual void setupTransformation();
00056   Vec4i mViewport;
00057   Vec3d mBGColor;
00058   View* mpParent;
00059 };
00060 
00061 #endif // UI_VIEW_HPP