CMsgFormComponent Class Reference

class CMsgFormComponent : public CEikBorderedControl

Defines a base class for message editor/viewer form component (header or body).

Public Member Functions
CMsgFormComponent (const TMargins &)
~CMsgFormComponent ()
void AddControlL ( CMsgBaseControl *, TInt , TInt )
void BaseConstructL (const CCoeControl &)
TBool ChangeFocusTo ( TInt , TDrawNow )
CMsgBaseControl * Component ( TInt )
CCoeControl * ComponentControl ( TInt )
TInt ComponentIndexFromId ( TInt )
CMsgBaseControl * ControlFromPosition ( TPoint , TBool )
TInt CountComponentControls ()
TInt CountMsgControls ()
TInt CurrentFocus ()
TRect CurrentLineRect ()
TInt FirstFocusableControl ( TInt , TMsgFocusDirection )
CMsgBaseControl * FocusedControl ()
TMargins Margins ()
CMsgBaseControl * MsgControl ( TInt )
void NotifyControlsForEvent ( TMsgViewEvent , TInt )
TKeyResponse OfferKeyEventL (const TKeyEvent &, TEventCode )
CMsgBaseControl * RemoveControlL ( TInt )
void ResetControls ()
void SetAndGetSizeL ( TSize &, TBool )
TInt VirtualExtension ()
TInt VirtualHeight ()
Protected Member Functions
void FocusChanged ( TDrawNow )
void HandleResourceChange ( TInt )
void SizeChanged ()
Private Member Functions
CMsgFormComponent ()
TInt DoAddControlL ( CMsgBaseControl *, TInt )
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::Components()
CCoeControl::Components()const
CCoeControl::ConstructFromResourceL(TResourceReader &)
CCoeControl::ControlContext()const
CCoeControl::ControlEnv()const
CCoeControl::CopyControlContextFrom(const CCoeControl *)
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::GetColor(TInt,TRgb &)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::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::MinimumSize()
CCoeControl::MopSupplyObject(TTypeUid)
CCoeControl::NotifyFontChange(const CCoeFontProvider *)
CCoeControl::Observer()const
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::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::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()
CEikBorderedControl::Border()const
CEikBorderedControl::CEikBorderedControl()
CEikBorderedControl::CEikBorderedControl(const TGulBorder &)
CEikBorderedControl::Draw(const TRect &)const
CEikBorderedControl::GetColorUseListL(CArrayFix< TCoeColorUse > &)const
CEikBorderedControl::HandlePointerEventL(const TPointerEvent &)
CEikBorderedControl::HasBorder()const
CEikBorderedControl::SetAdjacent(TInt)
CEikBorderedControl::SetBorder(TGulBorder::TBorderType)
CEikBorderedControl::SetBorder(TInt)
CEikBorderedControl::WriteInternalStateL(RWriteStream &)const
Inherited Enumerations
CCoeControl:TZoomType
Protected Attributes
CMsgControlArray * iControls
TInt iCurrentFocus
TMargins iMargins
Inherited Attributes
CCoeControl::iCoeEnv
CCoeControl::iContext
CCoeControl::iPosition
CCoeControl::iSize
CEikBorderedControl::iBorder

Constructor & Destructor Documentation

CMsgFormComponent(const TMargins &)

CMsgFormComponent ( const TMargins & aMargins )

Constructor.

Parameters

const TMargins & aMargins

CMsgFormComponent()

CMsgFormComponent ( ) [private]

Constructor (not available).

~CMsgFormComponent()

~CMsgFormComponent ( ) [virtual]

Destructor.

Member Functions Documentation

AddControlL(CMsgBaseControl *, TInt, TInt)

void AddControlL ( CMsgBaseControl * aControl,
TInt aControlId,
TInt aIndex = 0
)

Adds a control aControl to the control array to position aIndex and sets control id for the control.

Parameters

CMsgBaseControl * aControl
TInt aControlId
TInt aIndex = 0

BaseConstructL(const CCoeControl &)

void BaseConstructL ( const CCoeControl & aParent )

Parameters

const CCoeControl & aParent

ChangeFocusTo(TInt, TDrawNow)

TBool ChangeFocusTo ( TInt aNewFocus,
TDrawNow aDrawNow = EDrawNow
)

Changes focus to a control whose index is aNewFocus. Returns EFalse if focus cannot be changed.

Parameters

TInt aNewFocus
TDrawNow aDrawNow = EDrawNow

Component(TInt)

CMsgBaseControl * Component ( TInt aControlId ) const

Return a pointer to a control by given control id aControlId. If the control cannot be found returns NULL.

Parameters

TInt aControlId

ComponentControl(TInt)

CCoeControl * ComponentControl ( TInt aIndex ) const [virtual]

Returns a control of index aIndex.

Parameters

TInt aIndex

ComponentIndexFromId(TInt)

TInt ComponentIndexFromId ( TInt aControlId ) const

Returns control's array index by given control id aControlId.

Parameters

TInt aControlId

ControlFromPosition(TPoint, TBool)

CMsgBaseControl * ControlFromPosition ( TPoint aPosition,
TBool aEvaluateHitTest
) const

Returns control which is located at given position.

Since
3.2

Parameters

TPoint aPosition Given position.
TBool aEvaluateHitTest

CountComponentControls()

TInt CountComponentControls ( ) const [virtual]

Returns a number of controls.

CountMsgControls()

TInt CountMsgControls ( ) const

Returns a number of MsgBaseControl based controls

CurrentFocus()

TInt CurrentFocus ( ) const

Returns index of currently focused control.

CurrentLineRect()

TRect CurrentLineRect ( )

Returns the current control rect.

DoAddControlL(CMsgBaseControl *, TInt)

TInt DoAddControlL ( CMsgBaseControl * aControl,
TInt aIndex
) [private]

Adds control aControl to the component array to position aIndex. If aIndex = the number components in the array or EMsgAppendControl, appends the control to end of the array. Panics is aIndex is incorrect.

Parameters

CMsgBaseControl * aControl
TInt aIndex

FirstFocusableControl(TInt, TMsgFocusDirection)

TInt FirstFocusableControl ( TInt aStart,
TMsgFocusDirection aDirection
)

Return index of first focusable control

Parameters

TInt aStart start index to search.
TMsgFocusDirection aDirection direction to search.

FocusChanged(TDrawNow)

void FocusChanged ( TDrawNow aDrawNow ) [protected, virtual]

This is called when the focus of the control is changed.

Parameters

TDrawNow aDrawNow

FocusedControl()

CMsgBaseControl * FocusedControl ( ) const

Returns a pointer to the focused control.

HandleResourceChange(TInt)

void HandleResourceChange ( TInt aType ) [protected, virtual]

From CCoeControl Handles a resource relative event

Parameters

TInt aType

Margins()

TMargins Margins ( ) const

Returns margins.

MsgControl(TInt)

CMsgBaseControl * MsgControl ( TInt aIndex ) const

Returns a MsgBaseControl based control of index aIndex.

Parameters

TInt aIndex

NotifyControlsForEvent(TMsgViewEvent, TInt)

void NotifyControlsForEvent ( TMsgViewEvent aEvent,
TInt aParam
) [virtual]

Parameters

TMsgViewEvent aEvent
TInt aParam

OfferKeyEventL(const TKeyEvent &, TEventCode)

TKeyResponse OfferKeyEventL ( const TKeyEvent & aKeyEvent,
TEventCode aType
) [virtual]

Handles key events.

Parameters

const TKeyEvent & aKeyEvent
TEventCode aType

RemoveControlL(TInt)

CMsgBaseControl * RemoveControlL ( TInt aControlId )

Removes a control from array by given control id aControlId and returns pointer to it. If the control cannot be found retuns NULL.

Parameters

TInt aControlId

ResetControls()

void ResetControls ( )

Resets (= clears) controls from this component.

SetAndGetSizeL(TSize &, TBool)

void SetAndGetSizeL ( TSize & aSize,
TBool aInit
) [pure virtual]

Calculates and sets the size for the control and returns new size as reference aSize. If aInit == ETrue, sets also size for the controls by calling their SetAndGetSizeL functions.

Parameters

TSize & aSize
TBool aInit

SizeChanged()

void SizeChanged ( ) [protected, virtual]

Sets new position for all the controls.

VirtualExtension()

TInt VirtualExtension ( )

Returns total of pixels above each control' band. This function is needed for the scroll bar for estimating message form's position relative to screen.

VirtualHeight()

TInt VirtualHeight ( )

Return virtual height of components.

Member Data Documentation

CMsgControlArray * iControls

CMsgControlArray * iControls [protected]

TInt iCurrentFocus

TInt iCurrentFocus [protected]

TMargins iMargins

TMargins iMargins [protected]