Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



Location: gulicon.h
Link against: egul.lib

Class CGulIcon

CGulIcon

Support

Supported from 6.0

Description

Packages two bitmaps, one each for an icon image and its mask.

Derivation

CBaseBase class for all classes to be instantiated on the heap
CGulIconPackages two bitmaps, one each for an icon image and its mask

Defined in CGulIcon:
Bitmap(), BitmapsOwnedExternally(), Mask(), NewL(), NewLC(), SetBitmap(), SetBitmapsOwnedExternally(), SetMask(), ~CGulIcon()

Inherited from CBase:
operator new()


Construction/destruction


NewLC()

static CGulIcon* NewLC();

Description

Creates a new icon and leaves it on the cleanup stack.

Return value

CGulIcon*

The new icon.


NewL()

static CGulIcon* NewL();

Description

Creates a new icon.

Return value

CGulIcon*

The new icon.


NewL()

static CGulIcon* NewL(CFbsBitmap* aBitmap, CFbsBitmap* aMask=NULL);

Description

Creates a new icon using the bitmap and mask.

It takes ownership of the bitmap and mask and returns a pointer to the object.

Parameters

CFbsBitmap* aBitmap

The icon bitmap.

CFbsBitmap* aMask=NULL

The icon mask.

Return value

CGulIcon*

The new icon.


~CGulIcon()

~CGulIcon();

Description

Destructor.

[Top]


Setting bitmaps and masks


SetBitmap()

void SetBitmap(CFbsBitmap* aBitmap);

Description

Sets the icon image’s bitmap.

Transfers ownership unless bitmaps are set to be owned externally.

Parameters

CFbsBitmap* aBitmap

Pointer to the icon image's bitmap.


SetMask()

void SetMask(CFbsBitmap* aMask);

Description

Sets the icon image’s mask.

The mask can be set to be identical to the bitmap if the bitmap is self-masking.

Parameters

CFbsBitmap* aMask

Pointer to the icon image's mask.


Bitmap()

CFbsBitmap* Bitmap() const;

Description

Gets the icon image's bitmap.

Does not normally imply transfer of ownership. Ownership can be taken if bitmaps are set to be owned externally.

Return value

CFbsBitmap*

Pointer to the icon image's bitmap.


Mask()

CFbsBitmap* Mask() const;

Description

Gets the icon image's mask.

Return value

CFbsBitmap*

Pointer to the icon image's mask.


SetBitmapsOwnedExternally()

void SetBitmapsOwnedExternally(TBool aOwnedExternally);

Description

Sets the bitmap and mask to be owned externally.

Parameters

TBool aOwnedExternally

ETrue if bitmaps are set as externally owned. EFalse if bitmaps are set as not being externally owned.


BitmapsOwnedExternally()

TBool BitmapsOwnedExternally() const;

Description

Gets the icon bitmap ownership.

Return value

TBool

ETrue if bitmaps are set as externally owned. EFalse if bitmaps are set as not being externally owned.