uifw/EikStd/dlgsrc/EIKDPAGE.CPP
branchRCL_3
changeset 23 3d340a0166ff
parent 16 71dd06cfe933
child 25 941195f2d488
equal deleted inserted replaced
18:0aa5fbdfbc30 23:3d340a0166ff
    97         ELineHandlerCalled
    97         ELineHandlerCalled
    98         };
    98         };
    99     static CDialogPageExtension* NewL();
    99     static CDialogPageExtension* NewL();
   100     ~CDialogPageExtension();
   100     ~CDialogPageExtension();
   101 
   101 
   102     void Feedback( CEikDialogPage* aControl, TTouchLogicalFeedback aFeedback ) const;
   102     void Feedback( const CEikDialogPage& aControl,
       
   103                    TTouchLogicalFeedback aFeedback ) const;
       
   104 
   103     /**
   105     /**
   104      * Produces vibra-only feedback. Event filtering by pointer event is used..
   106      * Produces vibra-only feedback.
       
   107      * Event filtering by pointer event is used.
   105      */
   108      */
   106     void SilentFeedback( CEikDialogPage* aDPage, 
   109     void SilentFeedback( const CEikDialogPage& aDPage, 
   107                          TTouchLogicalFeedback aFeedback, 
   110                          TTouchLogicalFeedback aFeedback, 
   108                          const TPointerEvent& aPointerEvent ) const;
   111                          const TPointerEvent& aPointerEvent ) const;
   109     
   112 
   110     void HandleFormFeedback( CEikDialogPage* aControl, const TPointerEvent& aPointerEvent, TInt aTouchedLineIndex, TInt aCurrentLine );
   113     /**
       
   114      * Produces feedback in cases where the captioned control itself
       
   115      * doesn't do it.
       
   116      */
       
   117     void HandleFormFeedback( const CEikDialogPage& aDPage,
       
   118                              const TPointerEvent& aPointerEvent,
       
   119                              TInt aTouchedLineIndex,
       
   120                              TInt aCurrentLine );
   111 
   121 
   112 protected:  
   122 protected:  
   113     void ConstructL();
   123     void ConstructL();
   114     
   124     
   115 private:
   125 private:
   139     TBool iHandlingScrollEvent;
   149     TBool iHandlingScrollEvent;
   140     CPeriodic* iHighlightTimer;
   150     CPeriodic* iHighlightTimer;
   141     TInt iLastTouchedLine;
   151     TInt iLastTouchedLine;
   142     TPoint iSynchronizedPosition;
   152     TPoint iSynchronizedPosition;
   143     TBool iScrolling;
   153     TBool iScrolling;
   144     TBool iScrolled;
       
   145     TBool iInitialLayoutDone;
   154     TBool iInitialLayoutDone;
   146     TBool iSetInitialFocusDone;
   155     TBool iSetInitialFocusDone;
   147     TBool iHandlingResourceChange;
   156     TBool iHandlingResourceChange;
   148     TInt iCapturingItem;
   157     TInt iCapturingItem;
   149     // record the center point Y value of current view when touch down an item
   158     // record the center point Y value of current view when touch down an item
   158      * Boolean used to check if application is single touch compatible.
   167      * Boolean used to check if application is single touch compatible.
   159      */
   168      */
   160     TBool iUsesSingleClick;
   169     TBool iUsesSingleClick;
   161     // It is used to distinguish if the focus item has changed.
   170     // It is used to distinguish if the focus item has changed.
   162     TBool iFocusItemChanged;
   171     TBool iFocusItemChanged;
       
   172     // Boolean to check if form was scrolling on button down
       
   173     TBool iWasScrolling;
   163     };
   174     };
   164 
   175 
   165 CDialogPageExtension::CDialogPageExtension()
   176 CDialogPageExtension::CDialogPageExtension()
   166     {
   177     {
   167     }
   178     }
   199     iHighlightTimer = CPeriodic::NewL( CActive::EPriorityStandard );
   210     iHighlightTimer = CPeriodic::NewL( CActive::EPriorityStandard );
   200     iCapturingItem = KErrNotFound;
   211     iCapturingItem = KErrNotFound;
   201     }
   212     }
   202 
   213 
   203 void CDialogPageExtension::HandleFormFeedback(
   214 void CDialogPageExtension::HandleFormFeedback(
   204     CEikDialogPage* aDPage,
   215     const CEikDialogPage& aDPage,
   205     const TPointerEvent& aPointerEvent,
   216     const TPointerEvent& aPointerEvent,
   206     TInt aTouchedLineIndex,
   217     TInt aTouchedLineIndex,
   207     TInt aCurrentLine )
   218     TInt aCurrentLine )
   208     {
   219     {
       
   220     CEikCaptionedControl* firstLine( aDPage.LineOnPageOrNull( 0 ) );
       
   221     TBool viewMode( !aDPage.IsEditable() );
       
   222     
   209     // note, that iFormControl is checked in Feedback()
   223     // note, that iFormControl is checked in Feedback()
   210     if ( aPointerEvent.iType == TPointerEvent::EButton1Down &&
   224     if ( aPointerEvent.iType == TPointerEvent::EButton1Down &&
   211         aCurrentLine != aTouchedLineIndex && aDPage->LineOnPageOrNull( 0 ) ) 
   225          aCurrentLine != aTouchedLineIndex &&
       
   226          firstLine ) 
   212         {
   227         {
   213         // feedback for edit/view mode form, when non-focused line is clicked
   228         // feedback for edit/view mode form, when non-focused line is clicked
   214         // feedback for focused item is responsibility of the item
   229         // feedback for focused item is responsibility of the item
   215         // no feedback with focus change when single click is enabled
   230         // no feedback with focus change when single click is enabled
   216         if ( !iUsesSingleClick )
   231         if ( !iUsesSingleClick )
   217             {
   232             {
   218             Feedback( aDPage, ETouchFeedbackSensitiveList );
   233             Feedback( aDPage, ETouchFeedbackSensitiveList );
   219             }
   234             }
   220         iFocusItemChanged = ETrue;
   235         iFocusItemChanged = ETrue;
   221         }
   236         }
   222 
   237     else if ( viewMode && firstLine )
   223     else if ( aPointerEvent.iType == TPointerEvent::EButton1Down &&
   238         {
   224         aTouchedLineIndex == aCurrentLine && aDPage->LineOnPageOrNull( 0 ) )
   239         if ( aPointerEvent.iType == TPointerEvent::EButton1Down &&
   225         {
   240              aTouchedLineIndex == aCurrentLine )
   226         // Feedback for view mode form, when focused item is
   241             {
   227         // clicked. Basically same case as for msk simulation later on
   242             // Feedback for view mode form, when focused item is
   228         // the function, but on pointer
   243             // clicked. Basically same case as for msk simulation later on
   229         // down. iExtension->iFocusedClicked is not valid here, since
   244             // the function, but on pointer
   230         // it can't be known in this phase whether user drags pointer
   245             // down. iExtension->iFocusedClicked is not valid here, since
   231         // away.
   246             // it can't be known in this phase whether user drags pointer
   232         Feedback( aDPage, ETouchFeedbackList );
   247             // away.
   233         iFocusItemChanged = EFalse;
   248             Feedback( aDPage, ETouchFeedbackList );
   234         }
   249             iFocusItemChanged = EFalse;
   235 
   250             }
   236     else if ( aPointerEvent.iType == TPointerEvent::EButton1Up &&
   251         else if ( aPointerEvent.iType == TPointerEvent::EButton1Up )
   237             aDPage->LineOnPageOrNull( 0 ) )
   252             {
   238         {// when focus changed, it should not send feedback on up event.
   253             // When focus changed, it should not send feedback on up event.
   239         //when up event comes, aTouchedLineIndex always equal to aCurrentLine
   254             // When up event comes, aTouchedLineIndex always equal to
   240         if ( !iFocusItemChanged )
   255             // aCurrentLine.
   241             {
   256             if ( !iFocusItemChanged )
   242             SilentFeedback( aDPage, ETouchFeedbackList, aPointerEvent );
   257                 {
   243             }
   258                 SilentFeedback( aDPage, ETouchFeedbackList, aPointerEvent );
   244         }
   259                 }
   245     }
   260             }
   246 
   261         }
   247 void CDialogPageExtension::Feedback( CEikDialogPage* aDPage, 
   262     }
       
   263 
       
   264 
       
   265 void CDialogPageExtension::Feedback( const CEikDialogPage& aDPage, 
   248                                      TTouchLogicalFeedback aFeedback ) const
   266                                      TTouchLogicalFeedback aFeedback ) const
   249     {
   267     {
   250     if ( aDPage
   268     if ( iFeedback &&
   251         && aDPage->IsForm()
   269          aDPage.IsForm() &&
   252         && iFeedback
   270          !aDPage.IsDimmed() &&
   253         && !aDPage->IsDimmed()
   271          aDPage.IsVisible() && 
   254         && aDPage->IsVisible() )
   272          aDPage.IsEditable() )
   255         {
   273         {
   256         iFeedback->InstantFeedback( aFeedback );
   274         iFeedback->InstantFeedback( aFeedback );
   257         }
   275         }
   258     }
   276     }
   259 
   277 
   260 void CDialogPageExtension::SilentFeedback( CEikDialogPage* aDPage, 
   278 
   261                                            TTouchLogicalFeedback aFeedback, 
   279 void CDialogPageExtension::SilentFeedback(
   262                                            const TPointerEvent& aPointerEvent ) const
   280     const CEikDialogPage& aDPage,
   263     {
   281     TTouchLogicalFeedback aFeedback,
   264     if ( aDPage
   282     const TPointerEvent& aPointerEvent ) const
   265         && aDPage->IsForm()
   283     {
   266         && iFeedback
   284     if ( iFeedback &&
   267         && !aDPage->IsDimmed()
   285          aDPage.IsForm() &&
   268         && aDPage->IsVisible() )
   286          !aDPage.IsDimmed() &&
   269         {
   287          aDPage.IsVisible() &&
   270         iFeedback->InstantFeedback( aDPage, aFeedback, ETouchFeedbackVibra, aPointerEvent );
   288          aDPage.IsEditable() )
   271         }
   289         {
   272     }
   290         iFeedback->InstantFeedback( &aDPage,
       
   291                                     aFeedback,
       
   292                                     ETouchFeedbackVibra,
       
   293                                     aPointerEvent );
       
   294         }
       
   295     }
       
   296 
   273 
   297 
   274 class CAknPaneScroll : public CBase
   298 class CAknPaneScroll : public CBase
   275 {
   299 {
   276 public:
   300 public:
   277     enum TScrollChangeType
   301     enum TScrollChangeType
   844             iExtension->iFocusedClicked = ETrue;
   868             iExtension->iFocusedClicked = ETrue;
   845             
   869             
   846             switch (aFocusNavigationMode)
   870             switch (aFocusNavigationMode)
   847                 {
   871                 {
   848                 case ECyclic:
   872                 case ECyclic:
   849                     iExtension->iScrolled = ETrue;                    
       
   850                     response=HandleCyclicFocusNavigationKeyL(aKeyEvent);
   873                     response=HandleCyclicFocusNavigationKeyL(aKeyEvent);
   851                     break;
   874                     break;
   852                     
   875                     
   853                 case ENonCyclic:
   876                 case ENonCyclic:
   854                     iExtension->iScrolled = ETrue;                    
       
   855                     response=HandleNonCyclicFocusNavigationKeyL(aKeyEvent);
   877                     response=HandleNonCyclicFocusNavigationKeyL(aKeyEvent);
   856                     break;
   878                     break;
   857                     
   879                     
   858                 default:
   880                 default:
   859                     break;
   881                     break;
  1067         }
  1089         }
  1068     
  1090     
  1069     TInt oldLine = iCurrentLine;
  1091     TInt oldLine = iCurrentLine;
  1070     
  1092     
  1071     if( aLine != iCurrentLine )
  1093     if( aLine != iCurrentLine )
  1072         (*iLines)[iCurrentLine]->ScrollBackEditor();
  1094         (*iLines)[iCurrentLine]->ScrollBackEditorL();
  1073     
  1095     
  1074     ChangeFocusTo( aLine );
  1096     ChangeFocusTo( aLine );
  1075     ExposeLine( iCurrentLine, EFalse );
  1097     ExposeLine( iCurrentLine, EFalse );
  1076 
  1098 
  1077     if ( oldLine != iCurrentLine )
  1099     if ( oldLine != iCurrentLine )
  1880     switch (aEventType)
  1902     switch (aEventType)
  1881         {
  1903         {
  1882         case EEikScrollPageUp:
  1904         case EEikScrollPageUp:
  1883         case EEikScrollPageDown:
  1905         case EEikScrollPageDown:
  1884         case EEikScrollThumbDragVert:
  1906         case EEikScrollThumbDragVert:
  1885             iExtension->iScrolled = ETrue;
       
  1886             iExtension->iScrolling = ETrue;
  1907             iExtension->iScrolling = ETrue;
  1887             iLines->MoveLineToScreen( iCurrentLine, 0, EFalse );
  1908             iLines->MoveLineToScreen( iCurrentLine, 0, EFalse );
  1888             break;
  1909             break;
  1889 
  1910 
  1890         default:
  1911         default:
  2112     		&& theNewLine->iIsEditable )
  2133     		&& theNewLine->iIsEditable )
  2113     	{
  2134     	{
  2114         CEikEdwin* edwinPtr = STATIC_CAST( CEikEdwin*, theNewLine->iControl );
  2135         CEikEdwin* edwinPtr = STATIC_CAST( CEikEdwin*, theNewLine->iControl );
  2115         if( edwinPtr->Text() )
  2136         if( edwinPtr->Text() )
  2116         	{
  2137         	{
  2117             edwinPtr->SetCursorPosL( edwinPtr->TextLength(), EFalse );       
  2138             TRAP_IGNORE( edwinPtr->SetCursorPosL( edwinPtr->TextLength(), EFalse ) );       
  2118         	}
  2139         	}
  2119     	}
  2140     	}
  2120 
  2141 
  2121     ShowFocus( EFalse, EFalse );
  2142     ShowFocus( EFalse, EFalse );
  2122     iCurrentLine=aLineIndex;
  2143     iCurrentLine=aLineIndex;
  2126             iExtension->iInitialLayoutDone )
  2147             iExtension->iInitialLayoutDone )
  2127         {
  2148         {
  2128         if ( oldLine != -1 )
  2149         if ( oldLine != -1 )
  2129             {
  2150             {
  2130             iLines->MoveLineToScreen( oldLine, 0, EFalse );
  2151             iLines->MoveLineToScreen( oldLine, 0, EFalse );
  2131             RecordLineL( oldLine );
  2152             TRAP_IGNORE( RecordLineL( oldLine ) );
  2132             }
  2153             }
  2133 
  2154 
  2134 		RecordLineL( iCurrentLine );
  2155 		TRAP_IGNORE( RecordLineL( iCurrentLine ) );
  2135 		iLines->MoveLineToScreen( iCurrentLine, iPhysics->ViewTopY(), ETrue );
  2156 		iLines->MoveLineToScreen( iCurrentLine, iPhysics->ViewTopY(), ETrue );
  2136 		}
  2157 		}
  2137     _AKNTRACE_FUNC_EXIT;
  2158     _AKNTRACE_FUNC_EXIT;
  2138     }
  2159     }
  2139 
  2160 
  2843                 {
  2864                 {
  2844                 iExtension->iTopItem = iLines->Count();
  2865                 iExtension->iTopItem = iLines->Count();
  2845                 }
  2866                 }
  2846             }
  2867             }
  2847         iExtension->iScrolling = EFalse;
  2868         iExtension->iScrolling = EFalse;
  2848         iExtension->HandleFormFeedback( this, aPointerEvent, touchedLine, iCurrentLine );
  2869         iExtension->HandleFormFeedback( *this,
       
  2870                                         aPointerEvent,
       
  2871                                         touchedLine,
       
  2872                                         iCurrentLine );
  2849         
  2873         
  2850         TBool wasScrolling = ( iPhysics->OngoingPhysicsAction() != 
  2874         iExtension->iWasScrolling = ( iPhysics->OngoingPhysicsAction() != 
  2851             CAknPhysics::EAknPhysicsActionNone );
  2875         CAknPhysics::EAknPhysicsActionNone ); 
  2852         iPhysics->Stop();
  2876         iPhysics->Stop();
  2853         iExtension->iLastTouchedLine = touchedLine;
  2877         iExtension->iLastTouchedLine = touchedLine;
  2854         iExtension->iDragStartPosition = aPointerEvent.iPosition;
  2878         iExtension->iDragStartPosition = aPointerEvent.iPosition;
  2855         iExtension->iLastPointerPos = aPointerEvent.iPosition;
  2879         iExtension->iLastPointerPos = aPointerEvent.iPosition;
  2856         iExtension->iStartTime.HomeTime();
  2880         iExtension->iStartTime.HomeTime();
  2859             {
  2883             {
  2860             iExtension->iFocusedClicked = EFalse;
  2884             iExtension->iFocusedClicked = EFalse;
  2861 
  2885 
  2862             if ( iExtension->iUsesSingleClick )
  2886             if ( iExtension->iUsesSingleClick )
  2863                 {
  2887                 {
  2864                 if ( !wasScrolling )
  2888                 if ( !iExtension->iWasScrolling )
  2865                     {
  2889                     {
  2866                     HighlightVisible( ETrue );
  2890                     if ( iFormFlags & EEikFormDisableHighlightInViewMode )
  2867                     HighlightTimerCallBack( this );
  2891                         {
       
  2892                         HighlightVisible( EFalse );
       
  2893                         }                
       
  2894                     else
       
  2895                         {
       
  2896                         HighlightVisible( ETrue );
       
  2897                         HighlightTimerCallBack( this );
       
  2898                         }
  2868                     }
  2899                     }
  2869                 }
  2900                 }
  2870             else
  2901             else
  2871                 {
  2902                 {
  2872                 iExtension->iHighlightTimer->Cancel();
  2903                 iExtension->iHighlightTimer->Cancel();
  2916                         ShowFocus( EFalse, ETrue );
  2947                         ShowFocus( EFalse, ETrue );
  2917                         }
  2948                         }
  2918                     }
  2949                     }
  2919 
  2950 
  2920                 iExtension->iScrolling = ETrue;
  2951                 iExtension->iScrolling = ETrue;
  2921                 iExtension->iScrolled = ETrue;
       
  2922                 iExtension->iLastPointerPos = aPointerEvent.iPosition;
  2952                 iExtension->iLastPointerPos = aPointerEvent.iPosition;
  2923                 RemovePressedDownHighlight();
  2953                 RemovePressedDownHighlight();
  2924                 iLines->MoveLineToScreen( iCurrentLine, 0, EFalse );
  2954                 iLines->MoveLineToScreen( iCurrentLine, 0, EFalse );
  2925                 callDefaultImplementation = EFalse;
  2955                 callDefaultImplementation = EFalse;
  2926                 }
  2956                 }
  2941             }
  2971             }
  2942         }                                
  2972         }                                
  2943     
  2973     
  2944     if ( aPointerEvent.iType == TPointerEvent::EButton1Up )
  2974     if ( aPointerEvent.iType == TPointerEvent::EButton1Up )
  2945         {
  2975         {
  2946     _AKNTRACE( "TPointerEvent::EButton1Up" );
  2976         _AKNTRACE( "TPointerEvent::EButton1Up" );
  2947         iExtension->HandleFormFeedback( this, aPointerEvent, touchedLine, iCurrentLine );
  2977         iExtension->HandleFormFeedback( *this,
       
  2978                                         aPointerEvent,
       
  2979                                         touchedLine,
       
  2980                                         iCurrentLine );
  2948         if ( !IsEditable() && iExtension->iUsesSingleClick && 
  2981         if ( !IsEditable() && iExtension->iUsesSingleClick && 
  2949              HighlightVisible() )
  2982              HighlightVisible() )
  2950             {
  2983             {
  2951             HighlightVisible( EFalse );
  2984             HighlightVisible( EFalse );
  2952             
  2985             
  2964             {
  2997             {
  2965             if ( !iPhysics->StartFlick( drag, iExtension->iStartTime ) )
  2998             if ( !iPhysics->StartFlick( drag, iExtension->iStartTime ) )
  2966                 {
  2999                 {
  2967                 iExtension->iScrolling = EFalse;
  3000                 iExtension->iScrolling = EFalse;
  2968                 
  3001                 
  2969                 if ( iPageObserver && GrabbingComponent() )
  3002                 if ( iPageObserver && GrabbingComponent() && !iExtension->iWasScrolling )
  2970                     {
  3003                     {
  2971                     iPageObserver->HandleDialogPageEventL( MEikDialogPageObserver::EDialogPageTapped );
  3004                     iPageObserver->HandleDialogPageEventL( MEikDialogPageObserver::EDialogPageTapped );
  2972                     }
  3005                     }
  2973                 }
  3006                 }
  2974             else 
  3007             else 
  2977                 
  3010                 
  2978                 if ( !iExtension->iScrolling )
  3011                 if ( !iExtension->iScrolling )
  2979                     {
  3012                     {
  2980                     // feedback is given every time when new item 
  3013                     // feedback is given every time when new item 
  2981                     // appears to the screen -> follows the visual feedback
  3014                     // appears to the screen -> follows the visual feedback
  2982                     iExtension->SilentFeedback( this, ETouchFeedbackSensitiveList, aPointerEvent );
  3015                     iExtension->SilentFeedback( *this,
       
  3016                                                 ETouchFeedbackSensitiveList,
       
  3017                                                 aPointerEvent );
       
  3018 
  2983                     // It might happen that there are no drag events between down and
  3019                     // It might happen that there are no drag events between down and
  2984                     // up if the distance is short enough.
  3020                     // up if the distance is short enough.
  2985                     iExtension->iHighlightTimer->Cancel();
  3021                     iExtension->iHighlightTimer->Cancel();
  2986                     iExtension->iScrolling = ETrue;
  3022                     iExtension->iScrolling = ETrue;
  2987                     iExtension->iScrolled = ETrue;
       
  2988                     iLines->MoveLineToScreen( iCurrentLine, 0, EFalse );
  3023                     iLines->MoveLineToScreen( iCurrentLine, 0, EFalse );
  2989                     RemovePressedDownHighlight();
  3024                     RemovePressedDownHighlight();
  2990                     }
  3025                     }
  2991                 }
  3026                 }
  2992             }
  3027             }
  3018         !iExtension->iScrolling )
  3053         !iExtension->iScrolling )
  3019         {
  3054         {
  3020         mskPress = ETrue;
  3055         mskPress = ETrue;
  3021         callDefaultImplementation = EFalse;
  3056         callDefaultImplementation = EFalse;
  3022         }
  3057         }
  3023     
       
  3024     if ( callDefaultImplementation && ( iExtension->iFocusedClicked || 
  3058     if ( callDefaultImplementation && ( iExtension->iFocusedClicked || 
  3025             iExtension->iUsesSingleClick ) && newLine )
  3059             iExtension->iUsesSingleClick ) && newLine && 
       
  3060             !iExtension->iWasScrolling )
  3026         {
  3061         {
  3027         if ( newLine->ControlIsAPopfield( controlType ) )
  3062         if ( newLine->ControlIsAPopfield( controlType ) )
  3028             {
  3063             {
  3029             if(aPointerEvent.iType == TPointerEvent::EButton1Down)
  3064             if(aPointerEvent.iType == TPointerEvent::EButton1Down)
  3030                 {
  3065                 {
  3046         {
  3081         {
  3047         TKeyEvent key;
  3082         TKeyEvent key;
  3048         key.iCode=EKeyOK;
  3083         key.iCode=EKeyOK;
  3049         key.iModifiers=0;
  3084         key.iModifiers=0;
  3050         key.iRepeats = 0;
  3085         key.iRepeats = 0;
  3051         CEikonEnv::Static()->SimulateKeyEventL( key, EEventKey );
  3086         iEikonEnv->SimulateKeyEventL( key, EEventKey );
  3052         }
  3087         }
  3053     _AKNTRACE_FUNC_EXIT;
  3088     _AKNTRACE_FUNC_EXIT;
  3054     }
  3089     }
  3055 
  3090 
  3056 
  3091 
  3119         {
  3154         {
  3120         (*iLines)[touchedLine]->ActivateL();
  3155         (*iLines)[touchedLine]->ActivateL();
  3121         
  3156         
  3122         if ( LineIsFocusable( touchedLine ) )
  3157         if ( LineIsFocusable( touchedLine ) )
  3123             {
  3158             {
  3124             TRAP_IGNORE( PrepareForFocusTransitionL() );
  3159             TRAP_IGNORE( PrepareForFocusTransitionL();
  3125             ChangeFocusToAndExposeL( touchedLine );
  3160                          ChangeFocusToAndExposeL( touchedLine );
  3126             LineChangedL( (*iLines)[touchedLine]->iId );
  3161                          LineChangedL( (*iLines)[touchedLine]->iId );
       
  3162                        );
  3127             }
  3163             }
  3128         }
  3164         }
  3129     }
  3165     }
  3130 
  3166 
  3131 
  3167 
  3185         {
  3221         {
  3186         if ( upperItem != iExtension->iTopItem || bottomItem != iExtension->iBottomItem )
  3222         if ( upperItem != iExtension->iTopItem || bottomItem != iExtension->iBottomItem )
  3187             {
  3223             {
  3188             if( iPhysics->OngoingPhysicsAction() == CAknPhysics::EAknPhysicsActionDragging )
  3224             if( iPhysics->OngoingPhysicsAction() == CAknPhysics::EAknPhysicsActionDragging )
  3189                 {
  3225                 {
  3190                 iExtension->Feedback( this, ETouchFeedbackSensitiveList );
  3226                 iExtension->Feedback( *this, ETouchFeedbackSensitiveList );
  3191                 }
  3227                 }
  3192             else if( iPhysics->OngoingPhysicsAction() == CAknPhysics::EAknPhysicsActionFlicking)
  3228             else if( iPhysics->OngoingPhysicsAction() == CAknPhysics::EAknPhysicsActionFlicking )
  3193                 {
  3229                 {
  3194                 iExtension->SilentFeedback( this, ETouchFeedbackSensitiveList, TPointerEvent() );
  3230                 iExtension->SilentFeedback( *this, ETouchFeedbackSensitiveList, TPointerEvent() );
       
  3231                 }
       
  3232             else if( iPhysics->OngoingPhysicsAction() == CAknPhysics::EAknPhysicsActionBouncing )
       
  3233                 {
       
  3234                 iExtension->SilentFeedback( *this, ETouchFeedbackSensitiveList, TPointerEvent() );
  3195                 }
  3235                 }
  3196             }
  3236             }
  3197         }
  3237         }
  3198     else if ( upperItem >= 0 || bottomItem < iLines->Count() )
  3238     else if ( upperItem >= 0 || bottomItem < iLines->Count() )
  3199         {
  3239         {
  3200         if ( upperItem < iExtension->iTopItem || bottomItem > iExtension->iBottomItem )
  3240         if ( upperItem < iExtension->iTopItem || bottomItem > iExtension->iBottomItem )
  3201             {
  3241             {
  3202             if( iPhysics->OngoingPhysicsAction() == CAknPhysics::EAknPhysicsActionDragging )
  3242             if( iPhysics->OngoingPhysicsAction() == CAknPhysics::EAknPhysicsActionDragging )
  3203                 {
  3243                 {
  3204                 iExtension->Feedback( this, ETouchFeedbackSensitiveList );
  3244                 iExtension->Feedback( *this, ETouchFeedbackSensitiveList );
  3205                 }
  3245                 }
  3206             else if( iPhysics->OngoingPhysicsAction() == CAknPhysics::EAknPhysicsActionFlicking)
  3246             else if( iPhysics->OngoingPhysicsAction() == CAknPhysics::EAknPhysicsActionFlicking )
  3207                 {
  3247                 {
  3208                 iExtension->SilentFeedback( this, ETouchFeedbackSensitiveList, TPointerEvent() );
  3248                 iExtension->SilentFeedback( *this, ETouchFeedbackSensitiveList, TPointerEvent() );
       
  3249                 }
       
  3250             else if( iPhysics->OngoingPhysicsAction() == CAknPhysics::EAknPhysicsActionBouncing )
       
  3251                 {
       
  3252                 iExtension->SilentFeedback( *this, ETouchFeedbackSensitiveList, TPointerEvent() );
  3209                 }
  3253                 }
  3210             }
  3254             }
  3211         }
  3255         }
  3212     iExtension->iBottomItem = bottomItem;
  3256     iExtension->iBottomItem = bottomItem;
  3213     iExtension->iTopItem = upperItem;
  3257     iExtension->iTopItem = upperItem;
  3373         if ( currentLine && currentLine->PressedDownState() )
  3417         if ( currentLine && currentLine->PressedDownState() )
  3374             {
  3418             {
  3375             currentLine->SetPressedDownState( EFalse );
  3419             currentLine->SetPressedDownState( EFalse );
  3376             if ( IsForm() )
  3420             if ( IsForm() )
  3377                 {
  3421                 {
  3378                 RecordLineL( iCurrentLine );
  3422                 TRAP_IGNORE( RecordLineL( iCurrentLine ) );
  3379                 }
  3423                 }
  3380             }
  3424             }
  3381         }
  3425         }
  3382     }
  3426     }
  3383 
  3427 
  3647     if ( PageContainer()->PageSelector()->Dialg()->Extension()->iPublicFlags.IsSet( CEikDialogExtension::EUseVirtualInput ) )
  3691     if ( PageContainer()->PageSelector()->Dialg()->Extension()->iPublicFlags.IsSet( CEikDialogExtension::EUseVirtualInput ) )
  3648         {
  3692         {
  3649         clear = ETrue;
  3693         clear = ETrue;
  3650         }
  3694         }
  3651         
  3695         
  3652     if ( focusItem || iExtension->iFocusedClicked)
  3696     if ( focusItem || iExtension->iFocusedClicked )
  3653         {
  3697         {
  3654         iExtension->HandleFormFeedback( this, aPointerEvent, touchedLineIndex, iCurrentLine );
  3698         iExtension->HandleFormFeedback( *this,
       
  3699                                         aPointerEvent,
       
  3700                                         touchedLineIndex,
       
  3701                                         iCurrentLine );
  3655         }
  3702         }
  3656                 
  3703                 
  3657     if ( focusItem )
  3704     if ( focusItem )
  3658         {
  3705         {
  3659         PrepareForFocusTransitionL();
  3706         PrepareForFocusTransitionL();
  3660         
  3707         
  3661         (*iLines)[iCurrentLine]->ScrollBackEditor();
  3708         (*iLines)[iCurrentLine]->ScrollBackEditorL();
  3662         ShowFocus( EFalse, EFalse );
  3709         ShowFocus( EFalse, EFalse );
  3663         iCurrentLine = touchedLineIndex;
  3710         iCurrentLine = touchedLineIndex;
  3664         ShowFocus( ETrue, EFalse );        
  3711         ShowFocus( ETrue, EFalse );        
  3665         ExposeLine( iCurrentLine, EFalse );
  3712         ExposeLine( iCurrentLine, EFalse );
  3666         LineChangedL((*iLines)[touchedLineIndex]->iId);
  3713         LineChangedL((*iLines)[touchedLineIndex]->iId);
  3675         {
  3722         {
  3676         TKeyEvent key;
  3723         TKeyEvent key;
  3677         key.iCode=EKeyOK;
  3724         key.iCode=EKeyOK;
  3678         key.iModifiers=0;
  3725         key.iModifiers=0;
  3679         key.iRepeats = 0;
  3726         key.iRepeats = 0;
  3680         CEikonEnv::Static()->SimulateKeyEventL(key, EEventKey);
  3727         iEikonEnv->SimulateKeyEventL(key, EEventKey);
  3681         // SimulateKeyEventL has to be last, because it can
  3728         // SimulateKeyEventL has to be last, because it can
  3682         // possibly delete the dialog.. Must not do anything
  3729         // possibly delete the dialog.. Must not do anything
  3683         // to the dialog after the call.
  3730         // to the dialog after the call.
  3684         }
  3731         }
  3685 
  3732