Font Class Reference

Class for creating a Font object. More...

Inherits WindowObject.

List of all members.

Public Member Functions

 Font (const SmartUtil::tstring &faceName, int height=10, int width=10, int weight=2, DWORD charSet=ANSI_CHARSET, bool italic=false, bool underline=false, bool strikeOut=false, int escapementOrientation=0, DWORD outputPrecision=OUT_DEFAULT_PRECIS, DWORD clipPrecision=CLIP_DEFAULT_PRECIS, DWORD quality=DEFAULT_QUALITY, DWORD pitchAndFamliy=FF_DONTCARE)
 Constructor taking all parameters.
HFONT getHandle () const
 Returns the HFONT to the Font object.
virtual ~Font ()
 DTOR cleaning up.


Detailed Description

Class for creating a Font object.

This class is the type sent to the AspectFont realizing classes.
Normally you would make an instance of this class and then stuff it into any class object that realizes the AspectFont Aspect.
One instance of this class can be shared among different Widgets ( even different types of Widgets )


Constructor & Destructor Documentation

Font ( const SmartUtil::tstring &  faceName,
int  height = 10,
int  width = 10,
int  weight = 2,
DWORD  charSet = ANSI_CHARSET,
bool  italic = false,
bool  underline = false,
bool  strikeOut = false,
int  escapementOrientation = 0,
DWORD  outputPrecision = OUT_DEFAULT_PRECIS,
DWORD  clipPrecision = CLIP_DEFAULT_PRECIS,
DWORD  quality = DEFAULT_QUALITY,
DWORD  pitchAndFamliy = FF_DONTCARE 
)

Constructor taking all parameters.

The object can't be manipulated after creation so when creating an instance of this class be sure you are certain that you know what you want.

virtual ~Font (  )  [virtual]

DTOR cleaning up.

DTOR of this class automatically calls DeleteObject on the HFONT so be sure to create the instance as a SmartPtr if you wish to have access to it after the object goes out of scope.


Member Function Documentation

HFONT getHandle (  )  const

Returns the HFONT to the Font object.

Be careful with that gun son, it's loaded!

Back to SmartWin website
SourceForge.net Logo