emailuis/emailui/inc/ncscomposeviewcontainer.h
branchRCL_3
changeset 64 3533d4323edc
child 73 c8382f7b54ef
equal deleted inserted replaced
63:d189ee25cf9d 64:3533d4323edc
       
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Container class for compose view
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CNCSCOMPOSEVIEWCONTAINER_H
       
    20 #define CNCSCOMPOSEVIEWCONTAINER_H
       
    21 
       
    22 
       
    23 #include <AknDef.h>
       
    24 #include <AknsControlContext.h>
       
    25 #include <eikedwob.h>
       
    26 #include <aknphysicsobserveriface.h> // MAknPhysicsObserver
       
    27 
       
    28 #include "ncsfieldsizeobserver.h"
       
    29 #include "ncsconstants.h"
       
    30 #include "FreestyleEmailUiContactHandlerObserver.h"
       
    31 #include "FreestyleEmailUi.hrh"
       
    32 #include <aknlongtapdetector.h>
       
    33 #include "FSAsyncTextFormatter.h"
       
    34 
       
    35 class CAknPhysics;
       
    36 class CNcsEditor;
       
    37 class CNcsComposeView;
       
    38 class CNcsHeaderContainer;
       
    39 class CAknLongTapDetector;
       
    40 class CAknDoubleSpanScrollBar;
       
    41 class CFSMailBox;
       
    42 class CAknsLayeredBackgroundControlContext;
       
    43 class CFsAutoSaver;
       
    44 class CNcsEmailAddressObject;
       
    45 
       
    46 enum TAppendAddresses 
       
    47 	{
       
    48 	EAppendTo,
       
    49 	EAppendCc,
       
    50 	EAppendBcc
       
    51 	};
       
    52 
       
    53 
       
    54 /**
       
    55 *  CNcsComposeViewContainer container control class.
       
    56 */
       
    57 class CNcsComposeViewContainer: public CCoeControl, public MNcsFieldSizeObserver,
       
    58                                 public MEikScrollBarObserver,
       
    59                                 public MFSEmailUiContactHandlerObserver,
       
    60                                 public MAknLongTapDetectorCallBack,
       
    61                                 public MEikEdwinObserver,
       
    62                                 public MEikEdwinSizeObserver,
       
    63                                 public MAknPhysicsObserver,
       
    64                                 public MAsyncTextFormatterObserver
       
    65     {
       
    66     
       
    67 public:
       
    68  
       
    69     /** Initialisation flags. */
       
    70     enum TInitFlags
       
    71         {
       
    72         ECcFieldVisible  = 0x1,
       
    73         EBccFieldVisible = 0x2
       
    74         };
       
    75 
       
    76     /**
       
    77     * Two-phased constructor.
       
    78     * Create a CNcsComposeViewContainer object, that draws itself to aRect
       
    79     * @param aView The parent view of this container.
       
    80     * @param aRect The rectangle this view will be drawn to.
       
    81     * @param aMailBox reference to current mailbox item.
       
    82     * @param aFlags Initilisation flags defined in @c TInitFlag enumeration.
       
    83     * @return a pointer to the created instance of CNcsComposeViewContainer.
       
    84     */
       
    85     static CNcsComposeViewContainer* NewL( CNcsComposeView& aView, 
       
    86         const TRect& aRect, CFSMailBox& aMailBox, CFsAutoSaver& aAutoSaver,
       
    87         TInt aFlags = NULL );
       
    88 
       
    89     /**
       
    90     * Destructor.
       
    91     */
       
    92     virtual ~CNcsComposeViewContainer();
       
    93 
       
    94 public: // new functions
       
    95 
       
    96     /**
       
    97     * UpdateScrollBar
       
    98     * Updates scroll bar data.
       
    99     */
       
   100     void UpdateScrollBar();
       
   101 
       
   102     /**
       
   103     * GetToFieldAddressesL
       
   104     * Get addresses in TO-field.
       
   105     * @return Array of address objects.
       
   106     */
       
   107     const RPointerArray<CNcsEmailAddressObject>& 
       
   108     GetToFieldAddressesL( TBool aParseNow=ETrue );
       
   109 
       
   110     /**
       
   111     * GetCcFieldAddressesL
       
   112     * Get addresses in CC-field.
       
   113     * @return Array of address objects.
       
   114     */
       
   115     const RPointerArray<CNcsEmailAddressObject>& 
       
   116     GetCcFieldAddressesL( TBool aParseNow=ETrue );
       
   117 
       
   118     /**
       
   119     * GetBccFieldAddressesL
       
   120     * Get addresses in BCC-field.
       
   121     * @return Array of address objects.
       
   122     */
       
   123     const RPointerArray<CNcsEmailAddressObject>& 
       
   124     GetBccFieldAddressesL( TBool aParseNow=ETrue );
       
   125 
       
   126     /**
       
   127     * GetSubjectLC
       
   128     * Get text in subject field.
       
   129     * @return Descriptor containing subject field text.
       
   130     */
       
   131     HBufC* GetSubjectLC() const;
       
   132 
       
   133     /**
       
   134     * GetToFieldSelectionLength
       
   135     * Get the length of selected text in TO-field.
       
   136     * @return Selection length.
       
   137     */
       
   138     TInt GetToFieldSelectionLength() const;
       
   139 
       
   140     /**
       
   141     * GetCcFieldSelectionLength
       
   142     * Get the length of selected text in CC-field.
       
   143     * @return Selection length.
       
   144     */
       
   145     TInt GetCcFieldSelectionLength() const;
       
   146 
       
   147     /**
       
   148     * GetBccFieldSelectionLength
       
   149     * Get the length of selected text in BCC-field.
       
   150     * @return Selection length.
       
   151     */
       
   152     TInt GetBccFieldSelectionLength() const;
       
   153 
       
   154     /**
       
   155     * GetToFieldLength
       
   156     * Get TO-field text length.
       
   157     * @return Text length.
       
   158     */
       
   159     TInt GetToFieldLength() const;
       
   160 
       
   161     /**
       
   162     * GetCcFieldLength
       
   163     * Get CC-field text length.
       
   164     * @return Text length.
       
   165     */
       
   166     TInt GetCcFieldLength() const;
       
   167 
       
   168     /**
       
   169     * GetBccFieldLength
       
   170     * Get BCC-field text length.
       
   171     * @return Text length.
       
   172     */
       
   173     TInt GetBccFieldLength() const;
       
   174         
       
   175     /**
       
   176     * GetSubjectFieldLength
       
   177     * Get SUBJECT-field text length.
       
   178     * @return Text length.
       
   179     */
       
   180     TInt GetSubjectFieldLength() const;
       
   181 
       
   182     /**
       
   183     * GetMessageFieldLength
       
   184     * Get MESSAGE-field text length.
       
   185     * @return Text length.
       
   186     */
       
   187     TInt GetMessageFieldLength() const;
       
   188 
       
   189     /**
       
   190     * GetAttachmentCount
       
   191     * Get number of attachments.
       
   192     * @return Attachment count.
       
   193     */
       
   194     TInt GetAttachmentCount() const;
       
   195 
       
   196     /**
       
   197     * HasRemoteAttachments
       
   198     * Tells if the message has one or more remote attachments
       
   199     * @return ETrue if the message has at least one remote attachment.
       
   200     */
       
   201     TBool HasRemoteAttachments() const;
       
   202 
       
   203     /**
       
   204     * GetLookupTextLC
       
   205     * Get the text to match for fast addressing or remote lookup.
       
   206     * @return Match text.
       
   207     */
       
   208     HBufC* GetLookupTextLC() const;
       
   209 
       
   210     /**
       
   211     * SetToFieldAddressesL
       
   212     * Set TO-field addresses.
       
   213     * @param aAddress Array of address objects.
       
   214     */
       
   215     void SetToFieldAddressesL( 
       
   216             RPointerArray<CNcsEmailAddressObject>& aAddress );
       
   217 
       
   218     /**
       
   219     * SetCcFieldAddressesL
       
   220     * Set CC-field addresses.
       
   221     * @param aAddress Array of address objects.
       
   222     */
       
   223     void SetCcFieldAddressesL( 
       
   224             RPointerArray<CNcsEmailAddressObject>& aAddress );
       
   225 
       
   226     /**
       
   227     * SetBccFieldAddressesL
       
   228     * Set BCC-field addresses.
       
   229     * @param aAddress Array of address objects.
       
   230     */
       
   231     void SetBccFieldAddressesL( 
       
   232             RPointerArray<CNcsEmailAddressObject>& aAddress );
       
   233 
       
   234     /**
       
   235     * AppendToFieldAddressesL
       
   236     * Append TO-field addresses.
       
   237     * @param aAddress Array of address objects.
       
   238     */
       
   239     void AppendToFieldAddressesL( 
       
   240             RPointerArray<CNcsEmailAddressObject>& aAddress );
       
   241 
       
   242     /**
       
   243     * AppendCcFieldAddressesL
       
   244     * Append CC-field addresses.
       
   245     * @param aAddress Array of address objects.
       
   246     */
       
   247     void AppendCcFieldAddressesL( 
       
   248             RPointerArray<CNcsEmailAddressObject>& aAddress );
       
   249 
       
   250     /**
       
   251     * AppendBccFieldAddressesL
       
   252     * Append BCC-field addresses.
       
   253     * @param aAddress Array of address objects.
       
   254     */
       
   255     void AppendBccFieldAddressesL( 
       
   256             RPointerArray<CNcsEmailAddressObject>& aAddress );
       
   257 
       
   258     /**
       
   259     * SetSubjectL
       
   260     * Set SUBJECT-field text.
       
   261     * @param aSubject Text.
       
   262     */
       
   263     void SetSubjectL( const TDesC& aSubject );
       
   264 
       
   265     /**
       
   266     * SetCcFieldVisibleL
       
   267     * Set the visibility of CC-field.
       
   268     * @param aVisible True if the field is to be visible.
       
   269     * @param aFocus True if the field is to be focused.
       
   270     */
       
   271     void SetCcFieldVisibleL( TBool aVisible, TBool aFocus=ETrue );
       
   272 
       
   273     /**
       
   274     * SetBccFieldVisibleL
       
   275     * Set the visibility of BCC-field.
       
   276     * @param aVisible True if the field is to be visible.
       
   277     * @param aFocus True if the field is to be focused.
       
   278     */
       
   279     void SetBccFieldVisibleL( TBool aVisible, TBool aFocus=ETrue );
       
   280 
       
   281     /**
       
   282     * SetMenuBar
       
   283     * Set the menu bar.
       
   284     * @param aMenuBar The menu bar.
       
   285     */
       
   286     void SetMenuBar( CEikButtonGroupContainer* aMenuBar );
       
   287 
       
   288     /**
       
   289      * SetAttachmentLabelTextsL
       
   290      * Set attachment label informations from arrays of file name and
       
   291      * size informations. Some decorations may be added. 
       
   292      * The file name will be truncated autoamtically if needed.
       
   293      * The method takes ownership of the passed arrays.
       
   294      * @param  aAttachmentNames Descriptor array containing file names.
       
   295      * @param  aAttachmentSizes Descriptor array containing file sizes.
       
   296      */
       
   297     void SetAttachmentLabelTextsLD( CDesCArray* aAttachmentNames, 
       
   298                                     CDesCArray* aAttachmentSizes );
       
   299 
       
   300     /**
       
   301      * FocusedAttachmentLabelIndex
       
   302      * Returns the index of the attachment label that is currently focused
       
   303      * @return Index of the focused attachment label.
       
   304      */
       
   305     TInt FocusedAttachmentLabelIndex();
       
   306     
       
   307     /**
       
   308      * FixSemicolonL
       
   309      * Fixes possibly missing semicolon in message header address fields.
       
   310      */
       
   311     void FixSemicolonL();
       
   312     
       
   313     void HideAttachmentLabel();
       
   314  
       
   315     /**
       
   316     * IsCcFieldVisible
       
   317     * Test if CC-field is visible.
       
   318     * @return True if visible.
       
   319     */
       
   320     TBool IsCcFieldVisible() const;
       
   321 
       
   322     /**
       
   323     * IsBccFieldVisible
       
   324     * Test if BCC-field is visible.
       
   325     * @return True if visible.
       
   326     */
       
   327     TBool IsBccFieldVisible() const;
       
   328 
       
   329     /**
       
   330     * IsFocusTo
       
   331     * Test if TO-field is focused.
       
   332     * @return True if focused.
       
   333     */
       
   334     TBool IsFocusTo() const;
       
   335 
       
   336     /**
       
   337     * IsFocusCc
       
   338     * Test if CC-field is focused.
       
   339     * @return True if focused.
       
   340     */
       
   341     TBool IsFocusCc() const;
       
   342 
       
   343     /**
       
   344     * IsFocusBcc
       
   345     * Test if BCC-field is focused.
       
   346     * @return True if focused.
       
   347     */
       
   348     TBool IsFocusBcc() const;
       
   349 
       
   350     /**
       
   351     * IsFocusAttachments
       
   352     * Test if ATTACHMENTS-field is focused.
       
   353     * @return True if focused.
       
   354     */
       
   355     TBool IsFocusAttachments() const;
       
   356         
       
   357     /**
       
   358     * IncludeAddressL
       
   359     */
       
   360     void IncludeAddressL();
       
   361 
       
   362     /**
       
   363     * IncludeAddressL
       
   364     */
       
   365     void IncludeAddressL(const CNcsEmailAddressObject& eml);
       
   366         
       
   367     /**
       
   368     * ClosePopupContactListL
       
   369     * Closes the popup listbox.
       
   370     */
       
   371     void ClosePopupContactListL();
       
   372 
       
   373     /**
       
   374     * DeleteSelectionL
       
   375     * Deletes selected text in focused AIF
       
   376     */
       
   377     void DeleteSelectionL();
       
   378 
       
   379     /**
       
   380      * Set the contents of the message body.
       
   381      * @param aMessage Contents of MESSAGE-field.
       
   382      * @parem aReadOnlyQuote Contents of read-only quote field.
       
   383      */
       
   384     void SetBodyContentL( const TDesC& aMessage, const TDesC& aReadOnlyQuote );
       
   385     
       
   386     /**
       
   387      * Set the contents of the message body in asnchronous way.
       
   388      * @param aMessage Contents of MESSAGE-field.
       
   389      * @param aReadOnlyQuote Contents of read-only quote field.
       
   390      */
       
   391     void SetBodyContentAsyncL( const TDesC& aMessage, const TDesC& aReadOnlyQuote );
       
   392 
       
   393     /**
       
   394      * Get the contents of message body. The message body consists of
       
   395      * MESSAGE-field followed by optional read-only quote field.
       
   396      * @return Message body.
       
   397      */
       
   398     HBufC* GetBodyContentLC();
       
   399 
       
   400     /**
       
   401      * BodyText
       
   402      * Gets modifiable reference to the text in body text field.
       
   403      */
       
   404     CRichText& BodyText();
       
   405 
       
   406     /**
       
   407     * SetFocusToToField
       
   408     * Focuses the TO-field.
       
   409     */
       
   410     void SetFocusToToField();
       
   411 
       
   412     /**
       
   413     * SetFocusToAttachmentField
       
   414     * Focuses the ATTACHEMENT-field.
       
   415     */
       
   416     void SetFocusToAttachmentField();
       
   417         
       
   418     /**
       
   419     * SetFocusToMessageFieldL
       
   420     * Focuses the MESSAGE-field.
       
   421     */
       
   422     void SetFocusToMessageFieldL();
       
   423 
       
   424     /**
       
   425     * AddQuickTextL
       
   426     * Inserts text in current cursor position.
       
   427     * @param aText Text to insert.
       
   428     */
       
   429     void AddQuickTextL( const TDesC& aText );
       
   430         
       
   431     /**
       
   432     * SelectAllToFieldTextL
       
   433     * Selects all TO-field text.
       
   434     */
       
   435     void SelectAllToFieldTextL();
       
   436 
       
   437     /**
       
   438     * SelectAllCcFieldTextL
       
   439     * Selects all CC-field text.
       
   440     */
       
   441     void SelectAllCcFieldTextL();
       
   442 
       
   443     /**
       
   444     * SelectAllBccFieldTextL
       
   445     * Selects all BCC-field text.
       
   446     */
       
   447     void SelectAllBccFieldTextL();
       
   448 
       
   449     /**
       
   450     * SelectAllSubjectFieldTextL
       
   451     * Selects all SUBJECT-field text.
       
   452     */
       
   453     void SelectAllSubjectFieldTextL();
       
   454 			
       
   455     /**
       
   456     * IsSubjectFieldEmpty
       
   457     * Tells if SUBJECT-field is empty (has default text or is empty).
       
   458     * @return True if user has not put anything to the field.
       
   459     */
       
   460     TBool IsSubjectFieldEmpty();
       
   461 		
       
   462     /**
       
   463     * AppendAddressesL
       
   464     * Displays contacts dialog and appends selected addresses in 
       
   465     * focused AIF.
       
   466     *
       
   467     * @return ETrue if addresses we tried to append, EFalse otherwise. 
       
   468     */
       
   469     TBool AppendAddressesL();
       
   470 		
       
   471     /**
       
   472     * HandleAttachmentsOpenCommand
       
   473     * 
       
   474     */
       
   475     void HandleAttachmentsOpenCommandL();
       
   476 		
       
   477     /**
       
   478     * LaunchStylusPopupMenu
       
   479     * 
       
   480     */
       
   481     void LaunchStylusPopupMenu( const TPoint& aPenEventScreenLocation );
       
   482     
       
   483     /**
       
   484     * AreAddressFieldsEmpty
       
   485     * 
       
   486     */
       
   487     TBool AreAddressFieldsEmpty();
       
   488 		
       
   489     void DoPopupSelectL();
       
   490 		
       
   491     void HandleLayoutChangeL();
       
   492     
       
   493     void HandleSkinChangeL();
       
   494     
       
   495     TInt ContentTotalHeight();
       
   496     /**
       
   497     * CommitL
       
   498     * Commits changes to message
       
   499     */
       
   500     void CommitL( TFieldToCommit aFieldToCommit = EAllFields );
       
   501 
       
   502     /**
       
   503      * SwitchChangeMskOff
       
   504      * Sets up iSwitchChangeMskOff falg, which disables changes of MSK label
       
   505      * if any popup dialog is open
       
   506      */
       
   507     void SwitchChangeMskOff(TBool aTag);
       
   508 
       
   509     /**
       
   510      * Scroll
       
   511      * @param aTargetPos Scrolls display to given position
       
   512      */
       
   513     void Scroll( TInt aTargetPos, TBool aDrawNow = ETrue );
       
   514     
       
   515     /**
       
   516      * Stopping asynchronous text formatting of message body.
       
   517      */
       
   518     void StopAsyncTextFormatter();
       
   519     
       
   520 public: // from MAsyncTextFormatterObserver
       
   521     
       
   522     /**
       
   523      * Called when text formatting was cancelled.
       
   524      */
       
   525     void FormatAllTextCancelled();
       
   526     
       
   527     /**
       
   528      * Called when text formatting is complete. 
       
   529      */
       
   530 	void FormatAllTextComplete();
       
   531 	
       
   532 public: // from CoeControl
       
   533 
       
   534     /**
       
   535     * Draw
       
   536     * Draw this CNcsComposeViewContainer to the screen.
       
   537     * @param aRect the rectangle of this view that needs updating
       
   538     */
       
   539     void Draw( const TRect& aRect ) const;
       
   540     
       
   541     void SetMskL();
       
   542     
       
   543     /**
       
   544     * Handle pointer event
       
   545     * 
       
   546     */
       
   547     void HandlePointerEventL( const TPointerEvent& aPointerEvent );
       
   548 	
       
   549     /**
       
   550     * OfferKeyEventL
       
   551     * Key event handler.
       
   552     * @param aKeyEvent The key event.
       
   553     * @param aType The type of key event.
       
   554     * @return Indicates whether the key event was used by this control.
       
   555     */
       
   556     TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
       
   557         
       
   558     /**
       
   559     * SizeChanged
       
   560     * Responds to changes to the size and position of the contents of this control.
       
   561     */
       
   562     void SizeChanged();
       
   563         
       
   564     /**
       
   565     * Responds to a change in focus.
       
   566     * @param aDrawNow Contains the value that was passed to SetFocus.
       
   567     */
       
   568     void FocusChanged(TDrawNow aDrawNow);
       
   569         
       
   570     /**
       
   571     * MopSupplyObject
       
   572     * Retrieves an object of the same type as that encapsulated in aId.
       
   573     * @param aId An encapsulated object type ID.
       
   574     */
       
   575     TTypeUid::Ptr MopSupplyObject( TTypeUid aId );
       
   576     
       
   577 	/**
       
   578     * Informs if Remotesearch is in progress
       
   579     */
       
   580     TBool IsRemoteSearchInprogress() const;
       
   581     
       
   582 public: // from MEikScrollBarObserver
       
   583     
       
   584     /**
       
   585     * HandleScrollEventL
       
   586     */
       
   587     void HandleScrollEventL( 
       
   588             CEikScrollBar* aScrollBar, TEikScrollEvent aEventType );
       
   589 
       
   590 public: // from MFSEmailUiContactHandlerObserver
       
   591 
       
   592     void OperationCompleteL( TContactHandlerCmd aCmd,
       
   593         const RPointerArray<CFSEmailUiClsItem>& aContacts );
       
   594     void OperationErrorL( TContactHandlerCmd aCmd, TInt aError );
       
   595 
       
   596 public: // from base class MEikEdwinObserver
       
   597 
       
   598     void HandleEdwinEventL( CEikEdwin* aEdwin, TEdwinEvent aEventType );
       
   599 
       
   600 public: // from base class MEikEdwinSizeObserver
       
   601     
       
   602     TBool HandleEdwinSizeEventL( CEikEdwin* aEdwin, 
       
   603             TEdwinSizeEvent aEventType, TSize aDesirableEdwinSize );
       
   604     
       
   605 public:  // from MNcsFieldSizeObserver
       
   606 
       
   607     TBool UpdateFieldSizeL( TBool aDoScroll );
       
   608     void UpdateFieldPosition( CCoeControl* aAnchor );
       
   609 
       
   610 private:  //From MAknLongTapDetectorCallBack
       
   611     void HandleLongTapEventL( const TPoint& aPenEventLocation, 
       
   612             const TPoint& aPenEventScreenLocation );
       
   613     
       
   614 private:
       
   615     
       
   616     /**
       
   617     * Constructor
       
   618     * @param aView The parent view
       
   619     */
       
   620     CNcsComposeViewContainer( CNcsComposeView& aView, CFsAutoSaver& aAutoSaver,
       
   621         CFSMailBox& aMailBox );
       
   622 
       
   623     /**
       
   624     * ConstructL
       
   625     * 2nd phase constructor
       
   626     * @param aRect Rectangle where container is drawn to.
       
   627     */
       
   628     void ConstructL( const TRect& aRect, TInt aFlags );
       
   629         
       
   630     /**
       
   631     * ChangeFocusL
       
   632     * Changes focus according to key event and focused control.
       
   633     * @param aKeyEvent The key event.
       
   634     * @return Indicates whether the key event was used by this control.
       
   635     */
       
   636     TKeyResponse ChangeFocusL( const TKeyEvent& aKeyEvent );
       
   637         
       
   638     /**
       
   639     * UpdateScreenPositionL
       
   640     * @param aKeyCode Needed to recognize presses of the enter key
       
   641     *                 in moving of display.
       
   642     */
       
   643     void UpdateScreenPositionL( const TUint& aKeyCode = EKeyNull );
       
   644 
       
   645     /**
       
   646      * CalculateSeparatorLineSecondaryColor
       
   647      * @return Separator line secondary color
       
   648      */
       
   649     TRgb CalculateSeparatorLineSecondaryColor();
       
   650     
       
   651     void UpdatePhysicsL();
       
   652 
       
   653 private: // from MAknPhysicsObserver
       
   654 
       
   655    /**
       
   656     * @see MAknPhysicsObserver::ViewPositionChanged
       
   657     */
       
   658    virtual void ViewPositionChanged( const TPoint& aNewPosition, 
       
   659            TBool aDrawNow, TUint aFlags );
       
   660 
       
   661    /**
       
   662     * @see MAknPhysicsObserver::PhysicEmulationEnded
       
   663     */
       
   664    virtual void PhysicEmulationEnded();
       
   665 
       
   666    /**
       
   667     * @see MAknPhysicsObserver::ViewPosition
       
   668     */
       
   669    virtual TPoint ViewPosition() const;
       
   670 
       
   671 private: // data
       
   672 
       
   673     /**
       
   674     * header container
       
   675     */
       
   676     CNcsHeaderContainer* iHeader;
       
   677     
       
   678     /**
       
   679     * message body field
       
   680     */
       
   681     CNcsEditor* iMessageField;
       
   682         
       
   683     /**
       
   684     * field for read-only quote used with some protocols on reply/forward
       
   685     */
       
   686     CNcsEditor* iReadOnlyQuoteField;
       
   687         
       
   688     /**
       
   689     * currently focused control
       
   690     */
       
   691     CCoeControl* iFocused;
       
   692     
       
   693     /**
       
   694      * Long tap detector.
       
   695      * Owned.
       
   696      */
       
   697     CAknLongTapDetector* iLongTapDetector;
       
   698     
       
   699     /**
       
   700     *
       
   701     */
       
   702     TPoint iContentBasePoint;
       
   703         
       
   704     /**
       
   705     *
       
   706     */
       
   707     CAknDoubleSpanScrollBar* iScrollBar;
       
   708         
       
   709     /**
       
   710     *
       
   711     */
       
   712     TAknDoubleSpanScrollBarModel iScrollBarModel;
       
   713         
       
   714     /**
       
   715     *
       
   716     */
       
   717     TRect iApplicationRect;
       
   718         
       
   719     /**
       
   720     *
       
   721     */
       
   722     HBufC* iLengthReference;
       
   723         
       
   724     /**
       
   725     * owner view
       
   726     */
       
   727     CNcsComposeView& iView;
       
   728         
       
   729     TInt iAmountMesFieldMovedUp;
       
   730         
       
   731     CFsAutoSaver& iAutoSaver;
       
   732 
       
   733     CAknsBasicBackgroundControlContext* iBgContext;
       
   734 
       
   735     /** Reference to current mailbox */
       
   736     CFSMailBox& iMailBox;
       
   737 		
       
   738     TAppendAddresses iAppendAddresses;
       
   739 
       
   740     TInt iSeparatorLineYPos;
       
   741     
       
   742     // panning related
       
   743     CAknPhysics* iPhysics;
       
   744     TPoint iPreviousPosition;
       
   745     TPoint iOriginalPosition;
       
   746     TBool iIsDragging;
       
   747     TBool iIsFlicking;
       
   748     TTime iStartTime;
       
   749     
       
   750     // for body editor row line drawing
       
   751     TInt iPrevDesiredHeigth;
       
   752     TInt iMessageEditorMinHeigth;
       
   753 
       
   754     // not owned contact handler pointer
       
   755     CFSEmailUiContactHandler* iContactHandler;
       
   756 
       
   757     // Descriptor for read-only quote text. Own.
       
   758     HBufC* iReadOnlyQuote;
       
   759 
       
   760     TInt iTotalComposerHeight; 
       
   761     TInt iVisibleAreaHeight;
       
   762     TInt iTotalMoveY;
       
   763     TInt iSeparatorHeight;
       
   764     TInt iHeaderHeight;
       
   765 
       
   766     /**
       
   767      * Flag for switching off text formatting.
       
   768      */
       
   769     TBool iSwitchOffFormattingText;
       
   770     
       
   771     /**
       
   772      * Currently processed field - needed by async text formatting.
       
   773      */
       
   774     CNcsEditor* iProcessedField;
       
   775     
       
   776     /**
       
   777      * Async text formatter.
       
   778      * Own.
       
   779      */
       
   780     CFSAsyncTextFormatter* iAsyncTextFormatter;
       
   781     
       
   782     /**
       
   783      * Pane rect calculated during ChangeSize.
       
   784      */
       
   785     TRect iCmailPaneRect;
       
   786     };
       
   787 
       
   788 
       
   789 #endif