equal
deleted
inserted
replaced
|
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 |