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 void ConstructFromResourceL ( TResourceReader &)
IMPORT_C void CreatePictureFromFileL (const TDesC &, TInt , TInt )
IMPORT_C void HandlePointerEventL (const TPointerEvent &)
IMPORT_C TBool IsPictureOwnedExternally ()
IMPORT_C const CFbsBitmap * Mask ()
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
IMPORT_C void WriteInternalStateL ( RWriteStream &)
Private Member Functions
IMPORT_C void Draw (const TRect &)
IMPORT_C void * ExtensionInterface ( TUid )
IMPORT_C void Reserved_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_C CEikImage ( )

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 void ConstructFromResourceL ( TResourceReader & aReader ) [virtual]

Constructs an image from resource using the specified resource reader.

Parameters

TResourceReader & aReader The resource reader.

CreatePictureFromFileL(const TDesC &, TInt, TInt)

IMPORT_C void CreatePictureFromFileL ( const TDesC & aFilename,
TInt aMainId,
TInt aMaskId = -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 & aFilename File name. Can be either MBM or MIF file. Extension is changed based on the given bitmap ID.
TInt aMainId Bitmap id.
TInt aMaskId = -1 Mask id, by default -1.

Draw(const TRect &)

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

Parameters

const TRect & aRect

ExtensionInterface(TUid)

IMPORT_C void * ExtensionInterface ( TUid aInterface ) [private, virtual]

Parameters

TUid aInterface

HandlePointerEventL(const TPointerEvent &)

IMPORT_C void HandlePointerEventL ( 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 & aPointerEvent The pointer event.

IsPictureOwnedExternally()

IMPORT_C TBool IsPictureOwnedExternally ( )

Checks whether picture is owned externally.

Mask()

IMPORT_C const CFbsBitmap * Mask ( ) const

Gets pointer of CFbsBitmap object.

MinimumSize()

IMPORT_C TSize MinimumSize ( ) [virtual]

Gets the minimum size required to draw the image.

Reserved_2()

IMPORT_C void Reserved_2 ( ) [private, virtual]

SetBitmap(const CFbsBitmap *)

IMPORT_C void SetBitmap ( const CFbsBitmap * aBitmap )

Sets new bitmap.

Parameters

const CFbsBitmap * aBitmap Pointer to CFbsBitmap object containing the bitmap.

SetBrushStyle(CGraphicsContext::TBrushStyle)

IMPORT_C void SetBrushStyle ( CGraphicsContext::TBrushStyle aBrushStyle )

Sets the brush style.

Parameters

CGraphicsContext::TBrushStyle aBrushStyle A brush style.

SetEmphasis(TBool)

IMPORT_C void SetEmphasis ( TBool aEmphasis )

Sets emphasis.

Parameters

TBool aEmphasis Full emphasis if ETrue and if not then EFalse.

SetMask(const CFbsBitmap *)

IMPORT_C void SetMask ( const CFbsBitmap * aMaskBitmap )

Sets new bitmap mask.

Parameters

const CFbsBitmap * aMaskBitmap Pointer to CFbsBitmap object containing the bitmap mask.

SetNewBitmaps(const CFbsBitmap *, const CFbsBitmap *)

IMPORT_C void SetNewBitmaps ( const CFbsBitmap * aNewBitmap,
const CFbsBitmap * aNewMask
)

Sets new bitmap and bitmap's mask.

Parameters

const CFbsBitmap * aNewBitmap A bitmap.
const CFbsBitmap * aNewMask A bitmap mask.

SetPicture(const CFbsBitmap *, const CFbsBitmap *)

IMPORT_C void SetPicture ( const CFbsBitmap * aBitmap,
const CFbsBitmap * aMaskBitmap = NULL
)

Sets picture parameters.

Parameters

const CFbsBitmap * aBitmap A bitmap.
const CFbsBitmap * aMaskBitmap = NULL A bitmap mask.

SetPictureOwnedExternally(TBool)

IMPORT_C void SetPictureOwnedExternally ( TBool aOwnership )

Sets the owner of the picture.

Parameters

TBool aOwnership Etrue if owner is external and EFalse if not.

WriteInternalStateL(RWriteStream &)

IMPORT_C void WriteInternalStateL ( 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 & aWriteStream The 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]