CEikImage Class Reference

#include <mw/eikimage.h>

class CEikImage : public CEikAlignedControl

Inherits from

Public Member Functions
CEikImage()
~CEikImage()
IMPORT_C const CFbsBitmap *Bitmap()
virtual IMPORT_C voidConstructFromResourceL(TResourceReader &)
IMPORT_C voidCreatePictureFromFileL(const TDesC &, TInt, TInt)
virtual IMPORT_C voidHandlePointerEventL(const TPointerEvent &)
IMPORT_C TBoolIsPictureOwnedExternally()
IMPORT_C const CFbsBitmap *Mask()
virtual 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
virtual IMPORT_C voidWriteInternalStateL(RWriteStream &)
Inherited Attributes
CCoeControl::iCoeEnv
CCoeControl::iContext
CCoeControl::iPosition
CCoeControl::iSize
CEikAlignedControl::iAlignment
CEikAlignedControl::iMargin
Inherited Enumerations
CCoeControl:TZoomType
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::CCoeControlArray
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()

Detailed Description

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.

Constructor & Destructor Documentation

CEikImage ( )

IMPORT_CCEikImage()

C++ default constructor.

~CEikImage ( )

IMPORT_C~CEikImage()

Destructor.

Member Function Documentation

Bitmap ( )

IMPORT_C const CFbsBitmap *Bitmap()const

Gets a pointer of CFbsBitmap object.

Returns: Pointer to handle to the bitmap or NULL.

ConstructFromResourceL ( TResourceReader & )

IMPORT_C voidConstructFromResourceL(TResourceReader &aReader)[virtual]

Reimplemented from CCoeControl::ConstructFromResourceL(TResourceReader &)

Constructs an image from resource using the specified resource reader.

ParameterDescription
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.

ParameterDescription
aFilenameFile name. Can be either MBM or MIF file. Extension is changed based on the given bitmap ID.
aMainIdBitmap id.
aMaskIdMask id, by default -1.

HandlePointerEventL ( const TPointerEvent & )

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

ParameterDescription
aPointerEventThe pointer event.

IsPictureOwnedExternally ( )

IMPORT_C TBoolIsPictureOwnedExternally()

Checks whether picture is owned externally.

Returns: ETrue if picture owned externally and EFalse if not.

Mask ( )

IMPORT_C const CFbsBitmap *Mask()const

Gets pointer of CFbsBitmap object.

Returns: Pointer to handle to the bitmap's mask or NULL.

MinimumSize ( )

IMPORT_C TSizeMinimumSize()[virtual]

Reimplemented from CCoeControl::MinimumSize()

Gets the minimum size required to draw the image.

Returns: The minimum size required to draw the image.

SetBitmap ( const CFbsBitmap * )

IMPORT_C voidSetBitmap(const CFbsBitmap *aBitmap)

Sets new bitmap.

ParameterDescription
aBitmapPointer to CFbsBitmap object containing the bitmap.

SetBrushStyle ( CGraphicsContext::TBrushStyle )

IMPORT_C voidSetBrushStyle(CGraphicsContext::TBrushStyleaBrushStyle)

Sets the brush style.

ParameterDescription
aBrushStyleA brush style.

SetEmphasis ( TBool )

IMPORT_C voidSetEmphasis(TBoolaEmphasis)

Sets emphasis.

ParameterDescription
aEmphasisFull emphasis if ETrue and if not then EFalse.

SetMask ( const CFbsBitmap * )

IMPORT_C voidSetMask(const CFbsBitmap *aMaskBitmap)

Sets new bitmap mask.

ParameterDescription
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.

ParameterDescription
aNewBitmapA bitmap.
aNewMaskA bitmap mask.

SetPicture ( const CFbsBitmap *, const CFbsBitmap * )

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

Sets picture parameters.

ParameterDescription
aBitmapA bitmap.
aMaskBitmapA bitmap mask.

SetPictureOwnedExternally ( TBool )

IMPORT_C voidSetPictureOwnedExternally(TBoolaOwnership)

Sets the owner of the picture.

ParameterDescription
aOwnershipEtrue if owner is external and EFalse if not.

WriteInternalStateL ( RWriteStream & )

IMPORT_C voidWriteInternalStateL(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.

Since
App-Framework_6.1
ParameterDescription
aWriteStreamThe pointer writestream.