Eaagles::BasicGL::LcFont Class Reference

Inherits Eaagles::Basic::LcObject.

Inherited by Eaagles::BasicGL::LcBitmapFont, Eaagles::BasicGL::LcFTGLFonts, and Eaagles::BasicGL::LcStrokeFont.

Inheritance diagram for Eaagles::BasicGL::LcFont:

Inheritance graph
[legend]
Collaboration diagram for Eaagles::BasicGL::LcFont:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LcFont ()
virtual void outputText (const double x, const double y, const char *txt, const int n, const bool vf=false)=0
virtual void outputText (const char *txt, const int n, const bool vf=false)=0
virtual void position (const int ln, const int cp, GLdouble &px, GLdouble &py) const
virtual void setTextOrigin (const GLdouble x, const GLdouble y)
LCreal getCharacterSpacing () const
void setCharacterSpacing (const LCreal v)
LCreal getLineSpacing () const
void setLineSpacing (const LCreal v)
GLdouble getFontWidth () const
void setFontWidth (const GLdouble v)
GLdouble getFontHeight () const
void setFontHeight (const GLdouble v)
GLuint getBase () const
void setBase (const GLuint nb)
GLuint getBitmapWidth () const
void setBitmapWidth (const GLuint v)
GLuint getBitmapHeight () const
void setBitmapHeight (const GLuint v)
virtual void loadFont ()=0
bool isLoaded () const
bool isNotLoaded () const
const unsigned char * lut () const
bool isFTGL () const
void * FTGL ()
const char * fontDirectory () const
const char * filename () const

Static Public Attributes

static const size_t MAX_MESSAGE_LENGTH = 256

Protected Member Functions

bool setSlotFontWidth (const Basic::LcNumber *const sfwobj)
bool setSlotFontHeight (const Basic::LcNumber *const sfhobj)
bool setSlotFontPosition (const Basic::LcList *const sfpobj)
bool setSlotBitmapWidth (const Basic::LcNumber *const sbwobj)
bool setSlotBitmapHeight (const Basic::LcNumber *const sbhobj)
bool setSlotFontPath (const Basic::LcString *const sfpobj)
bool setSlotFTGLFontFileName (const Basic::LcString *const sgffnobj)
bool setSlotLookupTable (const Basic::LcList *const sltobj)
bool setSlotCharacterSpacing (const Basic::LcNumber *const newCharSpacing)
bool setSlotLineSpacing (const Basic::LcNumber *const newLineSpacing)
int xferChars (char *const outp, const size_t BUF_SIZE, const char *const inp, const unsigned int n) const
void ftgl (void *p)
void setFontLoaded ()

Protected Attributes

GLdouble leftSide
GLdouble topSide

Static Protected Attributes

static const size_t MSG_BUF_LEN = (MAX_MESSAGE_LENGTH+1)

Private Attributes

GLdouble fWidth
GLdouble fHeight
GLuint bWidth
GLuint bHeight
GLuint b
unsigned char * pLUT
void * pFTGL
char * fontPath
char * fontFile
bool loaded
float charSpacing
float lineSpacing

Static Private Attributes

static const int LUT_SIZE = 256

Classes

class  LcExpInvalidFont

Detailed Description

  Abstract font class 


Constructor & Destructor Documentation

Eaagles::BasicGL::LcFont::LcFont (  ) 


Member Function Documentation

virtual void Eaagles::BasicGL::LcFont::outputText ( const double  x,
const double  y,
const char *  txt,
const int  n,
const bool  vf = false 
) [pure virtual]

Outputs the text at position (x, y). When 'vf' is true, text is drawn vertically.

Implemented in Eaagles::BasicGL::LcBitmapFont, Eaagles::BasicGL::LcFTGLBitmapFont, Eaagles::BasicGL::LcFTGLExtrdFont, Eaagles::BasicGL::LcFTGLOutlineFont, Eaagles::BasicGL::LcFTGLPixmapFont, Eaagles::BasicGL::LcFTGLPolygonFont, Eaagles::BasicGL::LcFTGLTextureFont, and Eaagles::BasicGL::LcStrokeFont.

virtual void Eaagles::BasicGL::LcFont::outputText ( const char *  txt,
const int  n,
const bool  vf = false 
) [pure virtual]

Outputs 'n' characters of the text with the (line, column) pair at current cursor position. When 'vf' is true, text is drawn vertically.

Implemented in Eaagles::BasicGL::LcBitmapFont, Eaagles::BasicGL::LcFTGLBitmapFont, Eaagles::BasicGL::LcFTGLExtrdFont, Eaagles::BasicGL::LcFTGLOutlineFont, Eaagles::BasicGL::LcFTGLPixmapFont, Eaagles::BasicGL::LcFTGLPolygonFont, Eaagles::BasicGL::LcFTGLTextureFont, and Eaagles::BasicGL::LcStrokeFont.

void Eaagles::BasicGL::LcFont::position ( const int  ln,
const int  cp,
GLdouble &  px,
GLdouble &  py 
) const [virtual]

Computes the (X, Y) position of the (ln, cp) pair (line, column).

void Eaagles::BasicGL::LcFont::setTextOrigin ( const GLdouble  x,
const GLdouble  y 
) [virtual]

Sets the upper left corner.

LCreal Eaagles::BasicGL::LcFont::getCharacterSpacing (  )  const [inline]

Returns the character spacing.

void Eaagles::BasicGL::LcFont::setCharacterSpacing ( const LCreal  v  )  [inline]

Sets the character spacing to v.

LCreal Eaagles::BasicGL::LcFont::getLineSpacing (  )  const [inline]

Returns the line spacing.

void Eaagles::BasicGL::LcFont::setLineSpacing ( const LCreal  v  )  [inline]

Sets the line spacing to v.

GLdouble Eaagles::BasicGL::LcFont::getFontWidth (  )  const [inline]

Returns the width of the font.

void Eaagles::BasicGL::LcFont::setFontWidth ( const GLdouble  v  )  [inline]

Sets the width of font to v.

GLdouble Eaagles::BasicGL::LcFont::getFontHeight (  )  const [inline]

Returns the height of the font.

void Eaagles::BasicGL::LcFont::setFontHeight ( const GLdouble  v  )  [inline]

Sets the height of the font to v.

GLuint Eaagles::BasicGL::LcFont::getBase (  )  const [inline]

Returns the base.

void Eaagles::BasicGL::LcFont::setBase ( const GLuint  nb  )  [inline]

Sets the base to nb.

GLuint Eaagles::BasicGL::LcFont::getBitmapWidth (  )  const [inline]

Returns the width of the bitmap.

void Eaagles::BasicGL::LcFont::setBitmapWidth ( const GLuint  v  )  [inline]

Sets the width of the bitmap.

GLuint Eaagles::BasicGL::LcFont::getBitmapHeight (  )  const [inline]

Returns the height of the bitmap.

void Eaagles::BasicGL::LcFont::setBitmapHeight ( const GLuint  v  )  [inline]

Sets the height of the bitmap.

virtual void Eaagles::BasicGL::LcFont::loadFont (  )  [pure virtual]

Loads the font.

Implemented in Eaagles::BasicGL::LcBitmapFont, Eaagles::BasicGL::LcFTGLBitmapFont, Eaagles::BasicGL::LcFTGLExtrdFont, Eaagles::BasicGL::LcFTGLOutlineFont, Eaagles::BasicGL::LcFTGLPixmapFont, Eaagles::BasicGL::LcFTGLPolygonFont, Eaagles::BasicGL::LcFTGLTextureFont, and Eaagles::BasicGL::LcStrokeFont.

bool Eaagles::BasicGL::LcFont::isLoaded (  )  const [inline]

Returns true if the font is successfully loaded.

bool Eaagles::BasicGL::LcFont::isNotLoaded (  )  const [inline]

Returns true if the font is not loaded.

const unsigned char* Eaagles::BasicGL::LcFont::lut (  )  const [inline]

Returns pLUT (string pointer to the Look-Up-Table <character translations>="">).

bool Eaagles::BasicGL::LcFont::isFTGL (  )  const [inline]

Returns true if the font is an OpenGL TrueType Font (FTGL), else false.

void* Eaagles::BasicGL::LcFont::FTGL (  )  [inline]

Returns a pointer to an OpenGL Freetype2 TrueType Font (FTGL).

const char* Eaagles::BasicGL::LcFont::fontDirectory (  )  const [inline]

Returns a string pointer to the font path directory.

const char* Eaagles::BasicGL::LcFont::filename (  )  const [inline]

Returns a string pointer to a font file name.

bool Eaagles::BasicGL::LcFont::setSlotFontWidth ( const Basic::LcNumber *const  sfwobj  )  [protected]

Sets the value of font width in the slot table.

bool Eaagles::BasicGL::LcFont::setSlotFontHeight ( const Basic::LcNumber *const  sfhobj  )  [protected]

Sets the value of font height in the slot table.

bool Eaagles::BasicGL::LcFont::setSlotFontPosition ( const Basic::LcList *const   sfpobj  )  [protected]

Sets the value of font position in the slot table.

bool Eaagles::BasicGL::LcFont::setSlotBitmapWidth ( const Basic::LcNumber *const  sbwobj  )  [protected]

Sets the value of bitmap width in the slot table.

bool Eaagles::BasicGL::LcFont::setSlotBitmapHeight ( const Basic::LcNumber *const  sbhobj  )  [protected]

Sets the value of bitmap heightin the slot table.

bool Eaagles::BasicGL::LcFont::setSlotFontPath ( const Basic::LcString *const  sfpobj  )  [protected]

Sets the path to the font in the slot table.

bool Eaagles::BasicGL::LcFont::setSlotFTGLFontFileName ( const Basic::LcString *const  sgffnobj  )  [protected]

Sets the name of the font file in the slot table.

bool Eaagles::BasicGL::LcFont::setSlotLookupTable ( const Basic::LcList *const   sltobj  )  [protected]

Sets the value of the look-up-table in the slot table.

bool Eaagles::BasicGL::LcFont::setSlotCharacterSpacing ( const Basic::LcNumber *const  newCharSpacing  )  [protected]

Sets the value of character spacing in the slot table.

bool Eaagles::BasicGL::LcFont::setSlotLineSpacing ( const Basic::LcNumber *const  newLineSpacing  )  [protected]

Sets the value of line spacing in the slot table.

int Eaagles::BasicGL::LcFont::xferChars ( char *const   outp,
const size_t  BUF_SIZE,
const char *const  inp,
const unsigned int  n 
) const [protected]

Transfers n characters of inp to outp and returns the size of outp.

void Eaagles::BasicGL::LcFont::ftgl ( void *  p  )  [inline, protected]

Sets the pFTGL font pointer to p.

void Eaagles::BasicGL::LcFont::setFontLoaded (  )  [inline, protected]

Sets the font loaded flag to true.


Member Data Documentation

const size_t Eaagles::BasicGL::LcFont::MAX_MESSAGE_LENGTH = 256 [static]

Max length of character buffers.

const size_t Eaagles::BasicGL::LcFont::MSG_BUF_LEN = (MAX_MESSAGE_LENGTH+1) [static, protected]

Max length of character buffers.

GLdouble Eaagles::BasicGL::LcFont::leftSide [protected]

Origin: upper left corner of ln=1, cp=1.

GLdouble Eaagles::BasicGL::LcFont::topSide [protected]

const int Eaagles::BasicGL::LcFont::LUT_SIZE = 256 [static, private]

Size of the look-up-table.

GLdouble Eaagles::BasicGL::LcFont::fWidth [private]

Font size.

GLdouble Eaagles::BasicGL::LcFont::fHeight [private]

GLuint Eaagles::BasicGL::LcFont::bWidth [private]

Bitmap size.

GLuint Eaagles::BasicGL::LcFont::bHeight [private]

GLuint Eaagles::BasicGL::LcFont::b [private]

Font call list base.

unsigned char* Eaagles::BasicGL::LcFont::pLUT [private]

Look-Up-Table (character translations).

void* Eaagles::BasicGL::LcFont::pFTGL [private]

OpenGL TrueType Font (FTGL).

char* Eaagles::BasicGL::LcFont::fontPath [private]

Path to font directory (FTGL & Bitmap fonts).

char* Eaagles::BasicGL::LcFont::fontFile [private]

Font filename (FTGL).

bool Eaagles::BasicGL::LcFont::loaded [private]

Font has been loaded.

float Eaagles::BasicGL::LcFont::charSpacing [private]

holds the character spacing

float Eaagles::BasicGL::LcFont::lineSpacing [private]

holds the line spacing


Generated on Tue Dec 19 16:26:38 2006 for Eaagles by  doxygen 1.5.0