25 |
25 |
26 #include "FreestyleEmailUi.hrh" |
26 #include "FreestyleEmailUi.hrh" |
27 #include "ncsaddressinputfield.h" |
27 #include "ncsaddressinputfield.h" |
28 #include "ncsfieldsizeobserver.h" |
28 #include "ncsfieldsizeobserver.h" |
29 #include "ncsconstants.h" |
29 #include "ncsconstants.h" |
30 |
30 #include "ncspopuplistbox.h" |
31 |
31 |
32 class CFSMailBox; |
32 class CFSMailBox; |
33 class CNcsAttachmentField; |
33 class CNcsAttachmentField; |
34 class CNcsEmailAddressObject; |
34 class CNcsEmailAddressObject; |
35 class CNcsPopupListBox; |
|
36 class CNcsSubjectField; |
35 class CNcsSubjectField; |
37 class CAknPhysics; |
36 class CAknPhysics; |
38 |
37 |
39 /** |
38 /** |
40 * CNcsHeaderContainer |
39 * CNcsHeaderContainer |
41 */ |
40 */ |
42 class CNcsHeaderContainer : public CCoeControl, public MNcsAddressPopupList |
41 class CNcsHeaderContainer : public CCoeControl, public MNcsAddressPopupList, |
|
42 public MNcsPopupListBoxObserver |
43 { |
43 { |
44 |
44 |
45 public: |
45 public: |
46 |
46 |
47 /** Initialisation flags. */ |
47 /** Initialisation flags. */ |
71 void EnableKineticScrollingL(CAknPhysics* aPhysics); |
71 void EnableKineticScrollingL(CAknPhysics* aPhysics); |
72 |
72 |
73 private: // constructor/destructor |
73 private: // constructor/destructor |
74 |
74 |
75 /** |
75 /** |
76 * CNcsHeaderContainer |
76 * CNcsHeaderContainer |
77 * C++ constructor. |
77 * C++ constructor. |
78 * @param aParent Parent control. |
78 * @param aParent Parent control. |
79 * @param aMailBox reference to current mailbox item |
79 * @param aMailBox reference to current mailbox item |
80 */ |
80 */ |
81 CNcsHeaderContainer( CCoeControl& aParent, CFSMailBox& aMailBox, CAknPhysics* aPhysics ); |
81 CNcsHeaderContainer( CCoeControl& aParent, CFSMailBox& aMailBox, CAknPhysics* aPhysics ); |
82 |
82 |
83 /** |
83 /** |
84 * ConstructL |
84 * ConstructL |
85 * 2nd phase constructor. |
85 * 2nd phase constructor. |
86 */ |
86 */ |
87 void ConstructL( TInt aFlags ); |
87 void ConstructL( TInt aFlags ); |
88 |
88 |
89 public: // function members |
89 public: // function members |
90 |
90 |
91 /** |
91 /** |
92 * GetToFieldAddressesL |
92 * From MNcsPopupListBoxObserver. |
93 * Get addresses in TO-field. |
93 */ |
94 * @return Array of addresses. |
94 TBool PopupVisibilityChangingL( TBool aVisible ); |
95 */ |
95 |
96 const RPointerArray<CNcsEmailAddressObject>& GetToFieldAddressesL( |
96 /** |
|
97 * From MNcsPopupListBoxObserver. |
|
98 */ |
|
99 void PopupItemSelectedL(); |
|
100 |
|
101 /** |
|
102 * GetToFieldAddressesL |
|
103 * Get addresses in TO-field. |
|
104 * @return Array of addresses. |
|
105 */ |
|
106 const RPointerArray<CNcsEmailAddressObject>& GetToFieldAddressesL( |
97 TBool aParseNow = ETrue ); |
107 TBool aParseNow = ETrue ); |
98 |
108 |
99 /** |
109 /** |
100 * GetCcFieldAddressesL |
110 * GetCcFieldAddressesL |
101 * Get addresses in CC-field. |
111 * Get addresses in CC-field. |
345 virtual TInt LayoutLineCount() const; |
355 virtual TInt LayoutLineCount() const; |
346 |
356 |
347 TBool IsAddressInputField( const CCoeControl* aControl ) const; |
357 TBool IsAddressInputField( const CCoeControl* aControl ) const; |
348 |
358 |
349 TBool IsRemoteSearchInprogress() const; |
359 TBool IsRemoteSearchInprogress() const; |
350 |
|
351 /** |
|
352 * Shows/hides cursor. |
|
353 * |
|
354 * @param aShow ETrue - shows, EFalse - hides cursor. |
|
355 */ |
|
356 void ShowCursor( TBool aShow, TDrawNow aDrawNow = ENoDrawNow ); |
|
357 |
360 |
358 void DoScroll(); |
361 void DoScroll(); |
359 |
362 void DoScrollFocusToTop(); |
|
363 |
360 void SetPhysicsEmulationOngoing( TBool aPhysOngoing ); |
364 void SetPhysicsEmulationOngoing( TBool aPhysOngoing ); |
361 |
365 |
|
366 virtual void HandleResourceChange( TInt aType ); |
|
367 |
|
368 // Set origin for header's top position. |
|
369 void SetOrigin( TPoint& aPoint ); |
|
370 |
362 private: // Function members |
371 private: // Function members |
363 |
372 |
364 void FocusChanged(TDrawNow aDrawNow); |
373 void FocusChanged(TDrawNow aDrawNow); |
365 |
374 |
366 void UpdatePopupContactListL( const TDesC& aMatchString, TBool aListAll ); |
375 void UpdatePopupContactListL( const TDesC& aMatchString, TBool aListAll ); |
408 void HandleLongTapEventL( const TPoint& aPenEventLocation, |
417 void HandleLongTapEventL( const TPoint& aPenEventLocation, |
409 const TPoint& aPenEventScreenLocation ); |
418 const TPoint& aPenEventScreenLocation ); |
410 |
419 |
411 private: // Data members |
420 private: // Data members |
412 |
421 |
413 /* |
422 // Parent window. |
414 * Parent window |
|
415 * Not Own |
|
416 */ |
|
417 CCoeControl& iParent; |
423 CCoeControl& iParent; |
418 |
424 |
419 MNcsFieldSizeObserver& iFieldSizeObserver; |
425 MNcsFieldSizeObserver& iFieldSizeObserver; |
420 |
426 |
421 CAknLongTapDetector* iLongTapDetector; |
427 CAknLongTapDetector* iLongTapDetector; |
422 |
428 |
423 CEikButtonGroupContainer* iMenuBar; |
429 CEikButtonGroupContainer* iMenuBar; |
424 |
430 |
425 CNcsAddressInputField* iToField; |
431 CNcsAddressInputField* iToField; |
426 |
|
427 CNcsAddressInputField* iCcField; |
432 CNcsAddressInputField* iCcField; |
428 |
|
429 CNcsAddressInputField* iBccField; |
433 CNcsAddressInputField* iBccField; |
430 |
434 |
431 CNcsSubjectField* iSubjectField; |
435 CNcsSubjectField* iSubjectField; |
432 |
436 |
433 CNcsAttachmentField* iAttachmentField; |
437 CNcsAttachmentField* iAttachmentField; |
434 |
438 |
435 // The attachments count |
439 // The attachments count |
436 TInt iAttachmentCount; |
440 TInt iAttachmentCount; |
437 |
441 |
438 // Address popup data members |
442 // Popup for resently used email addressses. Own. |
439 CNcsPopupListBox* iAacListBox; |
443 CNcsPopupListBox* iAacListBox; |
440 |
444 |
441 CFSMailBox& iMailBox; |
445 CFSMailBox& iMailBox; |
442 |
446 |
443 //flag which disables changes of MSK label if any popup dialog is open |
447 //flag which disables changes of MSK label if any popup dialog is open |
444 TBool iSwitchChangeMskOff; |
448 TBool iSwitchChangeMskOff; |
445 |
449 |
446 TBool iLongTapEventConsumed; |
450 TBool iLongTapEventConsumed; |
447 TBool iRALInProgress; |
451 TBool iRALInProgress; |
448 |
452 |
449 // Currently focused control |
453 // Currently focused control |
450 CCoeControl* iFocused; |
454 CCoeControl* iFocused; |
451 |
455 |
452 // panning related |
456 // panning related |
453 CAknPhysics* iPhysics; |
457 CAknPhysics* iPhysics; |
|
458 |
|
459 // Header containers default top left position. |
|
460 TPoint iOrigin; |
|
461 |
|
462 TBool iSplitScreenVKBEnabled; |
454 }; |
463 }; |
455 |
464 |
456 |
465 |
457 #endif |
466 #endif |