libHSPlasma
Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
plFont Class Reference

#include <plFont.h>

Inheritance diagram for plFont:
hsKeyedObject plCreatable

Classes

class  plCharacter

Public Types

enum  Flags { kFontBold = 0x1, kFontItalic = 0x2 }

Public Member Functions

 plFont ()
 plFont (const plFont &copy)
virtual ~plFont ()
plFontoperator= (const plFont &copy)
virtual void read (hsStream *S, plResManager *mgr)
virtual void write (hsStream *S, plResManager *mgr)
void readP2F (hsStream *S)
void writeP2F (hsStream *S) const
void readBitmap (hsStream *S)
void writeBitmap (hsStream *S) const
const plCharacteroperator[] (size_t idx) const
plCharacteroperator[] (size_t idx)
const plCharactergetCharacter (size_t idx) const
plCharactergetCharacter (size_t idx)
const unsigned char * getGlyph (size_t idx) const
size_t getNumCharacters () const
void setNumCharacters (size_t count)
const plStringgetName () const
unsigned char getSize () const
unsigned char getBPP () const
unsigned int getWidth () const
unsigned int getHeight () const
unsigned short getFirstChar () const
int getMaxCharHeight () const
void setName (const plString &name)
void setSize (unsigned char size)
void setBPP (unsigned char bpp)
void setWidth (unsigned int width)
void setHeight (unsigned int height)
void setFirstChar (unsigned short first)
void setMaxCharHeight (int maxCharHeight)
bool isBold () const
bool isItalic () const
void setBold (bool bold)
void setItalic (bool italic)
- Public Member Functions inherited from hsKeyedObject
void init (const plString &name)
plKey getKey () const
void setKey (plKey key)
- Public Member Functions inherited from plCreatable
 plCreatable ()
virtual ~plCreatable ()
virtual short ClassIndex () const =0
short ClassIndex (PlasmaVer ver) const
virtual const char * ClassName () const
virtual bool ClassInstance (short) const
virtual bool isStub () const
virtual void prcWrite (pfPrcHelper *prc)
virtual void prcParse (const pfPrcTag *tag, plResManager *mgr)

Static Public Attributes

static const plCharacter kNullChar

Protected Member Functions

virtual void IPrcWrite (pfPrcHelper *prc)
virtual void IPrcParse (const pfPrcTag *tag, plResManager *mgr)

Protected Attributes

plString fFace
unsigned char fSize
unsigned char fBPP
unsigned short fFirstChar
unsigned int fFlags
unsigned int fWidth
unsigned int fHeight
unsigned char * fBmpData
std::vector< plCharacterfCharacters
int fMaxCharHeight

Member Enumeration Documentation

Enumerator:
kFontBold 
kFontItalic 

Constructor & Destructor Documentation

plFont::plFont ( )
plFont::plFont ( const plFont copy)
virtual plFont::~plFont ( )
virtual

Member Function Documentation

unsigned char plFont::getBPP ( ) const
const plCharacter& plFont::getCharacter ( size_t  idx) const
plCharacter& plFont::getCharacter ( size_t  idx)
unsigned short plFont::getFirstChar ( ) const
const unsigned char* plFont::getGlyph ( size_t  idx) const
unsigned int plFont::getHeight ( ) const
int plFont::getMaxCharHeight ( ) const
const plString& plFont::getName ( ) const
size_t plFont::getNumCharacters ( ) const
unsigned char plFont::getSize ( ) const
unsigned int plFont::getWidth ( ) const
virtual void plFont::IPrcParse ( const pfPrcTag tag,
plResManager mgr 
)
protectedvirtual

This must be overloaded by subclasses to parse PRC data specific to the class from the PRC document. It is called once for each tag that is a child to the Creatable tag itself, so subclasses should check for each supported tag and handle it accordingly if it matches. If the tag is not recognized, it should be passed along to the parent class.

Reimplemented from hsKeyedObject.

virtual void plFont::IPrcWrite ( pfPrcHelper prc)
protectedvirtual

This must be overloaded by subclasses to write PRC data specific to the class to the PRC document. Do not write the top-level creatable tag, that is handled by prcWrite().

Reimplemented from hsKeyedObject.

bool plFont::isBold ( ) const
bool plFont::isItalic ( ) const
plFont& plFont::operator= ( const plFont copy)
const plCharacter& plFont::operator[] ( size_t  idx) const
plCharacter& plFont::operator[] ( size_t  idx)
virtual void plFont::read ( hsStream ,
plResManager  
)
virtual

Reads this creatable directly from the stream. If any keys are read, they will be added to the plResManager automatically.

Reimplemented from hsKeyedObject.

void plFont::readBitmap ( hsStream S)
void plFont::readP2F ( hsStream S)
void plFont::setBold ( bool  bold)
void plFont::setBPP ( unsigned char  bpp)
void plFont::setFirstChar ( unsigned short  first)
void plFont::setHeight ( unsigned int  height)
void plFont::setItalic ( bool  italic)
void plFont::setMaxCharHeight ( int  maxCharHeight)
void plFont::setName ( const plString name)
void plFont::setNumCharacters ( size_t  count)
void plFont::setSize ( unsigned char  size)
void plFont::setWidth ( unsigned int  width)
virtual void plFont::write ( hsStream ,
plResManager  
)
virtual

Writes this creatable directly to the stream. The plResManager is used to manage any key references written by this creatable.

Reimplemented from hsKeyedObject.

void plFont::writeBitmap ( hsStream S) const
void plFont::writeP2F ( hsStream S) const

Member Data Documentation

unsigned char* plFont::fBmpData
protected
unsigned char plFont::fBPP
protected
std::vector<plCharacter> plFont::fCharacters
protected
plString plFont::fFace
protected
unsigned short plFont::fFirstChar
protected
unsigned int plFont::fFlags
protected
unsigned int plFont::fHeight
protected
int plFont::fMaxCharHeight
protected
unsigned char plFont::fSize
protected
unsigned int plFont::fWidth
protected
const plCharacter plFont::kNullChar
static

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