HOG2
TextOverlay.h
Go to the documentation of this file.
1 /*
2  * TextOverlay.h
3  *
4  * Created by Nathan Sturtevant on 7/15/07.
5  * Copyright 2007 Nathan Sturtevant, University of Alberta. All rights reserved.
6  *
7  */
8 
9 #ifndef TEXTOVERLAY_H
10 #define TEXTOVERLAY_H
11 
12 #include <vector>
13 #include <string>
14 #include "Graphics.h"
15 
16 class TextOverlay {
17 public:
18  TextOverlay(int maxLines = 34);
19  ~TextOverlay();
20  void SetBold(bool useBold);
21  void AddLine(const char *);
22  void DeleteChar();
23  void AppendToLine(const char *);
24  const char *GetLastLine();
25  void Clear();
26  void OpenGLDraw(int window);
27  void Draw(Graphics::Display &display) const;
28 private:
29  int DrawString(std::string, int start = 0);
30  std::vector<std::string> text;
31  int index;
33  bool bold;
34 };
35 
36 #endif
TextOverlay::OpenGLDraw
void OpenGLDraw(int window)
Definition: TextOverlay.cpp:75
TextOverlay::AppendToLine
void AppendToLine(const char *)
Definition: TextOverlay.cpp:60
TextOverlay::maxNumLines
int maxNumLines
Definition: TextOverlay.h:32
TextOverlay::text
std::vector< std::string > text
Definition: TextOverlay.h:30
TextOverlay::Clear
void Clear()
Definition: TextOverlay.cpp:69
TextOverlay::TextOverlay
TextOverlay(int maxLines=34)
Definition: TextOverlay.cpp:16
Graphics::Display
Definition: Graphics.h:146
TextOverlay::AddLine
void AddLine(const char *)
Definition: TextOverlay.cpp:37
TextOverlay::bold
bool bold
Definition: TextOverlay.h:33
TextOverlay::DeleteChar
void DeleteChar()
Definition: TextOverlay.cpp:54
TextOverlay
Definition: TextOverlay.h:16
TextOverlay::GetLastLine
const char * GetLastLine()
Definition: TextOverlay.cpp:47
Graphics.h
TextOverlay::~TextOverlay
~TextOverlay()
Definition: TextOverlay.cpp:23
TextOverlay::DrawString
int DrawString(std::string, int start=0)
Definition: TextOverlay.cpp:166
TextOverlay::SetBold
void SetBold(bool useBold)
Definition: TextOverlay.cpp:32
TextOverlay::index
int index
Definition: TextOverlay.h:31
TextOverlay::Draw
void Draw(Graphics::Display &display) const
Definition: TextOverlay.cpp:149