CMsgBaseControl Class Reference

class CMsgBaseControl : public CEikBorderedControl

Defines a base class for message editor/viewer controls. All header and body controls must be inherited from this class.

Public Member Functions
CMsgBaseControl(MMsgBaseControlObserver &)
CMsgBaseControl()
~CMsgBaseControl()
voidClipboardL(TMsgClipboardFunc)
IMPORT_C voidConstructFromResourceL(TInt)
IMPORT_C TIntControlId()
TUint32 ControlModeFlags()
TInt ControlType()
TRect CurrentLineRect()
IMPORT_C TIntDistanceFromComponentAbove()
voidEditL(TMsgEditFunc)
TUint32 EditPermission()
IMPORT_C voidHandleResourceChange(TInt)
TBool IsCursorLocation(TMsgCursorLocation)
TBool IsFocusChangePossible(TMsgFocusDirection)
IMPORT_C TBoolIsModified()
IMPORT_C TBoolIsReadOnly()
IMPORT_C CItemFinder *ItemFinder()
IMPORT_C TMarginsMargins()
IMPORT_C voidNotifyViewEvent(TMsgViewEvent, TInt)
IMPORT_C voidReset()
IMPORT_C TIntScrollL(TInt, TMsgScrollDirection)
voidSetAndGetSizeL(TSize &)
IMPORT_C voidSetBaseControlObserver(MMsgBaseControlObserver &)
IMPORT_C voidSetControlId(TInt)
voidSetControlModeFlags(TUint32)
voidSetControlType(TInt)
IMPORT_C voidSetDistanceFromComponentAbove(TInt)
IMPORT_C voidSetMargins(const TMargins &)
IMPORT_C voidSetModified(TBool)
IMPORT_C voidSetReadOnly(TBool)
IMPORT_C voidSetupAutomaticFindAfterFocusChangeL(TBool)
IMPORT_C TIntVirtualHeight()
IMPORT_C TIntVirtualVisibleTop()
Protected Member Functions
IMPORT_C voidBaseConstructL()
IMPORT_C CCoeControl *ComponentControl(TInt)
IMPORT_C TIntCountComponentControls()
IMPORT_C voidFocusChanged(TDrawNow)
IMPORT_C const CFont *LabelFontL()
IMPORT_C const CFont *NormalTextFontL()
voidPrepareForReadOnly(TBool)
IMPORT_C voidSizeChanged()
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::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::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
Public Member Enumerations
enumTMsgEditPermissionFlags {
EMsgEditNone = 0x00000000, EMsgEditCopy = 0x00000001, EMsgEditCut = 0x00000002, EMsgEditPaste = 0x00000004, EMsgEditSelectAll = 0x00000008, EMsgEditUnSelectAll = 0x00000010, EMsgEditUndo = 0x00000020, EMsgFirstReservedFlag = 0x00001000, EMsgFirstFreeFlag = 0x00010000, EMsgEditAll = 0xFFFFFFFF
}
enumTMsgViewEventFlags { EMsgViewEventNone = 0x00000000, EMsgViewEventAutoHighlight = 0x00000001 }
Inherited Enumerations
CCoeControl:TZoomType
Protected Attributes
MMsgBaseControlObserver *iBaseControlObserver
TInt iControlId
TUint32 iControlModeFlags
TInt iControlType
TInt iDistanceFromComponentAbove
TInt iLineHeight
TMargins iMargins
TInt iMaxBodyHeight
Private Attributes
TInt iReserved
Inherited Attributes
CCoeControl::iCoeEnv
CCoeControl::iContext
CCoeControl::iPosition
CCoeControl::iSize
CEikBorderedControl::iBorder

Constructor & Destructor Documentation

CMsgBaseControl(MMsgBaseControlObserver &)

IMPORT_CCMsgBaseControl(MMsgBaseControlObserver &aBaseControlObserver)

Constructor.

Parameters

MMsgBaseControlObserver & aBaseControlObserver

CMsgBaseControl()

IMPORT_CCMsgBaseControl()

Constructor.

~CMsgBaseControl()

IMPORT_C~CMsgBaseControl()

Destructor.

Member Functions Documentation

BaseConstructL()

IMPORT_C voidBaseConstructL()[protected]

Sets default margins for the control.

ClipboardL(TMsgClipboardFunc)

voidClipboardL(TMsgClipboardFuncaFunc)[pure virtual]

Handles clipboard operation.

Parameters

TMsgClipboardFunc aFunc

ComponentControl(TInt)

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

Returns a control of index aIndex.

Parameters

TInt aIndex

ConstructFromResourceL(TInt)

IMPORT_C voidConstructFromResourceL(TIntaResourceId)[virtual]

Creates this control from resource.

Parameters

TInt aResourceId

ControlId()

IMPORT_C TIntControlId()const

Returns the control id.

ControlModeFlags()

TUint32 ControlModeFlags()const [inline]

Returns control mode flags.

ControlType()

TInt ControlType()const [inline]

Returns type of control.

CountComponentControls()

IMPORT_C TIntCountComponentControls()const [protected, virtual]

Returns a number of controls.

CurrentLineRect()

TRect CurrentLineRect()[pure virtual]

Returns the current control rect.

DistanceFromComponentAbove()

IMPORT_C TIntDistanceFromComponentAbove()const

Returns a distance from above to this control in pixels.

EditL(TMsgEditFunc)

voidEditL(TMsgEditFuncaFunc)[pure virtual]

Handles editing operation.

Parameters

TMsgEditFunc aFunc

EditPermission()

TUint32 EditPermission()const [pure virtual]

Returns edit permission flags.

FocusChanged(TDrawNow)

IMPORT_C voidFocusChanged(TDrawNowaDrawNow)[protected, virtual]

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

Parameters

TDrawNow aDrawNow

HandleResourceChange(TInt)

IMPORT_C voidHandleResourceChange(TIntaType)[virtual]

For handling dynamic layout switch.

Parameters

TInt aType

IsCursorLocation(TMsgCursorLocation)

TBool IsCursorLocation(TMsgCursorLocationaLocation)const [pure virtual]

Checks if the cursor location is on the topmost or downmost position and returns ETrue if it is.

Parameters

TMsgCursorLocation aLocation

IsFocusChangePossible(TMsgFocusDirection)

TBool IsFocusChangePossible(TMsgFocusDirectionaDirection)const [pure virtual]

Checks if the focus change up or down is possible and returns ETrue if it is.

Parameters

TMsgFocusDirection aDirection

IsModified()

IMPORT_C TBoolIsModified()const [virtual]

Return ETrue if contents of control has been modified.

IsReadOnly()

IMPORT_C TBoolIsReadOnly()const

Returns the read only status of the control.

ItemFinder()

IMPORT_C CItemFinder *ItemFinder()[virtual]

Default implementation returns NULL

LabelFontL()

IMPORT_C const CFont *LabelFontL()const [protected]

Returns a pointer to the normal label font.

Margins()

IMPORT_C TMarginsMargins()const

Returns the margins of the control.

NormalTextFontL()

IMPORT_C const CFont *NormalTextFontL()const [protected]

Returns a pointer to the normal text font.

NotifyViewEvent(TMsgViewEvent, TInt)

IMPORT_C voidNotifyViewEvent(TMsgViewEventaEvent,
TIntaParam
)[virtual]

Prepares control for viewing.

Parameters

TMsgViewEvent aEvent
TInt aParam

PrepareForReadOnly(TBool)

voidPrepareForReadOnly(TBoolaReadOnly)[protected, pure virtual]

Prepares for read only or non read only state.

Parameters

TBool aReadOnly

Reset()

IMPORT_C voidReset()[virtual]

Resets (= clears) contents of the control.

ScrollL(TInt, TMsgScrollDirection)

IMPORT_C TIntScrollL(TIntaPixelsToScroll,
TMsgScrollDirectionaDirection
)[virtual]

Performs the internal scrolling of control if needed. Default implementation does not perform any scrolling and returns that zero pixels where scrolled.

Since
3.2

Parameters

TInt aPixelsToScrollAmount of pixels to scroll.
TMsgScrollDirection aDirectionScrolling direction.

SetAndGetSizeL(TSize &)

voidSetAndGetSizeL(TSize &aSize)[pure virtual]

Calculates and sets the size of the control and returns new size as reference aSize.

Parameters

TSize & aSize

SetBaseControlObserver(MMsgBaseControlObserver &)

IMPORT_C voidSetBaseControlObserver(MMsgBaseControlObserver &aBaseControlObserver)[virtual]

Sets base control observer.

Parameters

MMsgBaseControlObserver & aBaseControlObserver

SetControlId(TInt)

IMPORT_C voidSetControlId(TIntaControlId)

Sets the control id.

Parameters

TInt aControlId

SetControlModeFlags(TUint32)

voidSetControlModeFlags(TUint32aFlags)[inline]

Sets control mode flags.

Parameters

TUint32 aFlags

SetControlType(TInt)

voidSetControlType(TIntaType)[inline]

Sets type of control.

Parameters

TInt aType

SetDistanceFromComponentAbove(TInt)

IMPORT_C voidSetDistanceFromComponentAbove(TIntaDistance)

Sets a distance from above control in pixels.

Parameters

TInt aDistance

SetMargins(const TMargins &)

IMPORT_C voidSetMargins(const TMargins &aMargins)

Sets margins for the control.

Parameters

const TMargins & aMargins

SetModified(TBool)

IMPORT_C voidSetModified(TBoolaModified)[virtual]

Sets the modified flag of the control.

Parameters

TBool aModified

SetReadOnly(TBool)

IMPORT_C voidSetReadOnly(TBoolaReadOnly)

Sets the control read only or not.

Parameters

TBool aReadOnly

SetupAutomaticFindAfterFocusChangeL(TBool)

IMPORT_C voidSetupAutomaticFindAfterFocusChangeL(TBoolaBeginning)[virtual]

Should be called when focus is changed to body. Note: this default implementation is empty

Parameters

TBool aBeginning

SizeChanged()

IMPORT_C voidSizeChanged()[protected, virtual]

This function must be implemented in derived control and it must set positions for its controls using SetExtent function.

SetExtent function must be used for setting positions because when this is called the first time, positions are not set yet. Hence, SetPosition cannot be used because it assumes that positions are already set.

VirtualHeight()

IMPORT_C TIntVirtualHeight()[virtual]

Returns approximate height of the control.

VirtualVisibleTop()

IMPORT_C TIntVirtualVisibleTop()[virtual]

Returns a topmost visible text position.

Member Enumerations Documentation

Enum TMsgEditPermissionFlags

Enumerators

EMsgEditNone = 0x00000000
EMsgEditCopy = 0x00000001
EMsgEditCut = 0x00000002
EMsgEditPaste = 0x00000004
EMsgEditSelectAll = 0x00000008
EMsgEditUnSelectAll = 0x00000010
EMsgEditUndo = 0x00000020
EMsgFirstReservedFlag = 0x00001000
EMsgFirstFreeFlag = 0x00010000
EMsgEditAll = 0xFFFFFFFF

Enum TMsgViewEventFlags

Enumerators

EMsgViewEventNone = 0x00000000
EMsgViewEventAutoHighlight = 0x00000001

Member Data Documentation

MMsgBaseControlObserver * iBaseControlObserver

MMsgBaseControlObserver *iBaseControlObserver[protected]

TInt iControlId

TInt iControlId[protected]

TUint32 iControlModeFlags

TUint32 iControlModeFlags[protected]

TInt iControlType

TInt iControlType[protected]

TInt iDistanceFromComponentAbove

TInt iDistanceFromComponentAbove[protected]

TInt iLineHeight

TInt iLineHeight[protected]

TMargins iMargins

TMargins iMargins[protected]

TInt iMaxBodyHeight

TInt iMaxBodyHeight[protected]

TInt iReserved

TInt iReserved[private]