src/Graphics/View.hh
branchnew_graphics
changeset 410 41fd46cffc52
child 411 106aaf6eadfe
equal deleted inserted replaced
409:1a03ff151abc 410:41fd46cffc52
       
     1 #ifndef GRAPHICS_VIEW_HH
       
     2 #define GRAPHICS_VIEW_HH
       
     3 
       
     4 #include "../Types.hh"
       
     5 
       
     6 namespace graphics
       
     7 {
       
     8 
       
     9 /**
       
    10  * A view is some area of the display that displays something
       
    11  */
       
    12 class View : public Drawable {
       
    13 protected:
       
    14     /**
       
    15      * The area of the screen that is ours to draw on
       
    16      */
       
    17     PixelArea area;
       
    18 
       
    19 public:
       
    20     /**
       
    21      * Set the initial area that is drawn into
       
    22      */
       
    23     View (const PixelArea &area) :
       
    24         area(area)
       
    25     {
       
    26 
       
    27     }
       
    28 
       
    29     /**
       
    30      * Update the view area
       
    31      */
       
    32     void updateArea (const PixelArea &area) {
       
    33         this->area = area;
       
    34     }
       
    35 };
       
    36 
       
    37 }
       
    38 
       
    39 #endif