equal
deleted
inserted
replaced
1 #ifndef GRAPHICS_VIEW_HH |
1 #ifndef GRAPHICS_VIEW_HH |
2 #define GRAPHICS_VIEW_HH |
2 #define GRAPHICS_VIEW_HH |
3 |
3 |
|
4 namespace graphics |
|
5 { |
|
6 |
|
7 class View; |
|
8 |
|
9 } |
|
10 |
4 #include "Drawable.hh" |
11 #include "Drawable.hh" |
|
12 #include "Display.hh" |
5 #include "../Types.hh" |
13 #include "../Types.hh" |
6 |
14 |
7 namespace graphics |
15 namespace graphics |
8 { |
16 { |
9 |
17 |
10 /** |
18 /** |
11 * A view is some area of the display that displays something |
19 * A view is some area of the display that displays something |
12 */ |
20 */ |
13 class View : public Drawable { |
21 class View /* : public Drawable */ { |
14 protected: |
22 protected: |
15 /** |
23 /** |
16 * The area of the screen that is ours to draw on |
24 * The area of the screen that is ours to draw on |
17 */ |
25 */ |
18 PixelArea area; |
26 PixelArea area; |
24 View (const PixelArea &area) : |
32 View (const PixelArea &area) : |
25 area(area) |
33 area(area) |
26 { |
34 { |
27 |
35 |
28 } |
36 } |
|
37 |
|
38 /** |
|
39 * Draw into the view area |
|
40 */ |
|
41 virtual void draw (Display &display) = 0; |
29 |
42 |
30 /** |
43 /** |
31 * Update the view area |
44 * Update the view area |
32 */ |
45 */ |
33 virtual void resize (const PixelArea &new_area) { |
46 virtual void resize (const PixelArea &new_area) { |