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

#include <TextBox.h>

Collaboration diagram for TextBox:
Collaboration graph
[legend]

Public Member Functions

 TextBox (char *text, int charLine, point3d topLeft, point3d bottomRight, double duration=4, bool deform=true, bool scrolling=false)
 
 ~TextBox ()
 
void stepTime (double amount)
 
void draw ()
 
point3d getLocation ()
 
void destroy ()
 
void setColor (rgbColor _myColor)
 

Private Member Functions

void drawLine (point3d where, int startx, int starty, int offsetx, int offsety, double scale)
 
void drawChar (char c, point3d where, double height)
 
uint32_t getBitmap (char c)
 

Private Attributes

point3d tl
 
point3d br
 
rgbColor myColor
 
char * text
 
int charLine
 
bool deform
 
bool scrolling
 
double elapsedTime
 
double duration
 
GLuint dList
 

Detailed Description

Definition at line 19 of file TextBox.h.

Constructor & Destructor Documentation

◆ TextBox()

TextBox::TextBox ( char *  text,
int  charLine,
point3d  topLeft,
point3d  bottomRight,
double  duration = 4,
bool  deform = true,
bool  scrolling = false 
)

Definition at line 15 of file TextBox.cpp.

References br, charLine, deform, dList, duration, elapsedTime, scrolling, text, and tl.

◆ ~TextBox()

TextBox::~TextBox ( )

Definition at line 29 of file TextBox.cpp.

References dList, and text.

Member Function Documentation

◆ destroy()

void TextBox::destroy ( )

Definition at line 36 of file TextBox.cpp.

References duration, and elapsedTime.

◆ draw()

void TextBox::draw ( )

Definition at line 46 of file TextBox.cpp.

References rgbColor::b, br, charLine, deform, dList, drawChar(), elapsedTime, rgbColor::g, myColor, point3d, rgbColor::r, scrolling, text, and tl.

Referenced by drawGL().

◆ drawChar()

void TextBox::drawChar ( char  c,
point3d  where,
double  height 
)
private

Definition at line 158 of file TextBox.cpp.

References drawLine(), getBitmap(), and height.

Referenced by draw().

◆ drawLine()

void TextBox::drawLine ( point3d  where,
int  startx,
int  starty,
int  offsetx,
int  offsety,
double  scale 
)
private

Definition at line 374 of file TextBox.cpp.

Referenced by drawChar().

◆ getBitmap()

uint32_t TextBox::getBitmap ( char  c)
private

Definition at line 202 of file TextBox.cpp.

Referenced by drawChar().

◆ getLocation()

point3d TextBox::getLocation ( )

Definition at line 143 of file TextBox.cpp.

References tl.

◆ setColor()

void TextBox::setColor ( rgbColor  _myColor)
inline

Definition at line 27 of file TextBox.h.

References myColor.

Referenced by appendTextToBuffer(), setTextBufferVisibility(), and submitTextToBuffer().

◆ stepTime()

void TextBox::stepTime ( double  amount)

Definition at line 41 of file TextBox.cpp.

References elapsedTime.

Referenced by drawGL().

Member Data Documentation

◆ br

point3d TextBox::br
private

Definition at line 32 of file TextBox.h.

Referenced by draw(), and TextBox().

◆ charLine

int TextBox::charLine
private

Definition at line 35 of file TextBox.h.

Referenced by draw(), and TextBox().

◆ deform

bool TextBox::deform
private

Definition at line 36 of file TextBox.h.

Referenced by draw(), and TextBox().

◆ dList

GLuint TextBox::dList
private

Definition at line 39 of file TextBox.h.

Referenced by draw(), TextBox(), and ~TextBox().

◆ duration

double TextBox::duration
private

Definition at line 38 of file TextBox.h.

Referenced by destroy(), and TextBox().

◆ elapsedTime

double TextBox::elapsedTime
private

Definition at line 37 of file TextBox.h.

Referenced by destroy(), draw(), stepTime(), and TextBox().

◆ myColor

rgbColor TextBox::myColor
private

Definition at line 33 of file TextBox.h.

Referenced by draw(), and setColor().

◆ scrolling

bool TextBox::scrolling
private

Definition at line 36 of file TextBox.h.

Referenced by draw(), and TextBox().

◆ text

char* TextBox::text
private

Definition at line 34 of file TextBox.h.

Referenced by draw(), TextBox(), and ~TextBox().

◆ tl

point3d TextBox::tl
private

Definition at line 32 of file TextBox.h.

Referenced by draw(), getLocation(), and TextBox().


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