class CCleanupStackableFont : public CBase |
Wraps a font ( CFbsFont ) object that can be pushed onto the cleanup stack.
By default, the cleanup stack only handles CBase-derived classes, and untyped (TAny*) objects that can be cleaned up by a simple memory free call. Fonts must also be released, which this class handles automatically in its destructor.
The font is initialised from a resource file, and can be identified by name or UID.
Public Member Functions | |
---|---|
~CCleanupStackableFont () | |
IMPORT_C CFbsFont & | Font () |
IMPORT_C CCleanupStackableFont * | NewByNameL ( TResourceReader &, CWsScreenDevice &) |
IMPORT_C CCleanupStackableFont * | NewByNameLC ( TResourceReader &, CWsScreenDevice &) |
IMPORT_C CCleanupStackableFont * | NewL ( TResourceReader &, CWsScreenDevice &) |
IMPORT_C CCleanupStackableFont * | NewLC ( TResourceReader &, CWsScreenDevice &) |
IMPORT_C CFbsFont * | TakeOwnershipOfFont () |
Private Member Functions | |
---|---|
CCleanupStackableFont ( CWsScreenDevice &) | |
CCleanupStackableFont * | NewLC ( TBool , TResourceReader &, CWsScreenDevice &) |
Private Attributes | |
---|---|
CFbsFont * | iFont |
CWsScreenDevice & | iScreenDevice |
CCleanupStackableFont | ( | CWsScreenDevice & | aScreenDevice | ) | [private] |
CWsScreenDevice & aScreenDevice |
IMPORT_C | ~CCleanupStackableFont | ( | ) | [virtual] |
Destructor.
This releases the font. The font is only deleted if its access count is zero (so that no client is using it).
IMPORT_C CFbsFont & | Font | ( | ) | const |
Gets the font stored in this object.
The caller does not take ownership.
IMPORT_C CCleanupStackableFont * | NewByNameL | ( | TResourceReader & | aReader, |
CWsScreenDevice & | aScreenDevice | |||
) | [static] |
Allocates and constructs a new CCleanupStackableFont .
aReader should be initialised to read a resource of type NAMED_FONT.
TResourceReader & aReader | The resource reader to use. |
CWsScreenDevice & aScreenDevice | The screen device. |
IMPORT_C CCleanupStackableFont * | NewByNameLC | ( | TResourceReader & | aReader, |
CWsScreenDevice & | aScreenDevice | |||
) | [static] |
Allocates and constructs a new CCleanupStackableFont , leaving it on the cleanup stack.
aReader should be initialised to read a resource of type NAMED_FONT.
TResourceReader & aReader | The resource reader to use. |
CWsScreenDevice & aScreenDevice | The screen device. |
IMPORT_C CCleanupStackableFont * | NewL | ( | TResourceReader & | aReader, |
CWsScreenDevice & | aScreenDevice | |||
) | [static] |
Allocates and constructs a new CCleanupStackableFont .
aReader should be initialised to read a resource of type FONT.
TResourceReader & aReader | The resource reader to use. |
CWsScreenDevice & aScreenDevice | The screen device. |
IMPORT_C CCleanupStackableFont * | NewLC | ( | TResourceReader & | aReader, |
CWsScreenDevice & | aScreenDevice | |||
) | [static] |
Allocates and constructs a new CCleanupStackableFont , leaving it on the cleanup stack.
aReader should be initialised to read a resource of type FONT.
TResourceReader & aReader | The resource reader to use. |
CWsScreenDevice & aScreenDevice | The screen device. |
CCleanupStackableFont * | NewLC | ( | TBool | aByUid, |
TResourceReader & | aReader, | |||
CWsScreenDevice & | aScreenDevice | |||
) | [private, static] |
TBool aByUid | |
TResourceReader & aReader | |
CWsScreenDevice & aScreenDevice |
IMPORT_C CFbsFont * | TakeOwnershipOfFont | ( | ) |
Gets the font stored in this object.
The caller takes ownership of the returned font.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.