tagging release
[dasher.git] / Src / DasherCore / View / DelayedDraw.h
blob359a3d217bba75295281abf48cb212f2dc468dcd
1 // DelayedDraw.h
2 //
3 /////////////////////////////////////////////////////////////////////////////
4 //
5 // Copyright (c) 2005 David Ward
6 //
7 /////////////////////////////////////////////////////////////////////////////
9 #ifndef __View_DelayedDraw_h_
10 #define __View_DelayedDraw_h_
12 #include "../DasherTypes.h"
14 namespace Dasher {
15 class CDasherScreen;
18 class Dasher::CDasherScreen;
20 namespace Dasher {
21 /// \ingroup View
22 /// @{
24 /// Class for delayed draw events
25 /// Useful for rendering the text on top of the nodes without using
26 /// 2 buffers or 2 passes of the model
27 class CDelayedDraw {
28 public:
29 //! DelayDraw string String of size Size positioned at x1 and y1
30 void DelayDrawText(const std::string & String, screenint x1, screenint y1, int Size);
32 //! Draw all DelayDraw events
33 void Draw(CDasherScreen * screen);
35 private:
37 class CTextSymbol {
38 public:
39 CTextSymbol(symbol Character, screenint x, screenint y, int iSize)
40 : m_Character(Character), m_x(x), m_y(y), m_iSize(iSize) {
41 } symbol m_Character;
42 screenint m_x;
43 screenint m_y;
44 int m_iSize;
47 class CTextString {
48 public:
49 CTextString(const std::string & str, screenint x, screenint y, int iSize)
50 : m_String(str), m_x(x), m_y(y), m_iSize(iSize) {
51 } std::string m_String;
52 screenint m_x;
53 screenint m_y;
54 int m_iSize;
57 std::vector < CTextSymbol > m_DrawTextSymbol;
58 std::vector < CTextString > m_DrawTextString;
60 /// @}
63 #endif