CMsgEditorView Class Reference

class CMsgEditorView : public CCoeControl

Defines an API for message editor/viewer view.

MsgEditor.lib
Since
S60 v2.0

Inherits from

Public Member Functions
~CMsgEditorView()
IMPORT_C TIntAddControlFromResourceL(TInt, TInt, TInt, TMsgFormComponent)
IMPORT_C voidAddControlL(CMsgBaseControl *, TInt, TInt, TMsgFormComponent)
IMPORT_C CMsgBaseControl *ControlById(TInt)
IMPORT_C voidDeleteControlL(TInt)
IMPORT_C voidExecuteL(const TRect &, TInt)
IMPORT_C CMsgBaseControl *FocusedControl()
IMPORT_C CCoeControl &FormComponent(TMsgFormComponent)
TBool HandleBaseControlEventRequestL(CMsgBaseControl *, TMsgControlEventRequest, TInt)
TBool HandleBaseControlEventRequestL(CMsgBaseControl *, TMsgControlEventRequest)
TInt HandleEditObserverEventRequestL(const CCoeControl *, TMsgControlEventRequest, TAny *, TAny *, TAny *)
voidHandlePointerEventL(const TPointerEvent &)
voidHandleResourceChange(TInt)
IMPORT_C voidHandleScreenSizeChangeL(const TRect &)
voidHandleScrollEventL(CEikScrollBar *, TEikScrollEvent)
IMPORT_C TBoolIsAnyControlModified()
IMPORT_C CItemFinder *ItemFinder()
IMPORT_C MObjectProvider *MopNext()
IMPORT_C TTypeUid::PtrMopSupplyObject(TTypeUid)
IMPORT_C CMsgEditorView *NewL(MMsgEditorObserver &, TUint32)
IMPORT_C TKeyResponseOfferKeyEventL(const TKeyEvent &, TEventCode)
IMPORT_C CMsgBaseControl *RemoveControlL(TInt)
IMPORT_C voidResetControls()
IMPORT_C voidResetControls(TMsgFormComponent)
IMPORT_C voidSetControlsModified(TBool)
voidSetCurrentPart(TInt)
IMPORT_C voidSetEdwinObserverL(MEikEdwinObserver *)
IMPORT_C voidSetFocus(TInt)
voidSetScrollParts(TInt)
TBool ViewInitialized()
TRect ViewRect()
Protected Member Functions
CCoeControl *ComponentControl(TInt)
TInt CountComponentControls()
voidDraw(const TRect &)
voidFocusChanged(TDrawNow)
voidHandleControlEventL(CCoeControl *, TCoeEvent)
voidSizeChanged()
Private Member Functions
CMsgEditorView(MMsgEditorObserver &, TUint32)
CMsgEditorView()
voidAdjustComponentDistances()
const TAknDoubleSpanScrollBarModel *AknScrollBarModel()
voidConstructL()
CMsgBaseControl *ControlFromPosition(TPoint, TBool)
TBool ControlFullyVisible(CMsgBaseControl *)
voidCreateBodyL()
voidCreateHeaderL()
voidCreateScrollBarL()
TInt CurrentScrollPart(TInt)
voidDoAddControlL(CMsgBaseControl *, TInt, TInt, TMsgFormComponent)
voidDoScrollViewL(TInt &, TMsgScrollDirection)
voidEnsureCorrectCursorPosition()
TBool EnsureCorrectFormPosition(TBool, TBool)
voidEnsureCorrectScrollPartL(TInt)
voidEnsureCorrectViewPosition()
TBool EnsureVisiblePartScrollComplete(TInt, TMsgScrollDirection)
voidGetVirtualFormHeightAndPos(TInt &, TInt &)
TBool HandleHeightChangedL(CMsgBaseControl *, TInt)
TBool IsFocusable(CMsgBaseControl *, TMsgFocusDirection)
TBool IsReadOnly()
TInt NextFocusableFormControl(CMsgFormComponent *, TInt, TMsgFocusDirection)
voidNotifyControlsForEvent(TMsgViewEvent, TInt)
voidRefreshViewL()
voidReportFocusMovement(TInt)
TBool RotateFocusL(TMsgFocusDirection, MMsgEditorObserver::TMsgFocusEvent &)
TBool ScrollForm(TInt, TBool)
voidScrollViewL(TInt, TMsgScrollDirection, TBool)
TBool SetAfterFocusL(MMsgEditorObserver::TMsgAfterFocusEventFunc)
voidSetAndGetSizeL(TSize &, TBool)
voidSetComponentsInitialized()
voidSetFocusByControlIdL(TInt, TBool, TBool)
voidSetViewRect(const TRect &)
voidShowScrollPopupInfoTextL(CAknDoubleSpanScrollBar *, TInt)
voidUpdateScrollBarL()
Inherited Functions
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::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::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::MinimumSize()
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::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::SystemGc()const
CCoeControl::TextBaselineOffset(const TSize &)const
CCoeControl::TextDrawer(TInt)const
CCoeControl::UniqueHandle()const
CCoeControl::Window()const
CCoeControl::WriteInternalStateL(RWriteStream &)const
CCoeControl::WriteInternalStateNowL(RWriteStream &)const
CCoeControl::ZoomWithType()const
CCoeControl::operator=(const CCoeControl &)
CCoeControl::~CCoeControl()
Public Member Enumerations
enumTMsgEditorMode { EMsgEditorModeNone = 0x00, EMsgEditorModeNormal = 0x01, EMsgReadOnly = 0x02, EMsgDoNotUseDefaultBodyControl = 0x04 }
Private Member Enumerations
enumTMsgFocus { EMsgNoneFocused, EMsgHeaderFocused, EMsgBodyFocused }
Inherited Enumerations
CCoeControl:TZoomType
Private Attributes
TInt iBaseLineOffset
CAknsBasicBackgroundControlContext *iBgContext
CMsgBody *iBody
TMsgFocus iCurrentFocus
TUint32 iEditorModeFlags
MMsgEditorObserver &iEditorObserver
MEikEdwinObserver *iEdwinObserver
TInt iFormOffset
CMsgHeader *iHeader
TInt iLineHeight
TBool iMoveUpDownEvent
TInt iPopUpPart
TMsgFocus iPrevFocus
RConeResourceLoaderiResourceLoader
CEikScrollBarFrame *iScrollBar
CArrayFixFlat< TInt > *iScrollPartArray
TInt iScrollParts
HBufC *iScrollPopText
TUint32 iStateFlags
TInt iUniqueHandlePool
TInt iViewFocusPosition
TRect iViewRect
TInt iVisiblePart
TInt iVisiblePartHeight
Inherited Attributes
CCoeControl::iCoeEnv
CCoeControl::iContext
CCoeControl::iPosition
CCoeControl::iSize

Constructor & Destructor Documentation

CMsgEditorView(MMsgEditorObserver &, TUint32)

CMsgEditorView(MMsgEditorObserver &aObserver,
TUint32aEditorModeFlags
)[private]

Constructor.

Parameters

MMsgEditorObserver & aObserver
TUint32 aEditorModeFlags

CMsgEditorView()

CMsgEditorView()[private]

Constructor (not available).

~CMsgEditorView()

IMPORT_C~CMsgEditorView()

Destructor.

Member Functions Documentation

AddControlFromResourceL(TInt, TInt, TInt, TMsgFormComponent)

IMPORT_C TIntAddControlFromResourceL(TIntaResourceId,
TIntaControlType,
TIntaIndex,
TMsgFormComponentaFormComponent
)

Constructs a control of type aControlType from resource and adds it to a form component aFormComponent. The control is added to a position aIndex.

Leaves with KErrNotFound if aControlType is incorrect.

Parameters

TInt aResourceId
TInt aControlType
TInt aIndex
TMsgFormComponent aFormComponent

AddControlL(CMsgBaseControl *, TInt, TInt, TMsgFormComponent)

IMPORT_C voidAddControlL(CMsgBaseControl *aControl,
TIntaControlId,
TIntaIndex,
TMsgFormComponentaFormComponent
)

Adds a control given by aControl to a form component aFormComponent. The control is added to a position aIndex with control id aControlId.

Parameters

CMsgBaseControl * aControl
TInt aControlId
TInt aIndex
TMsgFormComponent aFormComponent

AdjustComponentDistances()

voidAdjustComponentDistances()[private]

Sets proper distances between controls to obey LAF coordinates.

AknScrollBarModel()

const TAknDoubleSpanScrollBarModel *AknScrollBarModel()const [private, inline]

Convenience function for casting the scroll bar model.

ComponentControl(TInt)

CCoeControl *ComponentControl(TIntaIndex)const [protected, virtual]

Returns a control of index aIndex.

Parameters

TInt aIndex

ConstructL()

voidConstructL()[private]

2nd phase constructor.

ControlById(TInt)

IMPORT_C CMsgBaseControl *ControlById(TIntaControlId)const

Finds a control from the header and the body by id and returns a pointer to it. If a control cannot be found, returns NULL.

Parameters

TInt aControlId

ControlFromPosition(TPoint, TBool)

CMsgBaseControl *ControlFromPosition(TPointaPosition,
TBoolaEvaluateHitTest
)const [private]

Returns control matching located at given screen position.

Parameters

TPoint aPositionScreen coordinates where control should be returned.
TBool aEvaluateHitTest

ControlFullyVisible(CMsgBaseControl *)

TBool ControlFullyVisible(CMsgBaseControl *aControl)const [private]

Determines whether given control is fully visible on the screen.

Parameters

CMsgBaseControl * aControl

CountComponentControls()

TInt CountComponentControls()const [protected, virtual]

Returns a number of controls.

CreateBodyL()

voidCreateBodyL()[private]

Creates the body. Creates also the default body control if requested in editor mode flags in constructor.

CreateHeaderL()

voidCreateHeaderL()[private]

Creates the header.

CreateScrollBarL()

voidCreateScrollBarL()[private]

Creates the scroll bar.

CurrentScrollPart(TInt)

TInt CurrentScrollPart(TIntaFocusPosition)[private]

Returns the number of currently scrolled scroll part.

Parameters

TInt aFocusPosition

DeleteControlL(TInt)

IMPORT_C voidDeleteControlL(TIntaControlId)

Removes and deletes the control aControlId from the header or the body if found.

Parameters

TInt aControlIdControl ID of the deleted control.

DoAddControlL(CMsgBaseControl *, TInt, TInt, TMsgFormComponent)

voidDoAddControlL(CMsgBaseControl *aControl,
TIntaControlId,
TIntaIndex,
TMsgFormComponentaFormComponent
)[private]

Does an actual add operation for the control by setting all the necessary observers etc.

Parameters

CMsgBaseControl * aControl
TInt aControlId
TInt aIndex
TMsgFormComponent aFormComponent

DoScrollViewL(TInt &, TMsgScrollDirection)

voidDoScrollViewL(TInt &aPixelsToScroll,
TMsgScrollDirectionaDirection
)[private]

Performs view scrolling to given direction.

Parameters

TInt & aPixelsToScrollAmount of pixels wanted to be scrolled. On return contains the amount of pixels not scrolled.
TMsgScrollDirection aDirectionScrolling direction.

Draw(const TRect &)

voidDraw(const TRect &aRect)const [protected, virtual]

Draw

Parameters

const TRect & aRect

EnsureCorrectCursorPosition()

voidEnsureCorrectCursorPosition()[private]

Ensures that cursor are located correctly relative to currently focused control.

EnsureCorrectFormPosition(TBool, TBool)

TBool EnsureCorrectFormPosition(TBoolaScrollDown,
TBoolaScrollUp = EFalse
)[private]

Ensures that the cursor is visible on the view and that the form position is correct.

Parameters

TBool aScrollDown
TBool aScrollUp = EFalse

EnsureCorrectScrollPartL(TInt)

voidEnsureCorrectScrollPartL(TIntaFocusPosition)[private]

Ensures that correct scroll part is shown to the user.

Parameters

TInt aFocusPosition

EnsureCorrectViewPosition()

voidEnsureCorrectViewPosition()[private]

Ensures that view position is valid and correctly positioned.

EnsureVisiblePartScrollComplete(TInt, TMsgScrollDirection)

TBool EnsureVisiblePartScrollComplete(TIntaFocusPosition,
TMsgScrollDirectionaDirection
)[private]

Ensures that a Visible-part is completely scrolled.

Parameters

TInt aFocusPosition.
TMsgScrollDirection aDirectionScrolling direction.

ExecuteL(const TRect &, TInt)

IMPORT_C voidExecuteL(const TRect &aRect,
TIntaControlIdForFocus
)

Prepares the editor view for showing it on the screen.

Parameters

const TRect & aRect
TInt aControlIdForFocus

FocusChanged(TDrawNow)

voidFocusChanged(TDrawNowaDrawNow)[protected, virtual]

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

Parameters

TDrawNow aDrawNow

FocusedControl()

IMPORT_C CMsgBaseControl *FocusedControl()const

Returns a pointer to a focused control. If no control is focused, returns NULL.

FormComponent(TMsgFormComponent)

IMPORT_C CCoeControl &FormComponent(TMsgFormComponentaFormComponent)const

Returns a reference to a form component.

Parameters

TMsgFormComponent aFormComponent

GetVirtualFormHeightAndPos(TInt &, TInt &)

voidGetVirtualFormHeightAndPos(TInt &aHeight,
TInt &aPos
)[private]

Return virtual height and virtual Y position of the form.

Parameters

TInt & aHeight
TInt & aPos

HandleBaseControlEventRequestL(CMsgBaseControl *, TMsgControlEventRequest, TInt)

TBool HandleBaseControlEventRequestL(CMsgBaseControl *aControl,
TMsgControlEventRequestaRequest,
TIntaDelta
)

Handles an event from a control.

Parameters

CMsgBaseControl * aControl
TMsgControlEventRequest aRequest
TInt aDelta

HandleBaseControlEventRequestL(CMsgBaseControl *, TMsgControlEventRequest)

TBool HandleBaseControlEventRequestL(CMsgBaseControl *aControl,
TMsgControlEventRequestaRequest
)

Handles an event from a control.

Parameters

CMsgBaseControl * aControl
TMsgControlEventRequest aRequest

HandleControlEventL(CCoeControl *, TCoeEvent)

voidHandleControlEventL(CCoeControl *aControl,
TCoeEventaEventType
)[protected]

Handle control event.

Parameters

CCoeControl * aControl
TCoeEvent aEventType

HandleEditObserverEventRequestL(const CCoeControl *, TMsgControlEventRequest, TAny *, TAny *, TAny *)

TInt HandleEditObserverEventRequestL(const CCoeControl *aControl,
TMsgControlEventRequestaRequest,
TAny *aArg1 = 0,
TAny *aArg2 = 0,
TAny *aArg3 = 0
)

Handles an event from a control.

Parameters

const CCoeControl * aControl
TMsgControlEventRequest aRequest
TAny * aArg1 = 0
TAny * aArg2 = 0
TAny * aArg3 = 0

HandleHeightChangedL(CMsgBaseControl *, TInt)

TBool HandleHeightChangedL(CMsgBaseControl *aControl,
TIntaDeltaHeight
)[private]

Handles the form's height change. Gets pointer aControl to a control which height is changing. If aDeltaHeight > 0 the height is increasing.

Parameters

CMsgBaseControl * aControl
TInt aDeltaHeight

HandlePointerEventL(const TPointerEvent &)

voidHandlePointerEventL(const TPointerEvent &aPointerEvent)[virtual]

From CCoeControl. See coecntrl.h

Parameters

const TPointerEvent & aPointerEvent

HandleResourceChange(TInt)

voidHandleResourceChange(TIntaType)[virtual]

For handling dynamic layout switch.

Parameters

TInt aType

HandleScreenSizeChangeL(const TRect &)

IMPORT_C voidHandleScreenSizeChangeL(const TRect &aRect)

Prepares the editor view for viewing it on the screen after screen size change.

Parameters

const TRect & aRect

HandleScrollEventL(CEikScrollBar *, TEikScrollEvent)

voidHandleScrollEventL(CEikScrollBar *aScrollBar,
TEikScrollEventaEventType
)

Handles scroll events

Parameters

CEikScrollBar * aScrollBarPointer to the originating scroll bar object.
TEikScrollEvent aEventTypeA scroll event

IsAnyControlModified()

IMPORT_C TBoolIsAnyControlModified()const

Checks if any control owned by view is modified.

IsFocusable(CMsgBaseControl *, TMsgFocusDirection)

TBool IsFocusable(CMsgBaseControl *aControl,
TMsgFocusDirectionaDirection
)const [private]

Determines if control is focusable (i.e. focus should stop to the control).

Since
3.2

Parameters

CMsgBaseControl * aControlControl that is tested.
TMsgFocusDirection aDirectionNavigation direction.

IsReadOnly()

TBool IsReadOnly()const [private, inline]

Convenience function for checking whether view is on editor or viewer mode.

ItemFinder()

IMPORT_C CItemFinder *ItemFinder()

Returns used item finder pointer if any.

MopNext()

IMPORT_C MObjectProvider *MopNext()

MopSupplyObject(TTypeUid)

IMPORT_C TTypeUid::PtrMopSupplyObject(TTypeUidaId)

Parameters

TTypeUid aId

NewL(MMsgEditorObserver &, TUint32)

IMPORT_C CMsgEditorView *NewL(MMsgEditorObserver &aObserver,
TUint32aEditorModeFlags
)[static]

Factory method.

Parameters

MMsgEditorObserver & aObserver
TUint32 aEditorModeFlags

NextFocusableFormControl(CMsgFormComponent *, TInt, TMsgFocusDirection)

TInt NextFocusableFormControl(CMsgFormComponent *aFormComponent,
TIntaStart,
TMsgFocusDirectionaDirection
)[private]

Resolves next focusable control when given form is navigated to certain direction.

Parameters

CMsgFormComponent * aFormComponentForm component that is navigated (i.e. either header or body)
TInt aStartControl ID of control where search should be started.
TMsgFocusDirection aDirectionNavigation direction.

NotifyControlsForEvent(TMsgViewEvent, TInt)

voidNotifyControlsForEvent(TMsgViewEventaEvent,
TIntaParam
)[private]

Prepares controls for viewing.

Parameters

TMsgViewEvent aEvent
TInt aParam

OfferKeyEventL(const TKeyEvent &, TEventCode)

IMPORT_C TKeyResponseOfferKeyEventL(const TKeyEvent &aKeyEvent,
TEventCodeaType
)[virtual]

Handles key events.

Parameters

const TKeyEvent & aKeyEvent
TEventCode aType

RefreshViewL()

voidRefreshViewL()[private]

Sets the positions for the controls and re-draws the view.

RemoveControlL(TInt)

IMPORT_C CMsgBaseControl *RemoveControlL(TIntaControlId)

Removes the control aControlId from the header or the body and returns pointer to it. If a control cannot be found, returns NULL.

Parameters

TInt aControlId

ReportFocusMovement(TInt)

voidReportFocusMovement(TIntaFocusEvent)[private]

Parameters

TInt aFocusEvent

ResetControls()

IMPORT_C voidResetControls()

Resets (= clears) all controls.

ResetControls(TMsgFormComponent)

IMPORT_C voidResetControls(TMsgFormComponentaFormComponent)

Resets (= clears) controls from header or body.

Parameters

TMsgFormComponent aFormComponentEMsgHeader or EMsgBody

RotateFocusL(TMsgFocusDirection, MMsgEditorObserver::TMsgFocusEvent &)

TBool RotateFocusL(TMsgFocusDirectionaDirection,
MMsgEditorObserver::TMsgFocusEvent &aFocusEvent
)[private]

Rotates focus up or down depending aDirection argument. Returns ETrue if operation can be done.

Parameters

TMsgFocusDirection aDirection
MMsgEditorObserver::TMsgFocusEvent & aFocusEvent

ScrollForm(TInt, TBool)

TBool ScrollForm(TIntaDelta,
TBoolaUpdateScrollBarPos
)[private]

Scrolls the form up or down depending given amount of pixels.

Parameters

TInt aDeltaDelta of pixels to move. If aDelta > 0, the form is scrolled downward.
TBool aUpdateScrollBarPosIndicates whether scroll bar focus position should be updated inside this function.

ScrollViewL(TInt, TMsgScrollDirection, TBool)

voidScrollViewL(TIntaPixelsToScroll,
TMsgScrollDirectionaDirection,
TBoolaMoveThumb
)[private]

Performs view scrolling to given direction.

Parameters

TInt aPixelsToScrollAmount of pixels wanted to be scrolled.
TMsgScrollDirection aDirectionScrolling direction.
TBool aMoveThumbIf ETrue scroll thumb is moved at the end of scrolling.

SetAfterFocusL(MMsgEditorObserver::TMsgAfterFocusEventFunc)

TBool SetAfterFocusL(MMsgEditorObserver::TMsgAfterFocusEventFuncaAfterFocus)[private]

SetAndGetSizeL(TSize &, TBool)

voidSetAndGetSizeL(TSize &aSize,
TBoolaInit
)[private]

Sets sizes for the header and the body and returns their total size aSize as a reference. The function does not set new sizes for the controls if the aInit argument is EFalse. If aInit == ETrue, this function sets the size so that only a total height can change.

Parameters

TSize & aSize
TBool aInit

SetComponentsInitialized()

voidSetComponentsInitialized()[private]

Sets all controls initialized.

SetControlsModified(TBool)

IMPORT_C voidSetControlsModified(TBoolaFlag)

Updates modified flag of controls owned by view. Call this with EFalse when you have populated controls to reset the modifed flag.

Parameters

TBool aFlagETrue or EFalse

SetCurrentPart(TInt)

voidSetCurrentPart(TIntaCurrentPart)[inline]

Parameters

TInt aCurrentPart

SetEdwinObserverL(MEikEdwinObserver *)

IMPORT_C voidSetEdwinObserverL(MEikEdwinObserver *aObserver)

Sets edwin observer. Edwin observer is added to every text editor control that currently exists or is added after this call to the view.

aObserver IN Edwin observer. Setting observer to NULL will remove the edwin observer.

Parameters

MEikEdwinObserver * aObserver

SetFocus(TInt)

IMPORT_C voidSetFocus(TIntaControlId)

Sets focus to a control aControlId.

Parameters

TInt aControlId

SetFocusByControlIdL(TInt, TBool, TBool)

voidSetFocusByControlIdL(TIntaControlId,
TBoolaCorrectFormPosition = ETrue,
TBoolaSetCursorPos = ETrue
)[private]

Sets focus to a control aControlId.

Parameters

TInt aControlId
TBool aCorrectFormPosition = ETrue
TBool aSetCursorPos = ETrue

SetScrollParts(TInt)

voidSetScrollParts(TIntaScrollParts)[inline]

Parameters

TInt aScrollParts

SetViewRect(const TRect &)

voidSetViewRect(const TRect &aRect)[private]

Sets view rect.

Parameters

const TRect & aRect

ShowScrollPopupInfoTextL(CAknDoubleSpanScrollBar *, TInt)

voidShowScrollPopupInfoTextL(CAknDoubleSpanScrollBar *aScrollBar,
TIntaPartNumber
)[private]

Shows scrollbar popup info text.

Parameters

CAknDoubleSpanScrollBar * aScrollBar
TInt aPartNumber

SizeChanged()

voidSizeChanged()[protected, virtual]

Sets new position for all the controls.

UpdateScrollBarL()

voidUpdateScrollBarL()[private]

Updates the scroll bar.

ViewInitialized()

TBool ViewInitialized()const

Returns whether view is intialized.

ViewRect()

TRect ViewRect()const

Returns the current view rectangle.

Member Enumerations Documentation

Enum TMsgEditorMode

Enumerators

EMsgEditorModeNone = 0x00
EMsgEditorModeNormal = 0x01
EMsgReadOnly = 0x02
EMsgDoNotUseDefaultBodyControl = 0x04

Enum TMsgFocus

Enumerators

EMsgNoneFocused
EMsgHeaderFocused
EMsgBodyFocused

Member Data Documentation

TInt iBaseLineOffset

TInt iBaseLineOffset[private]

CAknsBasicBackgroundControlContext * iBgContext

CAknsBasicBackgroundControlContext *iBgContext[private]

CMsgBody * iBody

CMsgBody *iBody[private]

TMsgFocus iCurrentFocus

TMsgFocus iCurrentFocus[private]

TUint32 iEditorModeFlags

TUint32 iEditorModeFlags[private]

MMsgEditorObserver & iEditorObserver

MMsgEditorObserver &iEditorObserver[private]

MEikEdwinObserver * iEdwinObserver

MEikEdwinObserver *iEdwinObserver[private]

TInt iFormOffset

TInt iFormOffset[private]

CMsgHeader * iHeader

CMsgHeader *iHeader[private]

TInt iLineHeight

TInt iLineHeight[private]

TBool iMoveUpDownEvent

TBool iMoveUpDownEvent[private]

TInt iPopUpPart

TInt iPopUpPart[private]

TMsgFocus iPrevFocus

TMsgFocus iPrevFocus[private]

RConeResourceLoader iResourceLoader

RConeResourceLoaderiResourceLoader[private]

CEikScrollBarFrame * iScrollBar

CEikScrollBarFrame *iScrollBar[private]

CArrayFixFlat< TInt > * iScrollPartArray

CArrayFixFlat< TInt > *iScrollPartArray[private]

TInt iScrollParts

TInt iScrollParts[private]

HBufC * iScrollPopText

HBufC *iScrollPopText[private]

TUint32 iStateFlags

TUint32 iStateFlags[private]

TInt iUniqueHandlePool

TInt iUniqueHandlePool[private]

TInt iViewFocusPosition

TInt iViewFocusPosition[private]

TRect iViewRect

TRect iViewRect[private]

TInt iVisiblePart

TInt iVisiblePart[private]

TInt iVisiblePartHeight

TInt iVisiblePartHeight[private]