Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: eikrutil.h
Link against: eikcore.lib

Class EikResourceUtils

EikResourceUtils

Support

Supported from 6.0

Description

This class provides utilities for reading standard resources.

Defined in EikResourceUtils:
CreateColorArrayL(), CreateColorArrayLC(), CreateScreenFontL(), ReadTInt16L(), ReadTInt32L(), ReadTInt8L()


Creating colour arrays


CreateColorArrayL()

CColorArray* CreateColorArrayL(TInt aResourceId,CEikonEnv* aEnv=NULL);

Description

Creates an array of colours from a resource definition.

Parameters

TInt aResourceId

ID of the resource from which to read the colours.

CEikonEnv* aEnv=NULL

The Eikon environment in which the control colours are to be created. This is optional.

Return value

CColorArray*

Array of control colours.


CreateColorArrayLC()

CColorArray* CreateColorArrayLC(TInt aResourceId,CEikonEnv* aEnv);

Description

Create an array of control colours from a resource definition and return it on the cleanup stack.

Parameters

TInt aResourceId

ID of the resource from which to create the array of control colours.

CEikonEnv* aEnv

The Eikon environment in which the control colours are to be created.

Return value

CColorArray*

Array of control colours.

[Top]


Creating a screen font


CreateScreenFontL()

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

Description

Create a screen font from resource.

Creates a font for the specified screen device by reading a font UID and font flags from the given position in a resource. Returns a pointer to the font and transfers ownership.

Parameters

TResourceReader& aResourceReader

The resource reader to use to read the font.

CWsScreenDevice& aScreenDevice

The screen device for which the font will be created.

Return value

CFbsFont*

Screen font object.


CreateScreenFontL()

CFbsFont* CreateScreenFontL(TInt aResourceId,CEikonEnv* aEnv);

Description

Creates a screen font.

Creates a font for the specified environment by reading a font UID and font flags from the given resource. Returns a pointer to the font and transfers ownership.

Parameters

TInt aResourceId

ID of the resource from which to read the font.

CEikonEnv* aEnv

The Eikon environment for which the screen font will be created.

Return value

CFbsFont*

Pointer to the created screen font.

[Top]


Reading integers from resource


ReadTInt8L()

TInt8 ReadTInt8L(TInt aResourceId,CEikonEnv* aEnv);

Description

Gets the 8 bit signed integer held in a specified resource location.

Parameters

TInt aResourceId

The location in the resource to be read.

CEikonEnv* aEnv

The Eikon environment.

Return value

TInt8

The eight bits that follow the specified location in the resource.


ReadTInt16L()

TInt16 ReadTInt8L(TInt aResourceId,CEikonEnv* aEnv);

Description

Gets the 16 bit signed integer held in a specified resource location.

Parameters

TInt aResourceId

The location in the resource to be read.

CEikonEnv* aEnv

The Eikon environment.

Return value

TInt16

The 16 bits that follow the specified location in the resource.


ReadTInt32L()

TInt32 ReadTInt8L(TInt aResourceId,CEikonEnv* aEnv);

Description

Gets the 32 bit signed integer held in a specified resource location.

Parameters

TInt aResourceId

The location in the resource to be read.

CEikonEnv* aEnv

The Eikon environment.

Return value

TInt32

The 32 bits that follow the specified location in the resource.