CMsgAttachmentControl Class Reference

class CMsgAttachmentControl : public CMsgExpandableControl

Defines an Attachment control for message editors/viewers.

Public Member Functions
CMsgAttachmentControl(MMsgBaseControlObserver &, CMsgEditorView &)
~CMsgAttachmentControl()
IMPORT_C voidAddAttachmentsL(const MDesCArray &)
IMPORT_C voidAddAttachmentsL(const CMsgAttachmentModel &)
IMPORT_C voidAppendAttachmentL(const TDesC &)
IMPORT_C TPtrCAttachment(TInt)
voidConstructFromResourceL(TInt)
IMPORT_C TIntCount()
TUint32 EditPermission()
voidHandlePointerEventL(const TPointerEvent &)
voidHandleResourceChange(TInt)
IMPORT_C voidInsertAttachmentL(const TDesC &, TInt)
IMPORT_C CMsgAttachmentControl *NewL(MMsgBaseControlObserver &, CMsgEditorView &)
voidNotifyViewEvent(TMsgViewEvent, TInt)
TKeyResponse OfferKeyEventL(const TKeyEvent &, TEventCode)
IMPORT_C voidRemoveAttachmentL(const TDesC &)
IMPORT_C voidRemoveAttachmentL(TInt)
IMPORT_C voidReset()
Protected Member Functions
voidActivateL()
CCoeControl *ComponentControl(TInt)
TInt CountComponentControls()
voidDraw(const TRect &)
voidFocusChanged(TDrawNow)
voidLayoutButton()
voidPrepareForReadOnly(TBool)
voidResolveLayoutsL()
Private Member Functions
CMsgAttachmentControl()
voidAddToAttachmentArrayL(const TDesC &, TInt)
voidClipTextL(TPtr, TInt)
voidConstructL()
CGulIcon *CreateAttachmentIconsL()
voidCreateButtonL()
voidDisableAutomaticScrolling()
voidDoHandleResourceChangeAfterL(TInt)
voidDoHandleResourceChangeBeforeL(TInt)
TInt DoScrollTextL(TAny *)
voidEnableAutomaticScrolling()
voidScrollTextL()
voidSetTextForEditorL(TBool, TBool)
voidStartAutomaticScrolling(TInt)
voidStopAutomaticScrolling()
voidUpdateControlL()
voidUpdateFocusL()
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::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::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::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::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::GetColorUseListL(CArrayFix< TCoeColorUse > &)const
CEikBorderedControl::HasBorder()const
CEikBorderedControl::SetAdjacent(TInt)
CEikBorderedControl::SetBorder(TGulBorder::TBorderType)
CEikBorderedControl::SetBorder(TInt)
CEikBorderedControl::WriteInternalStateL(RWriteStream &)const
CMsgBaseControl::BaseConstructL()
CMsgBaseControl::CMsgBaseControl()
CMsgBaseControl::CMsgBaseControl(MMsgBaseControlObserver &)
CMsgBaseControl::ControlId()const
CMsgBaseControl::ControlModeFlags()const
CMsgBaseControl::ControlType()const
CMsgBaseControl::DistanceFromComponentAbove()const
CMsgBaseControl::IsModified()const
CMsgBaseControl::IsReadOnly()const
CMsgBaseControl::ItemFinder()
CMsgBaseControl::LabelFontL()const
CMsgBaseControl::Margins()const
CMsgBaseControl::NormalTextFontL()const
CMsgBaseControl::SetControlId(TInt)
CMsgBaseControl::SetControlModeFlags(TUint32)
CMsgBaseControl::SetControlType(TInt)
CMsgBaseControl::SetDistanceFromComponentAbove(TInt)
CMsgBaseControl::SetMargins(const TMargins &)
CMsgBaseControl::SetModified(TBool)
CMsgBaseControl::SetReadOnly(TBool)
CMsgBaseControl::SetupAutomaticFindAfterFocusChangeL(TBool)
CMsgBaseControl::~CMsgBaseControl()
CMsgExpandableControl::Button()const
CMsgExpandableControl::CMsgExpandableControl()
CMsgExpandableControl::CMsgExpandableControl(MMsgBaseControlObserver &)
CMsgExpandableControl::Caption()const
CMsgExpandableControl::CreateCaptionFromResourceL(TResourceReader &)
CMsgExpandableControl::CreateEditorFromResourceL(TResourceReader &)
CMsgExpandableControl::CreateEditorL()
CMsgExpandableControl::Editor()const
CMsgExpandableControl::GetCaptionForFep(TDes &)const
CMsgExpandableControl::HandleControlEventL(CCoeControl *,TCoeEvent)
CMsgExpandableControl::HandleFrameSizeChange()
CMsgExpandableControl::InputCapabilities()const
CMsgExpandableControl::IsFocusChangePossible(TMsgFocusDirection)const
CMsgExpandableControl::MinimumSize()
CMsgExpandableControl::ReadControlPropertiesFromResourceL(TResourceReader &)
CMsgExpandableControl::SetAndGetSizeL(TSize &)
CMsgExpandableControl::SetContainerWindowL(const CCoeControl &)
CMsgExpandableControl::SetTextContentL(CRichText &)
CMsgExpandableControl::SetTextContentL(const TDesC &)
CMsgExpandableControl::SizeChanged()
CMsgExpandableControl::TextContentStrippedL(TDes &,TInt,TBool)
CMsgExpandableControl::~CMsgExpandableControl()
CMsgExpandableTextEditorControl::CMsgExpandableTextEditorControl()
CMsgExpandableTextEditorControl::CMsgExpandableTextEditorControl(MMsgBaseControlObserver &)
CMsgExpandableTextEditorControl::ClipboardL(TMsgClipboardFunc)
CMsgExpandableTextEditorControl::CopyDocumentContentL(CGlobalText &,CGlobalText &)
CMsgExpandableTextEditorControl::CurrentLineRect()
CMsgExpandableTextEditorControl::EditL(TMsgEditFunc)
CMsgExpandableTextEditorControl::HandleEdwinEventL(CEikEdwin *,TEdwinEvent)
CMsgExpandableTextEditorControl::HandleEdwinSizeEventL(CEikEdwin *,TEdwinSizeEvent,TSize)
CMsgExpandableTextEditorControl::IsCursorLocation(TMsgCursorLocation)const
CMsgExpandableTextEditorControl::IsPlainTextMode()const
CMsgExpandableTextEditorControl::ScrollL(TInt,TMsgScrollDirection)
CMsgExpandableTextEditorControl::SetBaseControlObserver(MMsgBaseControlObserver &)
CMsgExpandableTextEditorControl::SetCursorPosL(TInt)
CMsgExpandableTextEditorControl::SetMaxNumberOfChars(TInt)
CMsgExpandableTextEditorControl::SetPlainTextMode(TBool)
CMsgExpandableTextEditorControl::TextContent()const
CMsgExpandableTextEditorControl::VirtualHeight()
CMsgExpandableTextEditorControl::VirtualVisibleTop()
CMsgExpandableTextEditorControl::~CMsgExpandableTextEditorControl()
Private Member Enumerations
enumTScrollPosition { EScrollPosBeginning, EScrollPosEnd, EScrollPosOther }
Inherited Enumerations
CCoeControl:TZoomType
CMsgBaseControl:TMsgEditPermissionFlags
CMsgBaseControl:TMsgViewEventFlags
Private Attributes
CDesCArrayFlat *iAttachmentArray
TBool iAutomaticScrolling
TAknLayoutRect iIconLayout
CGulIcon *iLabelIcon
TScrollPosition iScrollPos
CPeriodic *iScrollTimer
Inherited Attributes
CCoeControl::iCoeEnv
CCoeControl::iContext
CCoeControl::iPosition
CCoeControl::iSize
CEikBorderedControl::iBorder
CMsgBaseControl::iBaseControlObserver
CMsgBaseControl::iControlId
CMsgBaseControl::iControlModeFlags
CMsgBaseControl::iControlType
CMsgBaseControl::iDistanceFromComponentAbove
CMsgBaseControl::iLineHeight
CMsgBaseControl::iMargins
CMsgBaseControl::iMaxBodyHeight
CMsgExpandableControl::iButton
CMsgExpandableControl::iButtonLayout
CMsgExpandableControl::iButtonTop
CMsgExpandableControl::iCaption
CMsgExpandableControl::iCaptionLayout
CMsgExpandableControl::iCaptionTop
CMsgExpandableControl::iCtrltype
CMsgExpandableControl::iEditorLayout
CMsgExpandableControl::iFrameLayout
CMsgExpandableTextEditorControl::iCursorPos
CMsgExpandableTextEditorControl::iEditor
CMsgExpandableTextEditorControl::iEditorTop
CMsgExpandableTextEditorControl::iMaxNumberOfChars

Constructor & Destructor Documentation

CMsgAttachmentControl(MMsgBaseControlObserver &, CMsgEditorView &)

CMsgAttachmentControl(MMsgBaseControlObserver &aBaseControlObserver,
CMsgEditorView &aView
)

Constructor.

Parameters

MMsgBaseControlObserver & aBaseControlObserverBase control observer.
CMsgEditorView & aView

CMsgAttachmentControl()

CMsgAttachmentControl()[private]

Default C++ constructor

~CMsgAttachmentControl()

~CMsgAttachmentControl()[virtual]

Destructor.

Member Functions Documentation

ActivateL()

voidActivateL()[protected, virtual]

Sets control ready to be drawn.

AddAttachmentsL(const MDesCArray &)

IMPORT_C voidAddAttachmentsL(const MDesCArray &aNames)

Adds attachments from the array to the attachment control removing old attachments.

Parameters

const MDesCArray & aNamesAttachment name array.

AddAttachmentsL(const CMsgAttachmentModel &)

IMPORT_C voidAddAttachmentsL(const CMsgAttachmentModel &aModel)

Adds attachments from the attachment model to the attachment control removing old attachments.

Parameters

const CMsgAttachmentModel & aModelAttachment model.

AddToAttachmentArrayL(const TDesC &, TInt)

voidAddToAttachmentArrayL(const TDesC &aName,
TIntaIndex
)[private]

Adds name to attachment array.

Parameters

const TDesC & aName
TInt aIndex

AppendAttachmentL(const TDesC &)

IMPORT_C voidAppendAttachmentL(const TDesC &aName)

Appends one attachment to the end of the attachment control.

Parameters

const TDesC & aNameAttachment name.

Attachment(TInt)

IMPORT_C TPtrCAttachment(TIntaIndex)const

Returns attachment from given index

Parameters

TInt aIndex

ClipTextL(TPtr, TInt)

voidClipTextL(TPtraText,
TIntaClipWidth
)[private]

Clips the given text to fit to the given width if needed.

Parameters

TPtr aText
TInt aClipWidth

ComponentControl(TInt)

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

Returns a control of index aIndex.

Parameters

TInt aIndex

ConstructFromResourceL(TInt)

voidConstructFromResourceL(TIntaResourceId)[virtual]

Creates this control from resource.

Parameters

TInt aResourceId

ConstructL()

voidConstructL()[private]

Symbian second phase constructor.

Count()

IMPORT_C TIntCount()const

Returns current number of attachments on attachment control

CountComponentControls()

TInt CountComponentControls()const [protected, virtual]

Returns a number of controls.

CreateAttachmentIconsL()

CGulIcon *CreateAttachmentIconsL()[private]

Creates attachment icons.

CreateButtonL()

voidCreateButtonL()[private]

Creates button from attachment icon.

DisableAutomaticScrolling()

voidDisableAutomaticScrolling()[private]

Disables automatic scrolling.

DoHandleResourceChangeAfterL(TInt)

voidDoHandleResourceChangeAfterL(TIntaType)[private]

Performs resource change handling after base class.

Parameters

TInt aType

DoHandleResourceChangeBeforeL(TInt)

voidDoHandleResourceChangeBeforeL(TIntaType)[private]

Performs resource change handling before base class.

Parameters

TInt aType

DoScrollTextL(TAny *)

TInt DoScrollTextL(TAny *aObject)[private, static]

Callback function to scroll text

Parameters

TAny * aObject

Draw(const TRect &)

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

Draws the control.

Parameters

const TRect & aRect

EditPermission()

TUint32 EditPermission()const [virtual]

Checks and returns control's edit permissions. Edit permissions are needed to check in order to know whether some key press is allowed to pass to the control or not.

EnableAutomaticScrolling()

voidEnableAutomaticScrolling()[private]

Enables automatic scrolling.

FocusChanged(TDrawNow)

voidFocusChanged(TDrawNowaDrawNow)[protected, virtual]

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

Parameters

TDrawNow aDrawNow

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

InsertAttachmentL(const TDesC &, TInt)

IMPORT_C voidInsertAttachmentL(const TDesC &aName,
TIntaIndex
)

Inserts one attachment to specific index on attachment control.

Parameters

const TDesC & aNameAttachment name.
TInt aIndexPosition of new attachment.

LayoutButton()

voidLayoutButton()[protected, virtual]

Sets the correct layout for button.

NewL(MMsgBaseControlObserver &, CMsgEditorView &)

IMPORT_C CMsgAttachmentControl *NewL(MMsgBaseControlObserver &aBaseControlObserver,
CMsgEditorView &aView
)[static]

Factory method that creates this control.

Parameters

MMsgBaseControlObserver & aBaseControlObserverBase control observer
CMsgEditorView & aViewMessage editor view

NotifyViewEvent(TMsgViewEvent, TInt)

voidNotifyViewEvent(TMsgViewEventaEvent,
TIntaParam
)[virtual]

Prepares control for viewing.

Parameters

TMsgViewEvent aEvent
TInt aParam

OfferKeyEventL(const TKeyEvent &, TEventCode)

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

Handles key events.

Parameters

const TKeyEvent & aKeyEvent
TEventCode aType

PrepareForReadOnly(TBool)

voidPrepareForReadOnly(TBoolaReadOnly)[protected, virtual]

Prepares for read only or non read only state.

Parameters

TBool aReadOnly

RemoveAttachmentL(const TDesC &)

IMPORT_C voidRemoveAttachmentL(const TDesC &aName)

Removes first attachment with given name from the attachment control.

Parameters

const TDesC & aNameAttachment name

RemoveAttachmentL(TInt)

IMPORT_C voidRemoveAttachmentL(TIntaIndex)

Removes attachment from specific index on attachment control.

Parameters

TInt aIndexAttachment index

Reset()

IMPORT_C voidReset()[virtual]

Clears content of the attachment control (non-leaving version; from CMsgBaseControl).

ResolveLayoutsL()

voidResolveLayoutsL()[protected, virtual]

Reads layout data from "LAF".

ScrollTextL()

voidScrollTextL()[private]

Performs text scrolling.

SetTextForEditorL(TBool, TBool)

voidSetTextForEditorL(TBoolaContentChanged,
TBoolaClipText
)[private]

Creates and sets text for editor.

Parameters

TBool aContentChanged
TBool aClipText

StartAutomaticScrolling(TInt)

voidStartAutomaticScrolling(TIntaStartDelay)[private]

Starts automatic scrolling.

Parameters

TInt aStartDelay

StopAutomaticScrolling()

voidStopAutomaticScrolling()[private]

Stops automatic scrolling.

UpdateControlL()

voidUpdateControlL()[private]

Updates control internal state.

UpdateFocusL()

voidUpdateFocusL()[private]

Updates field's focus.

Member Enumerations Documentation

Enum TScrollPosition

Enumerators

EScrollPosBeginning
EScrollPosEnd
EScrollPosOther

Member Data Documentation

CDesCArrayFlat * iAttachmentArray

CDesCArrayFlat *iAttachmentArray[private]

TBool iAutomaticScrolling

TBool iAutomaticScrolling[private]

TAknLayoutRect iIconLayout

TAknLayoutRect iIconLayout[private]

CGulIcon * iLabelIcon

CGulIcon *iLabelIcon[private]

TScrollPosition iScrollPos

TScrollPosition iScrollPos[private]

CPeriodic * iScrollTimer

CPeriodic *iScrollTimer[private]