Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <GULFONT.H>
Link against: egul.lib

Class CCleanupStackableFont

class CCleanupStackableFont : public CBase;

Description

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.

Derivation

Members

Defined in CCleanupStackableFont:

Inherited from CBase:

See also:


Construction and destruction


NewL(TResourceReader &,CWsScreenDevice &)

IMPORT_C static CCleanupStackableFont* NewL(TResourceReader &aReader, CWsScreenDevice &aScreenDevice);

Description

Allocates and constructs a new CCleanupStackableFont.

aReader should be initialised to read a resource of type FONT.

Parameters

TResourceReader &aReader

The resource reader to use.

CWsScreenDevice &aScreenDevice

The screen device.

Return value

CCleanupStackableFont *

The CCleanupStackableFont object.


NewLC(TResourceReader &,CWsScreenDevice &)

IMPORT_C static CCleanupStackableFont* NewLC(TResourceReader &aReader, CWsScreenDevice &aScreenDevice);

Description

Allocates and constructs a new CCleanupStackableFont, leaving it on the cleanup stack.

aReader should be initialised to read a resource of type FONT.

Parameters

TResourceReader &aReader

The resource reader to use.

CWsScreenDevice &aScreenDevice

The screen device.

Return value

CCleanupStackableFont *

Pointer to the CCleanupStackableFont object.


~CCleanupStackableFont()

IMPORT_C virtual ~CCleanupStackableFont();

Description

Destructor.

This releases the font. The font is only deleted if its access count is zero (so that no client is using it).

[Top]


Member functions


NewByNameL(TResourceReader &,CWsScreenDevice &)

IMPORT_C static CCleanupStackableFont* NewByNameL(TResourceReader &aReader, CWsScreenDevice &aScreenDevice);

Description

Allocates and constructs a new CCleanupStackableFont.

aReader should be initialised to read a resource of type NAMED_FONT.

Parameters

TResourceReader &aReader

The resource reader to use.

CWsScreenDevice &aScreenDevice

The screen device.

Return value

CCleanupStackableFont *

Pointer to the CCleanupStackableFont object.


NewByNameLC(TResourceReader &,CWsScreenDevice &)

IMPORT_C static CCleanupStackableFont* NewByNameLC(TResourceReader &aReader, CWsScreenDevice &aScreenDevice);

Description

Allocates and constructs a new CCleanupStackableFont, leaving it on the cleanup stack.

aReader should be initialised to read a resource of type NAMED_FONT.

Parameters

TResourceReader &aReader

The resource reader to use.

CWsScreenDevice &aScreenDevice

The screen device.

Return value

CCleanupStackableFont *

Pointer to the CCleanupStackableFont object.


Font()const

IMPORT_C CFbsFont& Font() const;

Description

Gets the font stored in this object.

The caller does not take ownership.

Return value

CFbsFont &

The font.


TakeOwnershipOfFont()

IMPORT_C CFbsFont* TakeOwnershipOfFont();

Description

Gets the font stored in this object.

The caller takes ownership of the returned font.

Return value

CFbsFont *

The font.