Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
DisplayView.h
Go to the documentation of this file.
1 /* Project Starshatter 4.5
2  Destroyer Studios LLC
3  Copyright © 1997-2004. All Rights Reserved.
4 
5  SUBSYSTEM: Stars.exe
6  FILE: DisplayView.h
7  AUTHOR: John DiCamillo
8 
9 
10  OVERVIEW
11  ========
12  View class for Radio Communications HUD Overlay
13 */
14 
15 #ifndef DisplayView_h
16 #define DisplayView_h
17 
18 #include "Types.h"
19 #include "View.h"
20 #include "SimObject.h"
21 #include "Color.h"
22 #include "Text.h"
23 
24 // +--------------------------------------------------------------------+
25 
26 class Bitmap;
27 class DisplayElement;
28 class Font;
29 
30 // +--------------------------------------------------------------------+
31 
32 class DisplayView : public View
33 {
34 public:
35  DisplayView(Window* c);
36  virtual ~DisplayView();
37 
38  // Operations:
39  virtual void Refresh();
40  virtual void OnWindowMove();
41  virtual void ExecFrame();
42  virtual void ClearDisplay();
43 
44  virtual void AddText(const char* txt,
45  Font* font,
46  Color color,
47  const Rect& rect,
48  double hold = 1e9,
49  double fade_in = 0,
50  double fade_out = 0);
51 
52  virtual void AddImage(Bitmap* bmp,
53  Color color,
54  int blend,
55  const Rect& rect,
56  double hold = 1e9,
57  double fade_in = 0,
58  double fade_out = 0);
59 
60  static DisplayView* GetInstance();
61 
62 protected:
63  int width, height;
64  double xcenter, ycenter;
65 
68 };
69 
70 #endif DisplayView_h
71