HoverRace  2.0
Public Member Functions | Public Attributes | List of all members
HoverRace::Display::TypeLine Class Reference

A line of text, prepared by a TypeCase. More...

#include <TypeCase.h>

Public Member Functions

 TypeLine ()
 
bool IsPrepared () const
 Check if this instance has been prepared. More...
 
void Render (const Color color, int x, int y, boost::optional< size_t > caret={})
 Render this line using the owning TypeCase. More...
 

Public Attributes

std::vector< std::pair< GlyphEntry *, SDL_Rect > > glyphs
 
int height
 
std::shared_ptr< TypeCasetypeCase
 
int width
 

Detailed Description

A line of text, prepared by a TypeCase.

This is intended to be a reusable buffer; i.e., it can be cleared and a new prepared line of text loaded in place.

Author
Michael Imamura

Constructor & Destructor Documentation

HoverRace::Display::TypeLine::TypeLine ( )
inline

Member Function Documentation

bool HoverRace::Display::TypeLine::IsPrepared ( ) const
inline

Check if this instance has been prepared.

Returns
true if prepared, false if not.
void HoverRace::Display::TypeLine::Render ( const Color  color,
int  x,
int  y,
boost::optional< size_t >  caret = {} 
)
inline

Render this line using the owning TypeCase.

Parameters
colorThe color of the string.
xThe screen X coordinate of the upper-left corner.
yThe screen Y coordinate of the upper-left corner.
caretThe optional caret position.

Member Data Documentation

std::vector<std::pair<GlyphEntry*, SDL_Rect> > HoverRace::Display::TypeLine::glyphs
int HoverRace::Display::TypeLine::height
std::shared_ptr<TypeCase> HoverRace::Display::TypeLine::typeCase
int HoverRace::Display::TypeLine::width

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