CAknsBitmapItemDef Class Reference

class CAknsBitmapItemDef : public CAknsImageItemDef

Bitmap item definition. Bitmap item definition consists of (in addition to base class data) bitmap filename and index in bitmap file. Item type for bitmap item definitions is always EAknsITBitmap.

This is a public class with exported functions. The class is not intended for derivation outside the library.

AknSkinSrv.lib

Since
2.0

Inherits from

Constructor & Destructor Documentation

CAknsBitmapItemDef(const TAknsItemType, const TAknsItemID &, const TInt)

CAknsBitmapItemDef(const TAknsItemTypeaType,
const TAknsItemID &aID,
const TIntaIndex
)[protected]

C++ constructor for internal use. Constructs bitmap item definition object with given ID and bitmap index. Filename needs to be set separately.

Since
2.0

Parameters

const TAknsItemType aTypeType of the definition object. While this is always EAknsITBitmap for CAknsBitmapItemDef objects, derived classes may specify other values.
const TAknsItemID & aIDItem ID of the new item definition.
const TInt aIndexIndex of the bitmap of the new item definition.

~CAknsBitmapItemDef()

~CAknsBitmapItemDef()[virtual]

Destructor. Deletes the internal buffer reserved for bitmap filename.

Member Functions Documentation

Filename()

IMPORT_C const TDesC &Filename()const

Returns a reference to filename of this item definition.

Since
2.0

Index()

IMPORT_C TIntIndex()const

Returns bitmap file index of this item definition.

Since
2.0

NewL(const TAknsItemID &, const TDesC &, const TInt)

IMPORT_C CAknsBitmapItemDef *NewL(const TAknsItemID &aID,
const TDesC &aFilename,
const TIntaIndex
)[static]

Two-phased constructor, complete initialization. Constructs a new bitmap item definition object.

Exceptions:
If allocation fails, function leaves with a system-wide error code.

Parameters

const TAknsItemID & aIDItem ID of the new object.
const TDesC & aFilenameFilename of the bitmap. Internal descriptor is constructed to point to the same data as the given one. Ownership of the original descriptor stays with the caller and it must ensure that the lifetime of the descriptor is appropriate.
const TInt aIndexIndex of the bitmap in the bitmap file.

NewL(const TAknsItemID &)

IMPORT_C CAknsBitmapItemDef *NewL(const TAknsItemID &aID)[static]

Two-phased constructor, partial initialization. Constructs a new bitmap item definition object. Bitmap filename and index must be set by SetFilename or SetFilenameL and SetIndex.

Exceptions:
If allocation fails, function leaves with a system-wide error code.

Parameters

const TAknsItemID & aIDItem ID of the new object.

SetFilename(const TDesC &)

IMPORT_C voidSetFilename(const TDesC &aFilename)

Sets the filename, ownership of the descriptor stays with the caller. If CAknsBitmapItemDef object already owns a filename descriptor, it is deleted.

Since
2.0

Parameters

const TDesC & aFilenameReference to the descriptor containing new filename. Caller still owns the descriptor and must ensure that its lifetime is appropriate.

SetFilenameL(const TDesC &)

IMPORT_C voidSetFilenameL(const TDesC &aFilename)

Sets the filename, content of the descriptor is copied into an internal buffer. If CAknsBitmapItemDef object already owns a filename descriptor, it is deleted.

Since
2.0
Exceptions:
If allocation fails, function leaves with a system-wide error code.

Parameters

const TDesC & aFilenameReference to the descriptor containing new filename. Content of the descriptor is copied into an internal buffer owned by CAknsBitmapItemDef.

SetIndex(const TInt)

IMPORT_C voidSetIndex(const TIntaIndex)

Sets bitmap file index of this item definition.

Since
2.0

Parameters

const TInt aIndexNew index.

Member Data Documentation

TPtrC iFilename

TPtrC iFilename[protected]

HBufC * iFilenameBuf

HBufC *iFilenameBuf[protected]

TInt iIndex

TInt iIndex[protected]