Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



Location: eikimage.h
Link against: eikcoctl.lib

Class CEikImage

CEikImage

Support

Supported from 6.0

Description

This class provides functions that enable you to package bitmaps into an image. Two bitmaps can be packaged, one for the image itself and, optionally, another for the image’s mask.

Derivation

CBaseBase class for all classes to be instantiated on the heap
CCoeControlControl base class from which all other controls are derived
CEikAlignedControlThis class extends the CCoeControl class in order to support extra functionality such as control alignment and margins
CEikImageThis class provides functions that enable you to package bitmaps into an image

Defined in CEikImage:
Bitmap(), CEikImage(), ConstructFromResourceL(), CreatePictureFromFileL(), IsPictureOwnedExternally(), Mask(), MinimumSize(), SetBitmap(), SetEmphasis(), SetMask(), SetPicture(), SetPictureOwnedExternally(), ~CEikImage()

Inherited from CBase:
operator new()

Inherited from CCoeControl:
ActivateGc(), ActivateL(), BackedUpWindow(), CapturesPointer(), ClaimPointerGrab(), CloseWindow(), ComponentControl(), ControlContext(), ControlEnv(), CopyControlContextFrom(), CountComponentControls(), CreateBackedUpWindowL(), CreateWindowL(), DeactivateGc(), DrawDeferred(), DrawNow(), DrawableWindow(), EnableDragEvents(), FocusChanged(), GetColor(), GetColorUseListL(), GetHelpContext(), GrabbingComponent(), HandleComponentControlsResourceChange(), HandlePointerBufferReadyL(), HandlePointerEventL(), HandleRedrawEvent(), HandleResourceChange(), HasBorder(), IgnoreEventsUntilNextPointerUp(), Index(), InputCapabilities(), IsActivated(), IsBackedUp(), IsBeingDestroyed(), IsBlank(), IsDimmed(), IsFocused(), IsNonFocusing(), IsReadyToDraw(), IsVisible(), MakeVisible(), Observer(), OfferKeyEventL(), OverrideColorL(), OwnsWindow(), Position(), PositionChanged(), PositionRelativeToScreen(), PrepareForFocusGainL(), PrepareForFocusLossL(), Rect(), RecursivelyMergedInputCapabilities(), ReportEventL(), ResetGc(), SetAdjacent(), SetAllowStrayPointers(), SetBlank(), SetCanDrawOutsideRect(), SetComponentsToInheritVisibility(), SetContainerWindow(), SetContainerWindowL(), SetControlContext(), SetCornerAndSize(), SetCornerAndSizeL(), SetDimmed(), SetExtent(), SetExtentL(), SetExtentToWholeScreen(), SetExtentToWholeScreenL(), SetFocus(), SetFocusing(), SetGloballyCapturing(), SetNeighbor(), SetNonFocusing(), SetObserver(), SetPointerCapture(), SetPosition(), SetRect(), SetRectL(), SetSize(), SetSizeL(), SetSizeWithoutNotification(), SetSizeWithoutNotificationL(), Size(), SizeChanged(), SizeChangedL(), SystemGc(), Window()

Inherited from CEikAlignedControl:
SetAlignment(), SetAllMarginsTo(), iAlignment, iMargin


Construction and destruction


CEikImage()

CEikImage();

Description

Default constructor.


ConstructFromResourceL()

void ConstructFromResourceL(TResourceReader& aReader);

Description

Constructs an image from resource using the specified resource reader.

Parameters

TResourceReader& aReader

The resource reader.


~CEikImage()

~CEikImage();

Description

Destructor.

[Top]


Determining the minimum size


MinimumSize()

TSize MinimumSize();

Description

Gets the minimum size required to draw the image.

Return value

TSize

The minimum size required to draw the image.

[Top]


Creating an image from file


CreatePictureFromFileL()

void CreatePictureFromFileL(const TDesC& aFilename,TInt aMainId,TInt aMaskId=-1);

Description

Creates an image from file.

Parameters

const TDesC& aFilename

The file from which the image is created.

TInt aMainId

The ID of the bitmap to use in the image.

TInt aMaskId=-1

The ID of the bitmap mask to use in the image. This can be the same as aMainId if you wish to use the same bitmap as both the bitmap and mask.

[Top]


Getting and setting image bitmaps and masks


Bitmap()

const CFbsBitmap* Bitmap() const;

Description

Gets the image’s bitmap.

Return value

CFbsBitmap*

The image’s bitmap.


Mask()

const CFbsBitmap* Mask() const;

Description

Gets the image’s bitmap mask.

Return value

CFbsBitmap*

The image’s bitmap mask.


SetBitmap()

void SetBitmap(const CFbsBitmap* aBitmap);

Description

Sets the image’s bitmap.

Parameters

const CFbsBitmap* aBitmap

The image’s bitmap.


SetMask()

void SetMask(const CFbsBitmap* aMaskBitmap);

Description

Sets the image’s bitmap mask.

Parameters

const CFbsBitmap* aMaskBitmap

The image’s bitmap mask.


SetPicture()

void SetPicture(const CFbsBitmap* aBitmap,const CFbsBitmap* aMaskBitmap);

Description

Sets the image’s bitmap and mask.

Parameters

const CFbsBitmap* aBitmap

The image’s bitmap.

const CFbsBitmap* aMaskBitmap

The image’s bitmap mask.

[Top]


Image emphasis


SetEmphasis()

void SetEmphasis(TBool aEmphasis);

Description

Sets the image’s emphasis.

Parameters

TBool aEmphasis

ETrue to set the image as emphasised, EFalse to set the image as not emphasised.

[Top]


External ownership


SetPictureOwnedExternally()

void SetPictureOwnedExternally(TBool aOwnership);

Description

Sets whether the image’s bitmaps are externally owned.

Parameters

TBool aOwnership

ETrue to set the image as externally owned, EFalse to set the image as not externally owned.


IsPictureOwnedExternally()

TBool IsPictureOwnedExternally();

Description

Tests whether the image is owned externally.

Return value

TBool

ETrue if the image is externally owned, EFalse otherwise.