diff -r 12c456ceeff2 -r 5253a20d2a1e emailuis/emailui/inc/ncsattachmentfield.h --- a/emailuis/emailui/inc/ncsattachmentfield.h Thu Jan 07 12:38:38 2010 +0200 +++ b/emailuis/emailui/inc/ncsattachmentfield.h Mon Jan 18 20:08:26 2010 +0200 @@ -52,9 +52,11 @@ TInt GetMinLabelLength() const; - void SetTextL( const TDesC& aText ); - void SetTextL( const TDesC& aAttachmentName, const TDesC& aAttachmentSizeDesc ); + void SetTextsLD( CDesCArray* aAttachmentNames, + CDesCArray* aAttachmentSizes ); + TInt FocusedAttachmentLabelIndex(); + public: // from MNcsControl TInt LineCount() const; @@ -71,9 +73,7 @@ const TDesC& GetLabelText() const; - // Platform layout change TInt LayoutLineCount() const; - // Platform layout change public: // from CCoeControl @@ -89,26 +89,28 @@ void HandleResourceChange( TInt aType ); + void HandlePointerEventL( const TPointerEvent& aPointerEvent ); + private: // methods - CNcsAttachmentField( MNcsFieldSizeObserver* aSizeObserver, + CNcsAttachmentField( TInt aLabelTextId, + MNcsFieldSizeObserver* aSizeObserver, CNcsHeaderContainer* aParentControl ); - void ConstructL( TInt aLabelTextId ); + void ConstructL(); void UpdateColors(); + void UpdateColors( CNcsLabel* aLabel ); void UpdateFontSize(); + void UpdateFontSize( CNcsLabel* aLabel ); - // Platform layout change void LayoutControls(); void UpdateIconPositions( const TRect& aRect ); - // Platform layout change - void UpdateAttachmentTextL(); + void UpdateAttachmentTextsL(); - // Platform layout change /** * Resizes icons */ @@ -116,24 +118,24 @@ TInt CreateIcons(); void CreateIconsL(); - // Platform layout change + + void UpdateComponentArrayL(); + + void UpdateSingleAttachmentLabelTextL( CNcsLabel* aLabel, TInt aIndex ); private: // data CNcsHeaderContainer* iParentControl; // not owned - CNcsLabel* iAttachmentLabel; + // attachment labels (within the array) owned + RPointerArray iAttachmentLabels; -// Platform layout change - //CFont* iLabelFont; // not owned, needs to be released in the end - //CFont* iEditorFont; // not owned, needs to be released in the end const CFont* iLabelFont; // not owned const CFont* iEditorFont; // not owned -// - HBufC* iAttachmentName; - HBufC* iAttachmentSizeDesc; - + CDesCArray* iAttachmentNames; + CDesCArray* iAttachmentSizes; + TInt iMaximumLabelLength; TRgb iBgColor; @@ -144,11 +146,10 @@ CFbsBitmap* iAttachmentBitmap; CFbsBitmap* iAttachmentMask; TPoint iAttachmentIconPos; - - // Action menu icon - CFbsBitmap* iActionMenuBitmap; - CFbsBitmap* iActionMenuMask; - TPoint iActionMenuIconPos; + + TInt iLabelTextId; + TInt iAttachmentLabelCount; + TInt iFocusedLabelIndex; }; #endif