Main Page   Packages   Class Hierarchy   Alphabetical List   Data Structures   File List   Namespace Members   Data Fields   Globals  

clawsoft.Font Class Reference

#include <Font.h>

Inheritance diagram for clawsoft.Font:

Inheritance graph
[legend]
Collaboration diagram for clawsoft.Font:

Collaboration graph
[legend]

Public Methods

 Font ()
 Font (const char *fname, int s=10)
 Font (String fname, int s=10)
 Font (TTF_Font *f, int s=10)
virtual ~Font ()
void load (const char *fname, int s=10)
void load (String fname, int s=10)
void setStyle (int)
void setColor (int r, int g, int b)
void setColor (int rgb[])
void setColor (SDL_Color rgb)
void setBGColor (int r, int g, int b)
void setBGColor (int rgb[])
void setBGColor (SDL_Color rgb)
SDL_Surface * render (const char *str)
SDL_Surface * render (String str)
SDL_Surface * renderText (const char *s)
const int size ()
void draw ()
 Don't use this method use render() instead

char * getClassName ()
 Returns the name of the current class.


Protected Methods

void destroy ()
void size (int s)
void setClassName (char *n)
 Call this method when you need to set the name of the class you're creating, typically int it's constructor, remeber that you must set the classname for every clas you create, that way you can have more information while being in a debuging process.


Protected Attributes

TTF_Font * thefont
SDL_Color currentcolor
SDL_Color bgcolor
int siz
bool drawn

Constructor & Destructor Documentation

clawsoft.Font::Font  
 

Definition at line 11 of file Font.cpp.

References clawsoft.Font.currentcolor, clawsoft.Object.setClassName(), clawsoft.Font.size(), and clawsoft.Font.thefont.

clawsoft.Font::Font const char *    fname,
int    s = 10
 

Definition at line 20 of file Font.cpp.

References clawsoft.Font.currentcolor, clawsoft.Font.load(), clawsoft.Object.setClassName(), and clawsoft.Font.thefont.

clawsoft.Font::Font String    fname,
int    s = 10
 

Definition at line 29 of file Font.cpp.

References clawsoft.Font.currentcolor, clawsoft.Font.load(), clawsoft.Object.setClassName(), clawsoft.Font.thefont, and clawsoft.String.toCharPtr().

clawsoft.Font::Font TTF_Font *    f,
int    s = 10
 

Definition at line 38 of file Font.cpp.

References clawsoft.Font.currentcolor, clawsoft.Object.setClassName(), and clawsoft.Font.thefont.

virtual clawsoft.Font.~Font   [inline, virtual]
 

Definition at line 36 of file Font.h.

References clawsoft.Font.destroy().


Member Function Documentation

void clawsoft.Font::destroy   [protected]
 

Definition at line 63 of file Font.cpp.

References clawsoft.Font.thefont.

Referenced by clawsoft.Font.load(), and clawsoft.Font.~Font().

void clawsoft.Font::draw   [virtual]
 

Don't use this method use render() instead

Implements clawsoft.GUIObject.

Definition at line 221 of file Font.cpp.

char * clawsoft.Object::getClassName   [inherited]
 

Returns the name of the current class.

Definition at line 18 of file Object.cpp.

References clawsoft.Object.__cls_name.

void clawsoft.Font::load String    fname,
int    s = 10
 

Definition at line 59 of file Font.cpp.

References clawsoft.Font.load(), and clawsoft.String.toCharPtr().

void clawsoft.Font::load const char *    fname,
int    s = 10
 

Definition at line 46 of file Font.cpp.

References clawsoft.Font.destroy(), clawsoft.Font.size(), and clawsoft.Font.thefont.

Referenced by clawsoft.Font.Font(), and clawsoft.Font.load().

SDL_Surface * clawsoft.Font::render String    str
 

Definition at line 130 of file Font.cpp.

References clawsoft.Font.render(), and clawsoft.String.toCharPtr().

SDL_Surface * clawsoft.Font::render const char *    str
 

Definition at line 110 of file Font.cpp.

References clawsoft.Font.currentcolor, and clawsoft.Font.thefont.

Referenced by clawsoft.Font.render(), and clawsoft.Font.renderText().

SDL_Surface * clawsoft.Font::renderText const char *    s
 

Definition at line 134 of file Font.cpp.

References clawsoft.Tokenizer.next(), clawsoft.Font.render(), clawsoft.Font.siz, and clawsoft.String.toCharPtr().

void clawsoft.Font::setBGColor SDL_Color    rgb
 

Definition at line 104 of file Font.cpp.

References clawsoft.Font.bgcolor.

void clawsoft.Font::setBGColor int    rgb[]
 

Definition at line 98 of file Font.cpp.

References clawsoft.Font.bgcolor.

void clawsoft.Font::setBGColor int    r,
int    g,
int    b
 

Definition at line 92 of file Font.cpp.

References clawsoft.Font.bgcolor.

void clawsoft.Object::setClassName char *    n [protected, inherited]
 

Call this method when you need to set the name of the class you're creating, typically int it's constructor, remeber that you must set the classname for every clas you create, that way you can have more information while being in a debuging process.

Definition at line 14 of file Object.cpp.

References clawsoft.Object.__cls_name.

Referenced by clawsoft.ArrayOutOfBoundsException.ArrayOutOfBoundsException(), clawsoft.BrokenPipeException.BrokenPipeException(), clawsoft.Dialog.CancelButton.CancelButton(), clawsoft.CantLoadDSOException.CantLoadDSOException(), clawsoft.CantUnloadDSOException.CantUnloadDSOException(), clawsoft.ConnectionRefusedException.ConnectionRefusedException(), clawsoft.ConnectionTimeoutException.ConnectionTimeoutException(), clawsoft.Dialog.Dialog(), clawsoft.DSOException.DSOException(), clawsoft.DSOSymbolException.DSOSymbolException(), clawsoft.ElementNotFoundException.ElementNotFoundException(), clawsoft.Font.Font(), clawsoft.GameSelector.GameSelector(), clawsoft.Dialog.HelpButton.HelpButton(), clawsoft.IOException.IOException(), clawsoft.KeyboardEvent.KeyboardEvent(), clawsoft.LoginDialog.LoginDialog(), clawsoft.Mutex.Mutex(), clawsoft.MutexException.MutexException(), clawsoft.NetworkException.NetworkException(), clawsoft.NetworkUnreachableException.NetworkUnreachableException(), clawsoft.NoMoreTokensException.NoMoreTokensException(), clawsoft.NullPointerException.NullPointerException(), clawsoft.NumberException.NumberException(), clawsoft.Object.Object(), clawsoft.Dialog.OKButton.OKButton(), clawsoft.Plugin.Plugin(), clawsoft.ProcOutOfFileDescriptorsException.ProcOutOfFileDescriptorsException(), Random.Random(), clawsoft.ServerSocket.ServerSocket(), clawsoft.Socket.Socket(), clawsoft.SocketAlreadyBoundedException.SocketAlreadyBoundedException(), clawsoft.SocketAlreadyUsedException.SocketAlreadyUsedException(), clawsoft.SocketUnableToReadException.SocketUnableToReadException(), clawsoft.SocketUnableToWriteException.SocketUnableToWriteException(), clawsoft.SysOutOfFileDescriptorsException.SysOutOfFileDescriptorsException(), clawsoft.TextBox.TextBox(), clawsoft.TextButton.TextButton(), clawsoft.TextField.TextField(), clawsoft.Thread.Thread(), clawsoft.UnableToLockMutexException.UnableToLockMutexException(), clawsoft.UnableToUnlockMutexException.UnableToUnlockMutexException(), and clawsoft.Window.Window().

void clawsoft.Font::setColor SDL_Color    rgb
 

Definition at line 86 of file Font.cpp.

References clawsoft.Font.currentcolor.

void clawsoft.Font::setColor int    rgb[]
 

Definition at line 80 of file Font.cpp.

References clawsoft.Font.currentcolor.

void clawsoft.Font::setColor int    r,
int    g,
int    b
 

Definition at line 74 of file Font.cpp.

References clawsoft.Font.currentcolor.

void clawsoft.Font::setStyle int   
 

Definition at line 68 of file Font.cpp.

References clawsoft.Font.thefont.

const int clawsoft.Font::size  
 

Definition at line 213 of file Font.cpp.

References clawsoft.Font.siz.

Referenced by clawsoft.Font.Font(), and clawsoft.Font.load().

void clawsoft.Font::size int    s [protected]
 

Definition at line 217 of file Font.cpp.

References clawsoft.Font.siz.


Field Documentation

SDL_Color clawsoft.Font.bgcolor [protected]
 

Definition at line 27 of file Font.h.

Referenced by clawsoft.Font.setBGColor().

SDL_Color clawsoft.Font.currentcolor [protected]
 

Definition at line 26 of file Font.h.

Referenced by clawsoft.Font.Font(), clawsoft.Font.render(), and clawsoft.Font.setColor().

bool clawsoft.GUIObject.drawn [protected, inherited]
 

Definition at line 16 of file gui.h.

Referenced by clawsoft.BaseButton.BaseButton(), clawsoft.TextButton.checkMouseMotionEvents(), clawsoft.BaseButton.checkMouseMotionEvents(), clawsoft.TextButton.draw(), clawsoft.BaseButton.draw(), and clawsoft.GUIObject.GUIObject().

int clawsoft.Font.siz [protected]
 

Definition at line 28 of file Font.h.

Referenced by clawsoft.Font.renderText(), and clawsoft.Font.size().

TTF_Font* clawsoft.Font.thefont [protected]
 

Definition at line 25 of file Font.h.

Referenced by clawsoft.Font.destroy(), clawsoft.Font.Font(), clawsoft.Font.load(), clawsoft.Font.render(), and clawsoft.Font.setStyle().


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

Powered by:

SourceForge Logo