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 ()
void ClipboardL ( TMsgClipboardFunc )
IMPORT_C void ConstructFromResourceL ( TInt )
IMPORT_C TInt ControlId ()
TUint32 ControlModeFlags ()
TInt ControlType ()
TRect CurrentLineRect ()
IMPORT_C TInt DistanceFromComponentAbove ()
void EditL ( TMsgEditFunc )
TUint32 EditPermission ()
IMPORT_C void HandleResourceChange ( TInt )
TBool IsCursorLocation ( TMsgCursorLocation )
TBool IsFocusChangePossible ( TMsgFocusDirection )
IMPORT_C TBool IsModified ()
IMPORT_C TBool IsReadOnly ()
IMPORT_C CItemFinder * ItemFinder ()
IMPORT_C TMargins Margins ()
IMPORT_C void NotifyViewEvent ( TMsgViewEvent , TInt )
IMPORT_C void Reset ()
IMPORT_C TInt ScrollL ( TInt , TMsgScrollDirection )
void SetAndGetSizeL ( TSize &)
IMPORT_C void SetBaseControlObserver ( MMsgBaseControlObserver &)
IMPORT_C void SetControlId ( TInt )
void SetControlModeFlags ( TUint32 )
void SetControlType ( TInt )
IMPORT_C void SetDistanceFromComponentAbove ( TInt )
IMPORT_C void SetMargins (const TMargins &)
IMPORT_C void SetModified ( TBool )
IMPORT_C void SetReadOnly ( TBool )
IMPORT_C void SetupAutomaticFindAfterFocusChangeL ( TBool )
IMPORT_C TInt VirtualHeight ()
IMPORT_C TInt VirtualVisibleTop ()
Protected Member Functions
IMPORT_C void BaseConstructL ()
IMPORT_C CCoeControl * ComponentControl ( TInt )
IMPORT_C TInt CountComponentControls ()
IMPORT_C void FocusChanged ( TDrawNow )
IMPORT_C const CFont * LabelFontL ()
IMPORT_C const CFont * NormalTextFontL ()
void PrepareForReadOnly ( TBool )
IMPORT_C void SizeChanged ()
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
enum TMsgEditPermissionFlags {
EMsgEditNone  = 0x00000000, EMsgEditCopy  = 0x00000001, EMsgEditCut  = 0x00000002, EMsgEditPaste  = 0x00000004, EMsgEditSelectAll  = 0x00000008, EMsgEditUnSelectAll  = 0x00000010, EMsgEditUndo  = 0x00000020, EMsgFirstReservedFlag  = 0x00001000, EMsgFirstFreeFlag  = 0x00010000, EMsgEditAll  = 0xFFFFFFFF
}
enum TMsgViewEventFlags { 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_C CMsgBaseControl ( MMsgBaseControlObserver & aBaseControlObserver )

Constructor.

Parameters

MMsgBaseControlObserver & aBaseControlObserver

CMsgBaseControl()

IMPORT_C CMsgBaseControl ( )

Constructor.

~CMsgBaseControl()

IMPORT_C ~CMsgBaseControl ( )

Destructor.

Member Functions Documentation

BaseConstructL()

IMPORT_C void BaseConstructL ( ) [protected]

Sets default margins for the control.

ClipboardL(TMsgClipboardFunc)

void ClipboardL ( TMsgClipboardFunc aFunc ) [pure virtual]

Handles clipboard operation.

Parameters

TMsgClipboardFunc aFunc

ComponentControl(TInt)

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

Returns a control of index aIndex.

Parameters

TInt aIndex

ConstructFromResourceL(TInt)

IMPORT_C void ConstructFromResourceL ( TInt aResourceId ) [virtual]

Creates this control from resource.

Parameters

TInt aResourceId

ControlId()

IMPORT_C TInt ControlId ( ) 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 TInt CountComponentControls ( ) const [protected, virtual]

Returns a number of controls.

CurrentLineRect()

TRect CurrentLineRect ( ) [pure virtual]

Returns the current control rect.

DistanceFromComponentAbove()

IMPORT_C TInt DistanceFromComponentAbove ( ) const

Returns a distance from above to this control in pixels.

EditL(TMsgEditFunc)

void EditL ( TMsgEditFunc aFunc ) [pure virtual]

Handles editing operation.

Parameters

TMsgEditFunc aFunc

EditPermission()

TUint32 EditPermission ( ) const [pure virtual]

Returns edit permission flags.

FocusChanged(TDrawNow)

IMPORT_C void FocusChanged ( TDrawNow aDrawNow ) [protected, virtual]

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

Parameters

TDrawNow aDrawNow

HandleResourceChange(TInt)

IMPORT_C void HandleResourceChange ( TInt aType ) [virtual]

For handling dynamic layout switch.

Parameters

TInt aType

IsCursorLocation(TMsgCursorLocation)

TBool IsCursorLocation ( TMsgCursorLocation aLocation ) 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 ( TMsgFocusDirection aDirection ) 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 TBool IsModified ( ) const [virtual]

Return ETrue if contents of control has been modified.

IsReadOnly()

IMPORT_C TBool IsReadOnly ( ) 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 TMargins Margins ( ) 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 void NotifyViewEvent ( TMsgViewEvent aEvent,
TInt aParam
) [virtual]

Prepares control for viewing.

Parameters

TMsgViewEvent aEvent
TInt aParam

PrepareForReadOnly(TBool)

void PrepareForReadOnly ( TBool aReadOnly ) [protected, pure virtual]

Prepares for read only or non read only state.

Parameters

TBool aReadOnly

Reset()

IMPORT_C void Reset ( ) [virtual]

Resets (= clears) contents of the control.

ScrollL(TInt, TMsgScrollDirection)

IMPORT_C TInt ScrollL ( TInt aPixelsToScroll,
TMsgScrollDirection aDirection
) [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 aPixelsToScroll Amount of pixels to scroll.
TMsgScrollDirection aDirection Scrolling direction.

SetAndGetSizeL(TSize &)

void SetAndGetSizeL ( 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 void SetBaseControlObserver ( MMsgBaseControlObserver & aBaseControlObserver ) [virtual]

Sets base control observer.

Parameters

MMsgBaseControlObserver & aBaseControlObserver

SetControlId(TInt)

IMPORT_C void SetControlId ( TInt aControlId )

Sets the control id.

Parameters

TInt aControlId

SetControlModeFlags(TUint32)

void SetControlModeFlags ( TUint32 aFlags ) [inline]

Sets control mode flags.

Parameters

TUint32 aFlags

SetControlType(TInt)

void SetControlType ( TInt aType ) [inline]

Sets type of control.

Parameters

TInt aType

SetDistanceFromComponentAbove(TInt)

IMPORT_C void SetDistanceFromComponentAbove ( TInt aDistance )

Sets a distance from above control in pixels.

Parameters

TInt aDistance

SetMargins(const TMargins &)

IMPORT_C void SetMargins ( const TMargins & aMargins )

Sets margins for the control.

Parameters

const TMargins & aMargins

SetModified(TBool)

IMPORT_C void SetModified ( TBool aModified ) [virtual]

Sets the modified flag of the control.

Parameters

TBool aModified

SetReadOnly(TBool)

IMPORT_C void SetReadOnly ( TBool aReadOnly )

Sets the control read only or not.

Parameters

TBool aReadOnly

SetupAutomaticFindAfterFocusChangeL(TBool)

IMPORT_C void SetupAutomaticFindAfterFocusChangeL ( TBool aBeginning ) [virtual]

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

Parameters

TBool aBeginning

SizeChanged()

IMPORT_C void SizeChanged ( ) [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 TInt VirtualHeight ( ) [virtual]

Returns approximate height of the control.

VirtualVisibleTop()

IMPORT_C TInt VirtualVisibleTop ( ) [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]