#include <mw/eikimage.h>
class CEikImage : public CEikAlignedControl |
Public Member Functions | |
---|---|
CEikImage() | |
~CEikImage() | |
IMPORT_C const CFbsBitmap * | Bitmap() |
virtual IMPORT_C void | ConstructFromResourceL(TResourceReader &) |
IMPORT_C void | CreatePictureFromFileL(const TDesC &, TInt, TInt) |
virtual IMPORT_C void | HandlePointerEventL(const TPointerEvent &) |
IMPORT_C TBool | IsPictureOwnedExternally() |
IMPORT_C const CFbsBitmap * | Mask() |
virtual IMPORT_C TSize | MinimumSize() |
IMPORT_C void | SetBitmap(const CFbsBitmap *) |
IMPORT_C void | SetBrushStyle(CGraphicsContext::TBrushStyle) |
IMPORT_C void | SetEmphasis(TBool) |
IMPORT_C void | SetMask(const CFbsBitmap *) |
IMPORT_C void | SetNewBitmaps(const CFbsBitmap *, const CFbsBitmap *) |
IMPORT_C void | SetPicture(const CFbsBitmap *, const CFbsBitmap *) |
IMPORT_C void | SetPictureOwnedExternally(TBool) |
Protected Member Functions | |
---|---|
virtual IMPORT_C void | WriteInternalStateL(RWriteStream &) |
Inherited Attributes | |
---|---|
CCoeControl::iCoeEnv | |
CCoeControl::iContext | |
CCoeControl::iPosition | |
CCoeControl::iSize | |
CEikAlignedControl::iAlignment | |
CEikAlignedControl::iMargin |
Inherited Enumerations | |
---|---|
CCoeControl:TZoomType |
The package class CEikImage enables bitmaps to be packaged into an image. Two bitmaps can be packaged, one for the image itself and, optionally, another for the image s mask.
IMPORT_C const CFbsBitmap * | Bitmap | ( | ) | const |
Gets a pointer of CFbsBitmap object.
Returns: Pointer to handle to the bitmap or NULL.
IMPORT_C void | ConstructFromResourceL | ( | TResourceReader & | aReader | ) | [virtual] |
Reimplemented from CCoeControl::ConstructFromResourceL(TResourceReader &)
Constructs an image from resource using the specified resource reader.
Parameter | Description |
---|---|
aReader | The resource reader. |
Creates a bitmap and a mask for an icon. If aMaskId is not negative then function allocates bitmap and mask objects and sets member variables to point at them. These bitmaps are not ready for drawing until they are initialized with SetSize() method. Usually, UI controls do this. Note also that a single SetSize() call initializes both the bitmap and the mask.
If aMaskId is not needed and not given then this function creates the bitmap for an icon. Returned object is saved to the member variable. The bitmap is not ready for drawing until it is initialized with SetSize() method. Usually, UI controls do this.
Parameter | Description |
---|---|
aFilename | File name. Can be either MBM or MIF file. Extension is changed based on the given bitmap ID. |
aMainId | Bitmap id. |
aMaskId | Mask id, by default -1. |
IMPORT_C void | HandlePointerEventL | ( | const TPointerEvent & | aPointerEvent | ) | [virtual] |
Reimplemented from CEikAlignedControl::HandlePointerEventL(const TPointerEvent &)
From CCoeControl.
Handles pointer events.
This function gets called whenever a pointer event occurs in the control, i.e. when the pointer is within the control's extent, or when the control has grabbed the pointer. The control should implement this function to handle pointer events.
Note: events of type EButton1Down are processed before HandlePointerEventL() is called in order to transfer keyboard focus to the control in which the EButton1Down event occurred.
If overriding HandlePointerEventL(), the implementation must include a base call to CCoeControl's HandlePointerEventL().
Parameter | Description |
---|---|
aPointerEvent | The pointer event. |
IMPORT_C TBool | IsPictureOwnedExternally | ( | ) |
Checks whether picture is owned externally.
Returns: ETrue if picture owned externally and EFalse if not.
IMPORT_C const CFbsBitmap * | Mask | ( | ) | const |
Gets pointer of CFbsBitmap object.
Returns: Pointer to handle to the bitmap's mask or NULL.
IMPORT_C TSize | MinimumSize | ( | ) | [virtual] |
Reimplemented from CCoeControl::MinimumSize()
Gets the minimum size required to draw the image.
Returns: The minimum size required to draw the image.
IMPORT_C void | SetBitmap | ( | const CFbsBitmap * | aBitmap | ) |
Sets new bitmap.
Parameter | Description |
---|---|
aBitmap | Pointer to CFbsBitmap object containing the bitmap. |
IMPORT_C void | SetBrushStyle | ( | CGraphicsContext::TBrushStyle | aBrushStyle | ) |
Sets the brush style.
Parameter | Description |
---|---|
aBrushStyle | A brush style. |
IMPORT_C void | SetEmphasis | ( | TBool | aEmphasis | ) |
Sets emphasis.
Parameter | Description |
---|---|
aEmphasis | Full emphasis if ETrue and if not then EFalse. |
IMPORT_C void | SetMask | ( | const CFbsBitmap * | aMaskBitmap | ) |
Sets new bitmap mask.
Parameter | Description |
---|---|
aMaskBitmap | Pointer to CFbsBitmap object containing the bitmap mask. |
IMPORT_C void | SetNewBitmaps | ( | const CFbsBitmap * | aNewBitmap, |
const CFbsBitmap * | aNewMask | |||
) |
Sets new bitmap and bitmap's mask.
Parameter | Description |
---|---|
aNewBitmap | A bitmap. |
aNewMask | A bitmap mask. |
IMPORT_C void | SetPicture | ( | const CFbsBitmap * | aBitmap, |
const CFbsBitmap * | aMaskBitmap = NULL | |||
) |
Sets picture parameters.
Parameter | Description |
---|---|
aBitmap | A bitmap. |
aMaskBitmap | A bitmap mask. |
IMPORT_C void | SetPictureOwnedExternally | ( | TBool | aOwnership | ) |
Sets the owner of the picture.
Parameter | Description |
---|---|
aOwnership | Etrue if owner is external and EFalse if not. |
IMPORT_C void | WriteInternalStateL | ( | RWriteStream & | aWriteStream | ) | const [protected, virtual] |
Reimplemented from CEikAlignedControl::WriteInternalStateL(RWriteStream &)const
From CCoeControl
Writes the internal state of the control and its components to a stream. Does nothing in release mode. Designed to be overidden and base called by subclasses.
Parameter | Description |
---|---|
aWriteStream | The pointer writestream. |