00001 #ifndef VIEW_COMPONENT_H 00002 #define VIEW_COMPONENT_H 00003 00013 #include "basicDraw.h" 00014 00015 00021 class ViewComponent : public ComponentInterface { 00022 std::list<BasicDrawInterface*> objs; 00023 double draw_magnify; 00024 VXV::Rect draw_range; 00025 ViewComponent(void); 00026 00027 public: 00034 ViewComponent(const VXV::Rect& range, double magnify = 1.0f); 00035 virtual ~ViewComponent(void); 00036 bool draw(unsigned long ticks, const UserInput& ui); 00037 00043 ViewComponent& updateMagnify(double magnify); 00044 00051 ViewComponent& setViewToRangeGrid(const VXV::Grid& view_grid, 00052 const VXV::Grid& range_grid); 00053 00059 ViewComponent& updateViewPosition(const VXV::Grid& pos); 00060 00066 ViewComponent& updateViewSize(const VXV::Rect& size); 00067 00071 ViewComponent& clear(void); 00072 00078 ViewComponent& add(BasicDrawInterface* obj); 00079 00085 void del(BasicDrawInterface* obj); 00086 }; 00087 00088 #endif /* !VIEW_COMPONENT_H */ 00089