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 TAknsItemType aType,
const TAknsItemID & aID,
const TInt aIndex
) [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 aType Type of the definition object. While this is always EAknsITBitmap for CAknsBitmapItemDef objects, derived classes may specify other values.
const TAknsItemID & aID Item ID of the new item definition.
const TInt aIndex Index 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 TInt Index ( ) 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 TInt aIndex
) [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 & aID Item ID of the new object.
const TDesC & aFilename Filename 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 aIndex Index 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 & aID Item ID of the new object.

SetFilename(const TDesC &)

IMPORT_C void SetFilename ( 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 & aFilename Reference to the descriptor containing new filename. Caller still owns the descriptor and must ensure that its lifetime is appropriate.

SetFilenameL(const TDesC &)

IMPORT_C void SetFilenameL ( 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 & aFilename Reference to the descriptor containing new filename. Content of the descriptor is copied into an internal buffer owned by CAknsBitmapItemDef.

SetIndex(const TInt)

IMPORT_C void SetIndex ( const TInt aIndex )

Sets bitmap file index of this item definition.

Since
2.0

Parameters

const TInt aIndex New index.

Member Data Documentation

TPtrC iFilename

TPtrC iFilename [protected]

HBufC * iFilenameBuf

HBufC * iFilenameBuf [protected]

TInt iIndex

TInt iIndex [protected]