CEikImage Class Reference

class CEikImage : public CEikAlignedControl

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.

Public Member Functions
CEikImage()
~CEikImage()
IMPORT_C const CFbsBitmap *Bitmap()
IMPORT_C voidConstructFromResourceL(TResourceReader &)
IMPORT_C voidCreatePictureFromFileL(const TDesC &, TInt, TInt)
IMPORT_C voidHandlePointerEventL(const TPointerEvent &)
IMPORT_C TBoolIsPictureOwnedExternally()
IMPORT_C const CFbsBitmap *Mask()
IMPORT_C TSizeMinimumSize()
IMPORT_C voidSetBitmap(const CFbsBitmap *)
IMPORT_C voidSetBrushStyle(CGraphicsContext::TBrushStyle)
IMPORT_C voidSetEmphasis(TBool)
IMPORT_C voidSetMask(const CFbsBitmap *)
IMPORT_C voidSetNewBitmaps(const CFbsBitmap *, const CFbsBitmap *)
IMPORT_C voidSetPicture(const CFbsBitmap *, const CFbsBitmap *)
IMPORT_C voidSetPictureOwnedExternally(TBool)
Protected Member Functions
IMPORT_C voidWriteInternalStateL(RWriteStream &)
Private Member Functions
IMPORT_C voidDraw(const TRect &)
IMPORT_C void *ExtensionInterface(TUid)
IMPORT_C voidReserved_2()
Inherited Functions
CAknControl::CAknControl()
CAknControl::~CAknControl()
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CCoeControl::AccumulatedZoom()const
CCoeControl::ActivateGc()const
CCoeControl::ActivateL()
CCoeControl::BackedUpWindow()const
CCoeControl::Background()const
CCoeControl::CCoeControl()
CCoeControl::CCoeControl(CCoeEnv *)
CCoeControl::CCoeControl(const CCoeControl &)
CCoeControl::CapturesPointer()const
CCoeControl::ClaimPointerGrab(TBool)
CCoeControl::ClaimPointerGrab(TInt,TBool)
CCoeControl::CloseWindow()
CCoeControl::ComponentArrayExists()const
CCoeControl::ComponentControl(TInt)const
CCoeControl::Components()
CCoeControl::Components()const
CCoeControl::ControlContext()const
CCoeControl::ControlEnv()const
CCoeControl::CopyControlContextFrom(const CCoeControl *)
CCoeControl::CountComponentControls()const
CCoeControl::CreateBackedUpWindowL(RWindowTreeNode &)
CCoeControl::CreateBackedUpWindowL(RWindowTreeNode &,TDisplayMode)
CCoeControl::CreateWindowL()
CCoeControl::CreateWindowL(RWindowGroup *)
CCoeControl::CreateWindowL(RWindowTreeNode &)
CCoeControl::CreateWindowL(const CCoeControl *)
CCoeControl::CustomGc()const
CCoeControl::DeactivateGc()const
CCoeControl::DrawBackground(const TRect &)const
CCoeControl::DrawDeferred()const
CCoeControl::DrawForeground(const TRect &)const
CCoeControl::DrawNow()const
CCoeControl::DrawNow(const TRect &)const
CCoeControl::DrawableWindow()const
CCoeControl::EnableDragEvents()
CCoeControl::EnableReportControlStateChange(TBool)
CCoeControl::EnableWindowTransparency()
CCoeControl::FindBackground()const
CCoeControl::FindFontProvider()const
CCoeControl::FocusChanged(TDrawNow)
CCoeControl::GetColor(TInt,TRgb &)const
CCoeControl::GetColorUseListL(CArrayFix< TCoeColorUse > &)const
CCoeControl::GetGc()const
CCoeControl::GetHelpContext(TCoeHelpContext &)const
CCoeControl::GrabbingComponent()const
CCoeControl::GrabbingComponent(TInt)const
CCoeControl::HandleComponentControlsResourceChange(TInt)
CCoeControl::HandleControlArrayEventL(CCoeControlArray::TEvent,const CCoeControlArray *,CCoeControl *,TInt)
CCoeControl::HandlePointerBufferReadyL()
CCoeControl::HandleRedrawEvent(const TRect &)const
CCoeControl::HandleResourceChange(TInt)
CCoeControl::HasBorder()const
CCoeControl::HitTest()const
CCoeControl::IgnoreEventsUntilNextPointerUp()
CCoeControl::Index(const CCoeControl *)const
CCoeControl::InitComponentArrayL()
CCoeControl::InputCapabilities()const
CCoeControl::IsActivated()const
CCoeControl::IsBackedUp()const
CCoeControl::IsBeingDestroyed()const
CCoeControl::IsBlank()const
CCoeControl::IsDimmed()const
CCoeControl::IsFocused()const
CCoeControl::IsNonFocusing()const
CCoeControl::IsReadyToDraw()const
CCoeControl::IsVisible()const
CCoeControl::LayoutManager()const
CCoeControl::MakeVisible(TBool)
CCoeControl::MaximumWidth()const
CCoeControl::MopSupplyObject(TTypeUid)
CCoeControl::NotifyFontChange(const CCoeFontProvider *)
CCoeControl::Observer()const
CCoeControl::OfferKeyEventL(const TKeyEvent &,TEventCode)
CCoeControl::OverrideColorL(TInt,TRgb)
CCoeControl::OwnsWindow()const
CCoeControl::Parent()
CCoeControl::Parent()const
CCoeControl::Position()const
CCoeControl::PositionChanged()
CCoeControl::PositionRelativeToScreen()const
CCoeControl::PrepareForFocusGainL()
CCoeControl::PrepareForFocusLossL()
CCoeControl::ProcessPointerBufferReadyL()
CCoeControl::ProcessPointerEventL(const TPointerEvent &)
CCoeControl::Rect()const
CCoeControl::RecursivelyMergeInputCapabilities(TCoeInputCapabilities &)const
CCoeControl::RecursivelyMergedInputCapabilities()const
CCoeControl::RefetchPixelMappingL()
CCoeControl::RemoveFromParent()
CCoeControl::ReportEventL(MCoeControlObserver::TCoeEvent)
CCoeControl::RequestRelayout(const CCoeControl *)
CCoeControl::ResetGc()const
CCoeControl::ScreenFont(const TCoeFont &)const
CCoeControl::SetAdjacent(TInt)
CCoeControl::SetAllowStrayPointers()
CCoeControl::SetBackground(const MCoeControlBackground *)
CCoeControl::SetBlank()
CCoeControl::SetCanDrawOutsideRect()
CCoeControl::SetComponentsToInheritVisibility(TBool)
CCoeControl::SetContainerWindowL(RBackedUpWindow &)
CCoeControl::SetContainerWindowL(RWindow &)
CCoeControl::SetContainerWindowL(const CCoeControl &)
CCoeControl::SetControlContext(MCoeControlContext *)
CCoeControl::SetCornerAndSize(TGulAlignment,const TSize &)
CCoeControl::SetCustomGc(CWindowGc *)
CCoeControl::SetDimmed(TBool)
CCoeControl::SetExtent(const TPoint &,const TSize &)
CCoeControl::SetExtentToWholeScreen()
CCoeControl::SetFocus(TBool,TDrawNow)
CCoeControl::SetFocusing(TBool)
CCoeControl::SetFontProviderL(const CCoeFontProvider &)
CCoeControl::SetGc(CWindowGc *)const
CCoeControl::SetGloballyCapturing(TBool)
CCoeControl::SetHitTest(const MCoeControlHitTest *)
CCoeControl::SetLayoutManagerL(MCoeLayoutManager *)
CCoeControl::SetMaximumWidth(TInt)
CCoeControl::SetMopParent(MObjectProvider *)
CCoeControl::SetNeighbor(CCoeControl *)
CCoeControl::SetNonFocusing()
CCoeControl::SetObserver(MCoeControlObserver *)
CCoeControl::SetParent(CCoeControl *)
CCoeControl::SetPointerCapture(TBool)
CCoeControl::SetPosition(const TPoint &)
CCoeControl::SetRect(const TRect &)
CCoeControl::SetSize(const TSize &)
CCoeControl::SetSizeWithoutNotification(const TSize &)
CCoeControl::SetTextBaselineSpacing(TInt)
CCoeControl::SetUniqueHandle(TInt)
CCoeControl::SetZoomFactorL(TInt,TZoomType)
CCoeControl::Size()const
CCoeControl::SizeChanged()
CCoeControl::SystemGc()const
CCoeControl::TextBaselineOffset(const TSize &)const
CCoeControl::TextDrawer(TInt)const
CCoeControl::UniqueHandle()const
CCoeControl::Window()const
CCoeControl::WriteInternalStateNowL(RWriteStream &)const
CCoeControl::ZoomWithType()const
CCoeControl::operator=(const CCoeControl &)
CCoeControl::~CCoeControl()
CEikAlignedControl::CEikAlignedControl()
CEikAlignedControl::SetAlignment(TGulAlignmentValue)
CEikAlignedControl::SetAllMarginsTo(TInt)
CEikAlignedControl::~CEikAlignedControl()
Inherited Enumerations
CCoeControl:TZoomType
Private Attributes
const CFbsBitmap *iBitmap
CGraphicsContext::TBrushStyle iBrushStyle
TInt iImFlags
const CFbsBitmap *iMaskBitmap
TInt iSpare
Inherited Attributes
CCoeControl::iCoeEnv
CCoeControl::iContext
CCoeControl::iPosition
CCoeControl::iSize
CEikAlignedControl::iAlignment
CEikAlignedControl::iMargin

Constructor & Destructor Documentation

CEikImage()

IMPORT_CCEikImage()

C++ default constructor.

~CEikImage()

IMPORT_C~CEikImage()

Destructor.

Member Functions Documentation

Bitmap()

IMPORT_C const CFbsBitmap *Bitmap()const

Gets a pointer of CFbsBitmap object.

ConstructFromResourceL(TResourceReader &)

IMPORT_C voidConstructFromResourceL(TResourceReader &aReader)[virtual]

Constructs an image from resource using the specified resource reader.

Parameters

TResourceReader & aReaderThe resource reader.

CreatePictureFromFileL(const TDesC &, TInt, TInt)

IMPORT_C voidCreatePictureFromFileL(const TDesC &aFilename,
TIntaMainId,
TIntaMaskId = -1
)

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.

Parameters

const TDesC & aFilenameFile name. Can be either MBM or MIF file. Extension is changed based on the given bitmap ID.
TInt aMainIdBitmap id.
TInt aMaskId = -1Mask id, by default -1.

Draw(const TRect &)

IMPORT_C voidDraw(const TRect &aRect)const [private, virtual]

Parameters

const TRect & aRect

ExtensionInterface(TUid)

IMPORT_C void *ExtensionInterface(TUidaInterface)[private, virtual]

Parameters

TUid aInterface

HandlePointerEventL(const TPointerEvent &)

IMPORT_C voidHandlePointerEventL(const TPointerEvent &aPointerEvent)[virtual]

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().

Parameters

const TPointerEvent & aPointerEventThe pointer event.

IsPictureOwnedExternally()

IMPORT_C TBoolIsPictureOwnedExternally()

Checks whether picture is owned externally.

Mask()

IMPORT_C const CFbsBitmap *Mask()const

Gets pointer of CFbsBitmap object.

MinimumSize()

IMPORT_C TSizeMinimumSize()[virtual]

Gets the minimum size required to draw the image.

Reserved_2()

IMPORT_C voidReserved_2()[private, virtual]

SetBitmap(const CFbsBitmap *)

IMPORT_C voidSetBitmap(const CFbsBitmap *aBitmap)

Sets new bitmap.

Parameters

const CFbsBitmap * aBitmapPointer to CFbsBitmap object containing the bitmap.

SetBrushStyle(CGraphicsContext::TBrushStyle)

IMPORT_C voidSetBrushStyle(CGraphicsContext::TBrushStyleaBrushStyle)

Sets the brush style.

Parameters

CGraphicsContext::TBrushStyle aBrushStyleA brush style.

SetEmphasis(TBool)

IMPORT_C voidSetEmphasis(TBoolaEmphasis)

Sets emphasis.

Parameters

TBool aEmphasisFull emphasis if ETrue and if not then EFalse.

SetMask(const CFbsBitmap *)

IMPORT_C voidSetMask(const CFbsBitmap *aMaskBitmap)

Sets new bitmap mask.

Parameters

const CFbsBitmap * aMaskBitmapPointer to CFbsBitmap object containing the bitmap mask.

SetNewBitmaps(const CFbsBitmap *, const CFbsBitmap *)

IMPORT_C voidSetNewBitmaps(const CFbsBitmap *aNewBitmap,
const CFbsBitmap *aNewMask
)

Sets new bitmap and bitmap's mask.

Parameters

const CFbsBitmap * aNewBitmapA bitmap.
const CFbsBitmap * aNewMaskA bitmap mask.

SetPicture(const CFbsBitmap *, const CFbsBitmap *)

IMPORT_C voidSetPicture(const CFbsBitmap *aBitmap,
const CFbsBitmap *aMaskBitmap = NULL
)

Sets picture parameters.

Parameters

const CFbsBitmap * aBitmapA bitmap.
const CFbsBitmap * aMaskBitmap = NULLA bitmap mask.

SetPictureOwnedExternally(TBool)

IMPORT_C voidSetPictureOwnedExternally(TBoolaOwnership)

Sets the owner of the picture.

Parameters

TBool aOwnershipEtrue if owner is external and EFalse if not.

WriteInternalStateL(RWriteStream &)

IMPORT_C voidWriteInternalStateL(RWriteStream &aWriteStream)const [protected, virtual]

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.

Since
App-Framework_6.1
Writes the internal state of the control and its components to aStream. Does nothing in release mode. Designed to be overidden and base called by subclasses.

Parameters

RWriteStream & aWriteStreamThe pointer writestream.

Member Data Documentation

const CFbsBitmap * iBitmap

const CFbsBitmap *iBitmap[private]

CGraphicsContext::TBrushStyle iBrushStyle

CGraphicsContext::TBrushStyle iBrushStyle[private]

TInt iImFlags

TInt iImFlags[private]

const CFbsBitmap * iMaskBitmap

const CFbsBitmap *iMaskBitmap[private]

TInt iSpare

TInt iSpare[private]