Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: gulutil.h
Link against: egul.lib

Class ResourceUtils

class ResourceUtils;

Description

Provides static functions for resource reading.

All functions use pre-initialised resource reader objects to read information from resource files.

Members

Defined in ResourceUtils:
CreateNamedScreenFontInPixelsL(), CreateNamedScreenFontL(), CreateScreenFontL(), PopulateColorArrayL(), ReadTInt16L(), ReadTInt32L(), ReadTInt8L()


Member functions


CreateNamedScreenFontL()

static IMPORT_C CFbsFont *CreateNamedScreenFontL(TResourceReader &aResourceReader, CWsScreenDevice &aScreenDevice);

Description

Creates and returns a named screen font from a NAMED_FONT resource.

Parameters

TResourceReader &aResourceReader

Resource reader to use to read the font information.

CWsScreenDevice &aScreenDevice

The screen device for which the font will be created.

Return value

CFbsFont *

The screen font, whose size is in twips. The caller takes ownership.


CreateNamedScreenFontInPixelsL()

static IMPORT_C CFbsFont *CreateNamedScreenFontInPixelsL(TResourceReader &aResourceReader, CWsScreenDevice &aScreenDevice);

Description

Creates a named screen font in pixels from a NAMED_FONT resource.

Parameters

TResourceReader &aResourceReader

Resource reader to use to read the font information.

CWsScreenDevice &aScreenDevice

The screen device for which the font will be created.

Return value

CFbsFont *

The screen font, whose size is in pixels. The caller takes ownership.


CreateScreenFontL()

static IMPORT_C CFbsFont *CreateScreenFontL(TResourceReader &aResourceReader, CWsScreenDevice &aScreenDevice);

Description

Creates a screen font from a FONT resource.

Parameters

TResourceReader &aResourceReader

Resource reader to use to read the font UID and flags.

CWsScreenDevice &aScreenDevice

The screen device for which the font will be created.

Return value

CFbsFont *

The screen font. The caller takes ownership.


ReadTInt8L()

static inline TInt8 ReadTInt8L(TResourceReader &aReader);

Description

Reads an 8 bit signed integer from a resource.

Parameters

TResourceReader &aReader

Resource reader to use to read the integer.

Return value

TInt8

The 8 bit signed integer.


ReadTInt16L()

static inline TInt16 ReadTInt16L(TResourceReader &aReader);

Description

Reads a 16 bit signed integer from a resource.

Parameters

TResourceReader &aReader

Resource reader to use to read the integer.

Return value

TInt16

The 16 bit signed integer.


ReadTInt32L()

static inline TInt32 ReadTInt32L(TResourceReader &aReader);

Description

Reads a 32 bit signed integer from a resource.

Parameters

TResourceReader &aReader

Resource reader to use to read the integer.

Return value

TInt32

The 32 bit signed integer.


PopulateColorArrayL()

static IMPORT_C void PopulateColorArrayL(CColorArray &aColors, TResourceReader &aReader);

Description

Populates an array of logical colours using a pre-initialised resource reader from an array of CTRL_COLOR resources.

Parameters

CColorArray &aColors

On return, contains the colour array read from the resource.

TResourceReader &aReader

Resource reader to use to read the colour array.