HOG2
Public Member Functions | Private Member Functions | Private Attributes | List of all members
TextOverlay Class Reference

#include <TextOverlay.h>

Public Member Functions

 TextOverlay (int maxLines=34)
 
 ~TextOverlay ()
 
void SetBold (bool useBold)
 
void AddLine (const char *)
 
void DeleteChar ()
 
void AppendToLine (const char *)
 
const char * GetLastLine ()
 
void Clear ()
 
void OpenGLDraw (int window)
 
void Draw (Graphics::Display &display) const
 

Private Member Functions

int DrawString (std::string, int start=0)
 

Private Attributes

std::vector< std::string > text
 
int index
 
int maxNumLines
 
bool bold
 

Detailed Description

Definition at line 16 of file TextOverlay.h.

Constructor & Destructor Documentation

◆ TextOverlay()

TextOverlay::TextOverlay ( int  maxLines = 34)

Definition at line 16 of file TextOverlay.cpp.

References bold, index, and maxNumLines.

◆ ~TextOverlay()

TextOverlay::~TextOverlay ( )

Definition at line 23 of file TextOverlay.cpp.

References text.

Member Function Documentation

◆ AddLine()

void TextOverlay::AddLine ( const char *  line)

Definition at line 37 of file TextOverlay.cpp.

References index, maxNumLines, and text.

◆ AppendToLine()

void TextOverlay::AppendToLine ( const char *  line)

Definition at line 60 of file TextOverlay.cpp.

References text.

◆ Clear()

void TextOverlay::Clear ( )

Definition at line 69 of file TextOverlay.cpp.

References index, and text.

◆ DeleteChar()

void TextOverlay::DeleteChar ( )

Definition at line 54 of file TextOverlay.cpp.

References text.

◆ Draw()

void TextOverlay::Draw ( Graphics::Display display) const

◆ DrawString()

int TextOverlay::DrawString ( std::string  txt,
int  start = 0 
)
private

Definition at line 166 of file TextOverlay.cpp.

Referenced by OpenGLDraw().

◆ GetLastLine()

const char * TextOverlay::GetLastLine ( )

Definition at line 47 of file TextOverlay.cpp.

References text.

◆ OpenGLDraw()

void TextOverlay::OpenGLDraw ( int  window)

Definition at line 75 of file TextOverlay.cpp.

References bold, DrawString(), index, maxNumLines, and text.

◆ SetBold()

void TextOverlay::SetBold ( bool  useBold)

Definition at line 32 of file TextOverlay.cpp.

References bold.

Member Data Documentation

◆ bold

bool TextOverlay::bold
private

Definition at line 33 of file TextOverlay.h.

Referenced by OpenGLDraw(), SetBold(), and TextOverlay().

◆ index

int TextOverlay::index
private

Definition at line 31 of file TextOverlay.h.

Referenced by AddLine(), Clear(), Draw(), OpenGLDraw(), and TextOverlay().

◆ maxNumLines

int TextOverlay::maxNumLines
private

Definition at line 32 of file TextOverlay.h.

Referenced by AddLine(), Draw(), OpenGLDraw(), and TextOverlay().

◆ text

std::vector<std::string> TextOverlay::text
private

The documentation for this class was generated from the following files: