27 |
27 |
28 #include "ncsfieldsizeobserver.h" |
28 #include "ncsfieldsizeobserver.h" |
29 #include "ncsconstants.h" |
29 #include "ncsconstants.h" |
30 #include "FreestyleEmailUiContactHandlerObserver.h" |
30 #include "FreestyleEmailUiContactHandlerObserver.h" |
31 #include "FreestyleEmailUi.hrh" |
31 #include "FreestyleEmailUi.hrh" |
32 |
|
33 //<cmail> |
|
34 #include <aknlongtapdetector.h> |
32 #include <aknlongtapdetector.h> |
35 //</cmail> |
|
36 |
33 |
37 class CAknPhysics; |
34 class CAknPhysics; |
38 class CNcsEditor; |
35 class CNcsEditor; |
39 class CNcsComposeView; |
36 class CNcsComposeView; |
40 class CNcsHeaderContainer; |
37 class CNcsHeaderContainer; |
74 EBccFieldVisible = 0x2 |
71 EBccFieldVisible = 0x2 |
75 }; |
72 }; |
76 |
73 |
77 /** |
74 /** |
78 * Two-phased constructor. |
75 * Two-phased constructor. |
79 * Create a CNcsComposeViewContainer object, which will draw itself to aRect |
76 * Create a CNcsComposeViewContainer object, that draws itself to aRect |
80 * @param aView The parent view of this container. |
77 * @param aView The parent view of this container. |
81 * @param aRect The rectangle this view will be drawn to. |
78 * @param aRect The rectangle this view will be drawn to. |
82 * @param aMailBox reference to current mailbox item. |
79 * @param aMailBox reference to current mailbox item. |
83 * @param aFlags Initilisation flags defined in @c TInitFlag enumeration. |
80 * @param aFlags Initilisation flags defined in @c TInitFlag enumeration. |
84 * @return a pointer to the created instance of CNcsComposeViewContainer. |
81 * @return a pointer to the created instance of CNcsComposeViewContainer. |
103 /** |
100 /** |
104 * GetToFieldAddressesL |
101 * GetToFieldAddressesL |
105 * Get addresses in TO-field. |
102 * Get addresses in TO-field. |
106 * @return Array of address objects. |
103 * @return Array of address objects. |
107 */ |
104 */ |
108 const RPointerArray<CNcsEmailAddressObject>& GetToFieldAddressesL( TBool aParseNow=ETrue ); |
105 const RPointerArray<CNcsEmailAddressObject>& |
|
106 GetToFieldAddressesL( TBool aParseNow=ETrue ); |
109 |
107 |
110 /** |
108 /** |
111 * GetCcFieldAddressesL |
109 * GetCcFieldAddressesL |
112 * Get addresses in CC-field. |
110 * Get addresses in CC-field. |
113 * @return Array of address objects. |
111 * @return Array of address objects. |
114 */ |
112 */ |
115 const RPointerArray<CNcsEmailAddressObject>& GetCcFieldAddressesL( TBool aParseNow=ETrue ); |
113 const RPointerArray<CNcsEmailAddressObject>& |
|
114 GetCcFieldAddressesL( TBool aParseNow=ETrue ); |
116 |
115 |
117 /** |
116 /** |
118 * GetBccFieldAddressesL |
117 * GetBccFieldAddressesL |
119 * Get addresses in BCC-field. |
118 * Get addresses in BCC-field. |
120 * @return Array of address objects. |
119 * @return Array of address objects. |
121 */ |
120 */ |
122 const RPointerArray<CNcsEmailAddressObject>& GetBccFieldAddressesL( TBool aParseNow=ETrue ); |
121 const RPointerArray<CNcsEmailAddressObject>& |
|
122 GetBccFieldAddressesL( TBool aParseNow=ETrue ); |
123 |
123 |
124 /** |
124 /** |
125 * GetSubjectLC |
125 * GetSubjectLC |
126 * Get text in subject field. |
126 * Get text in subject field. |
127 * @return Descriptor containing subject field text. |
127 * @return Descriptor containing subject field text. |
208 /** |
208 /** |
209 * SetToFieldAddressesL |
209 * SetToFieldAddressesL |
210 * Set TO-field addresses. |
210 * Set TO-field addresses. |
211 * @param aAddress Array of address objects. |
211 * @param aAddress Array of address objects. |
212 */ |
212 */ |
213 void SetToFieldAddressesL( RPointerArray<CNcsEmailAddressObject>& aAddress ); |
213 void SetToFieldAddressesL( |
|
214 RPointerArray<CNcsEmailAddressObject>& aAddress ); |
214 |
215 |
215 /** |
216 /** |
216 * SetCcFieldAddressesL |
217 * SetCcFieldAddressesL |
217 * Set CC-field addresses. |
218 * Set CC-field addresses. |
218 * @param aAddress Array of address objects. |
219 * @param aAddress Array of address objects. |
219 */ |
220 */ |
220 void SetCcFieldAddressesL( RPointerArray<CNcsEmailAddressObject>& aAddress ); |
221 void SetCcFieldAddressesL( |
|
222 RPointerArray<CNcsEmailAddressObject>& aAddress ); |
221 |
223 |
222 /** |
224 /** |
223 * SetBccFieldAddressesL |
225 * SetBccFieldAddressesL |
224 * Set BCC-field addresses. |
226 * Set BCC-field addresses. |
225 * @param aAddress Array of address objects. |
227 * @param aAddress Array of address objects. |
226 */ |
228 */ |
227 void SetBccFieldAddressesL( RPointerArray<CNcsEmailAddressObject>& aAddress ); |
229 void SetBccFieldAddressesL( |
|
230 RPointerArray<CNcsEmailAddressObject>& aAddress ); |
228 |
231 |
229 /** |
232 /** |
230 * AppendToFieldAddressesL |
233 * AppendToFieldAddressesL |
231 * Append TO-field addresses. |
234 * Append TO-field addresses. |
232 * @param aAddress Array of address objects. |
235 * @param aAddress Array of address objects. |
233 */ |
236 */ |
234 void AppendToFieldAddressesL( RPointerArray<CNcsEmailAddressObject>& aAddress ); |
237 void AppendToFieldAddressesL( |
|
238 RPointerArray<CNcsEmailAddressObject>& aAddress ); |
235 |
239 |
236 /** |
240 /** |
237 * AppendCcFieldAddressesL |
241 * AppendCcFieldAddressesL |
238 * Append CC-field addresses. |
242 * Append CC-field addresses. |
239 * @param aAddress Array of address objects. |
243 * @param aAddress Array of address objects. |
240 */ |
244 */ |
241 void AppendCcFieldAddressesL( RPointerArray<CNcsEmailAddressObject>& aAddress ); |
245 void AppendCcFieldAddressesL( |
|
246 RPointerArray<CNcsEmailAddressObject>& aAddress ); |
242 |
247 |
243 /** |
248 /** |
244 * AppendBccFieldAddressesL |
249 * AppendBccFieldAddressesL |
245 * Append BCC-field addresses. |
250 * Append BCC-field addresses. |
246 * @param aAddress Array of address objects. |
251 * @param aAddress Array of address objects. |
247 */ |
252 */ |
248 void AppendBccFieldAddressesL( RPointerArray<CNcsEmailAddressObject>& aAddress ); |
253 void AppendBccFieldAddressesL( |
|
254 RPointerArray<CNcsEmailAddressObject>& aAddress ); |
249 |
255 |
250 /** |
256 /** |
251 * SetSubjectL |
257 * SetSubjectL |
252 * Set SUBJECT-field text. |
258 * Set SUBJECT-field text. |
253 * @param aSubject Text. |
259 * @param aSubject Text. |
276 * @param aMenuBar The menu bar. |
282 * @param aMenuBar The menu bar. |
277 */ |
283 */ |
278 void SetMenuBar( CEikButtonGroupContainer* aMenuBar ); |
284 void SetMenuBar( CEikButtonGroupContainer* aMenuBar ); |
279 |
285 |
280 /** |
286 /** |
281 * SetAttachmentLabelTextL |
287 * SetAttachmentLabelTextsL |
282 * Set attachments label information. |
288 * Set attachment label informations from arrays of file name and |
283 * @param aText The text to be shown in the attachments label. |
289 * size informations. Some decorations may be added. |
284 */ |
290 * The file name will be truncated autoamtically if needed. |
285 void SetAttachmentLabelTextL( const TDesC& aText ); |
291 * The method takes ownership of the passed arrays. |
286 |
292 * @param aAttachmentNames Descriptor array containing file names. |
287 /** |
293 * @param aAttachmentSizes Descriptor array containing file sizes. |
288 * SetAttachmentLabelTextL |
294 */ |
289 * Set attachments label information from file name and size information. |
295 void SetAttachmentLabelTextsLD( CDesCArray* aAttachmentNames, |
290 * Some decorations may be added. The file name will be truncated autoamtically if needed. |
296 CDesCArray* aAttachmentSizes ); |
291 * @param aAttachmentName The name of the attachment to be shown |
297 |
292 * @param aAttachmentSizeDesc Descriptor containing size information about the file |
298 /** |
293 */ |
299 * FocusedAttachmentLabelIndex |
294 void SetAttachmentLabelTextL( const TDesC& aAttachmentName, const TDesC& aAttachmentSizeDesc ); |
300 * Returns the index of the attachment label that is currently focused |
295 |
301 * @return Index of the focused attachment label. |
|
302 */ |
|
303 TInt FocusedAttachmentLabelIndex(); |
|
304 |
|
305 /** |
|
306 * FixSemicolonL |
|
307 * Fixes possibly missing semicolon in message header address fields. |
|
308 */ |
296 void FixSemicolonL(); |
309 void FixSemicolonL(); |
297 |
310 |
298 void HideAttachmentLabel(); |
311 void HideAttachmentLabel(); |
|
312 |
299 /** |
313 /** |
300 * IsCcFieldVisible |
314 * IsCcFieldVisible |
301 * Test if CC-field is visible. |
315 * Test if CC-field is visible. |
302 * @return True if visible. |
316 * @return True if visible. |
303 */ |
317 */ |
486 * CommitL |
488 * CommitL |
487 * Commits changes to message |
489 * Commits changes to message |
488 */ |
490 */ |
489 void CommitL( TFieldToCommit aFieldToCommit = EAllFields ); |
491 void CommitL( TFieldToCommit aFieldToCommit = EAllFields ); |
490 |
492 |
491 //<cmail> |
493 /** |
492 //sets up iSwitchChangeMskOff falg, which disables changes of MSK label if any popup dialog is open |
494 * SwitchChangeMskOff |
|
495 * Sets up iSwitchChangeMskOff falg, which disables changes of MSK label |
|
496 * if any popup dialog is open |
|
497 */ |
493 void SwitchChangeMskOff(TBool aTag); |
498 void SwitchChangeMskOff(TBool aTag); |
494 //</cmail> |
|
495 |
499 |
496 /** |
500 /** |
497 * ScrollL |
501 * ScrollL |
498 * @param aTargetPos Scrolls display to given position |
502 * @param aTargetPos Scrolls display to given position |
499 */ |
503 */ |
500 void ScrollL( TInt aTargetPos ); |
504 void ScrollL( TInt aTargetPos ); |
501 |
505 |
502 public: // from CoeControl |
506 public: // from CoeControl |
503 |
507 |
504 /** |
508 /** |
505 * Draw |
509 * Draw |
506 * Draw this CNcsComposeViewContainer to the screen. |
510 * Draw this CNcsComposeViewContainer to the screen. |
507 * @param aRect the rectangle of this view that needs updating |
511 * @param aRect the rectangle of this view that needs updating |
508 */ |
512 */ |
509 void Draw( const TRect& aRect ) const; |
513 void Draw( const TRect& aRect ) const; |
510 |
514 |
511 void SetMskL(); |
515 void SetMskL(); |
512 |
516 |
513 //<cmail> |
|
514 /** |
517 /** |
515 * Handle pointer event |
518 * Handle pointer event |
516 * |
519 * |
517 */ |
520 */ |
518 void HandlePointerEventL( const TPointerEvent& aPointerEvent ); |
521 void HandlePointerEventL( const TPointerEvent& aPointerEvent ); |
519 //</cmail> |
|
520 |
522 |
521 /** |
523 /** |
522 * OfferKeyEventL |
524 * OfferKeyEventL |
523 * Key event handler. |
525 * Key event handler. |
524 * @param aKeyEvent The key event. |
526 * @param aKeyEvent The key event. |
551 */ |
553 */ |
552 TBool IsRemoteSearchInprogress() const; |
554 TBool IsRemoteSearchInprogress() const; |
553 |
555 |
554 public: // from MEikScrollBarObserver |
556 public: // from MEikScrollBarObserver |
555 |
557 |
556 /** |
558 /** |
557 * HandleScrollEventL |
559 * HandleScrollEventL |
558 */ |
560 */ |
559 void HandleScrollEventL( CEikScrollBar* aScrollBar, TEikScrollEvent aEventType ); |
561 void HandleScrollEventL( |
|
562 CEikScrollBar* aScrollBar, TEikScrollEvent aEventType ); |
560 |
563 |
561 public: // from MFSEmailUiContactHandlerObserver |
564 public: // from MFSEmailUiContactHandlerObserver |
562 |
565 |
563 void OperationCompleteL( TContactHandlerCmd aCmd, |
566 void OperationCompleteL( TContactHandlerCmd aCmd, |
564 const RPointerArray<CFSEmailUiClsItem>& aContacts ); |
567 const RPointerArray<CFSEmailUiClsItem>& aContacts ); |
568 |
571 |
569 void HandleEdwinEventL( CEikEdwin* aEdwin, TEdwinEvent aEventType ); |
572 void HandleEdwinEventL( CEikEdwin* aEdwin, TEdwinEvent aEventType ); |
570 |
573 |
571 public: // from base class MEikEdwinSizeObserver |
574 public: // from base class MEikEdwinSizeObserver |
572 |
575 |
573 TBool HandleEdwinSizeEventL( CEikEdwin* aEdwin, TEdwinSizeEvent aEventType, TSize aDesirableEdwinSize ); |
576 TBool HandleEdwinSizeEventL( CEikEdwin* aEdwin, |
|
577 TEdwinSizeEvent aEventType, TSize aDesirableEdwinSize ); |
574 |
578 |
575 public: // from MNcsFieldSizeObserver |
579 public: // from MNcsFieldSizeObserver |
576 |
580 |
577 TBool UpdateFieldSizeL(); |
581 TBool UpdateFieldSizeL(); |
578 void UpdateFieldPosition( CCoeControl* aAnchor ); |
582 void UpdateFieldPosition( CCoeControl* aAnchor ); |
579 |
583 |
580 //<cmail> |
|
581 private: //From MAknLongTapDetectorCallBack |
584 private: //From MAknLongTapDetectorCallBack |
582 void HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& aPenEventScreenLocation ); |
585 void HandleLongTapEventL( const TPoint& aPenEventLocation, |
583 //</cmail> |
586 const TPoint& aPenEventScreenLocation ); |
584 |
587 |
585 private: |
588 private: |
586 |
589 |
587 /** |
590 /** |
588 * Constructor |
591 * Constructor |
610 * UpdateScreenPositionL |
613 * UpdateScreenPositionL |
611 * @param aKeyCode Needed to recognize presses of the enter key |
614 * @param aKeyCode Needed to recognize presses of the enter key |
612 * in moving of display. |
615 * in moving of display. |
613 */ |
616 */ |
614 void UpdateScreenPositionL( const TUint& aKeyCode = EKeyNull ); |
617 void UpdateScreenPositionL( const TUint& aKeyCode = EKeyNull ); |
615 //<cmail> |
618 |
|
619 /** |
|
620 * CalculateSeparatorLineSecondaryColor |
|
621 * @return Separator line secondary color |
|
622 */ |
616 TRgb CalculateSeparatorLineSecondaryColor(); |
623 TRgb CalculateSeparatorLineSecondaryColor(); |
617 //</cmail> |
624 |
618 void UpdatePhysicsL(); |
625 void UpdatePhysicsL(); |
619 |
626 |
620 private: // from MAknPhysicsObserver |
627 private: // from MAknPhysicsObserver |
621 |
628 |
622 /** |
629 /** |
623 * @see MAknPhysicsObserver::ViewPositionChanged |
630 * @see MAknPhysicsObserver::ViewPositionChanged |
624 */ |
631 */ |
625 virtual void ViewPositionChanged( const TPoint& aNewPosition, TBool aDrawNow, TUint aFlags ); |
632 virtual void ViewPositionChanged( const TPoint& aNewPosition, |
|
633 TBool aDrawNow, TUint aFlags ); |
626 |
634 |
627 /** |
635 /** |
628 * @see MAknPhysicsObserver::PhysicEmulationEnded |
636 * @see MAknPhysicsObserver::PhysicEmulationEnded |
629 */ |
637 */ |
630 virtual void PhysicEmulationEnded(); |
638 virtual void PhysicEmulationEnded(); |
698 |
708 |
699 /** Reference to current mailbox */ |
709 /** Reference to current mailbox */ |
700 CFSMailBox& iMailBox; |
710 CFSMailBox& iMailBox; |
701 |
711 |
702 TAppendAddresses iAppendAddresses; |
712 TAppendAddresses iAppendAddresses; |
703 //<cmail> |
713 |
704 TInt iSeparatorLineYPos; |
714 TInt iSeparatorLineYPos; |
705 //</cmail> |
|
706 |
715 |
707 // panning related |
716 // panning related |
708 CAknPhysics* iPhysics; |
717 CAknPhysics* iPhysics; |
709 TPoint iPreviousPosition; |
718 TPoint iPreviousPosition; |
710 TPoint iOriginalPosition; |
719 TPoint iOriginalPosition; |