uifw/EikStd/coctlsrc/EIKEDWIN.CPP
branchRCL_3
changeset 16 71dd06cfe933
parent 15 08e69e956a8c
child 18 0aa5fbdfbc30
equal deleted inserted replaced
15:08e69e956a8c 16:71dd06cfe933
   518     iPositionOfInlineTextInDocument=selection.LowerPos();
   518     iPositionOfInlineTextInDocument=selection.LowerPos();
   519     iPointerEventHandlerDuringInlineEdit=&aPointerEventHandlerDuringInlineEdit;
   519     iPointerEventHandlerDuringInlineEdit=&aPointerEventHandlerDuringInlineEdit;
   520     TBool paragraphContainingStartPositionOfInlineTextHasChangedFormat=EFalse;
   520     TBool paragraphContainingStartPositionOfInlineTextHasChangedFormat=EFalse;
   521     TInt numberOfCharactersSuccessfullyDeleted=0;
   521     TInt numberOfCharactersSuccessfullyDeleted=0;
   522     TInt numberOfCharactersSuccessfullyInserted=0;
   522     TInt numberOfCharactersSuccessfullyInserted=0;
       
   523     
       
   524     iEdwin.ConvertSmileyForDeleteL( selection );
       
   525     
   523     // handle extended highlights
   526     // handle extended highlights
   524 
   527 
   525 /* 
   528 /* 
   526 WARNING.  do not insert any leaving function calls after the iEdwin.iText->StartFepInlineEditL unless they are trapped
   529 WARNING.  do not insert any leaving function calls after the iEdwin.iText->StartFepInlineEditL unless they are trapped
   527 as this will call update-state problems.
   530 as this will call update-state problems.
   631     return iEdwin.iTextLimit;
   634     return iEdwin.iTextLimit;
   632     }
   635     }
   633 
   636 
   634 void CEikEdwinFepSupport::SetCursorSelectionForFepL(const TCursorSelection& aCursorSelection)
   637 void CEikEdwinFepSupport::SetCursorSelectionForFepL(const TCursorSelection& aCursorSelection)
   635     {
   638     {
   636     TInt cursorPos( aCursorSelection.iCursorPos );
   639     TCursorSelection select( aCursorSelection.iCursorPos, aCursorSelection.iAnchorPos );
   637     TInt anchorPos( aCursorSelection.iAnchorPos );
   640     iEdwin.HandleSelectionForSmiley( select );
   638     if ( iEdwin.IsSmileyEnabled() )
   641     iEdwin.iTextView->SetSelectionL( select );
   639         {  
       
   640         CSmileyManager* smiley( iEdwin.iEdwinExtension->iSmiley );
       
   641         TInt oldPos = ( cursorPos == anchorPos ) ? iEdwin.CursorPos() : anchorPos; 
       
   642         smiley->HandleSetCursor( oldPos, cursorPos );       
       
   643         if ( aCursorSelection.iCursorPos == aCursorSelection.iAnchorPos )
       
   644             {
       
   645             anchorPos = cursorPos;
       
   646             }
       
   647         else
       
   648             {
       
   649             smiley->HandleSetCursor( cursorPos, anchorPos );
       
   650             }
       
   651         }
       
   652 	iEdwin.SetSelectionL( cursorPos, anchorPos );
       
   653     iEdwin.ReportEdwinEventL(MEikEdwinObserver::EEventNavigation);
   642     iEdwin.ReportEdwinEventL(MEikEdwinObserver::EEventNavigation);
   654     }
   643     }
   655 
   644 
   656 void CEikEdwinFepSupport::GetCursorSelectionForFep(TCursorSelection& aCursorSelection) const
   645 void CEikEdwinFepSupport::GetCursorSelectionForFep(TCursorSelection& aCursorSelection) const
   657     {
   646     {
  2499     if ( iEdwinUserFlags & EDisplayOnly )
  2488     if ( iEdwinUserFlags & EDisplayOnly )
  2500         {
  2489         {
  2501         return;
  2490         return;
  2502         }
  2491         }
  2503     
  2492     
       
  2493     // If text selection is not visible, don't allow user to select any text
       
  2494     // or scroll during selection ( if kinetic scrolling enabled ).
       
  2495     if ( kineticScrollingEnabled && iEdwinFepSupport )
       
  2496         {
       
  2497         CAknEdwinState* edwinState( EditorState() );
       
  2498         if ( edwinState && !( edwinState->Flags() & EAknEditorFlagSelectionVisible ) )
       
  2499             {
       
  2500             return;
       
  2501             }
       
  2502         }
       
  2503     
  2504     const TCursorSelection selection( iTextView->Selection() );
  2504     const TCursorSelection selection( iTextView->Selection() );
  2505     const TPoint pointerPos( aPointerEvent.iPosition );
  2505     const TPoint pointerPos( aPointerEvent.iPosition );
  2506     
  2506     
  2507     // Kinetic scrolling not enabled
  2507     // Kinetic scrolling not enabled
  2508     if ( !kineticScrollingEnabled )
  2508     if ( !kineticScrollingEnabled )
  2674             iLastPointerDocPos=newCursorPos;
  2674             iLastPointerDocPos=newCursorPos;
  2675             iLastPointerAnchorPos=newAnchorPos;
  2675             iLastPointerAnchorPos=newAnchorPos;
  2676             iEdwinInternalFlags&=(~ELeftDownInViewRect);
  2676             iEdwinInternalFlags&=(~ELeftDownInViewRect);
  2677 
  2677 
  2678             // We can't open cut-copy-paste menu if dragging started
  2678             // We can't open cut-copy-paste menu if dragging started
  2679             if ( IsReadOnly() && IsSelectionVisible() && !( kineticScrollingEnabled
  2679             if ( IsReadOnly() && IsSelectionVisible() && !( iEdwinUserFlags&ENoAutoSelection ) && !( kineticScrollingEnabled
  2680                 && iEdwinExtension->iPhysicsHandler->DraggingStarted() ) )
  2680                 && iEdwinExtension->iPhysicsHandler->DraggingStarted() ) )
  2681                 {
  2681                 {
  2682                 iEdwinFepSupport->iFeedback->InstantFeedback(
  2682                 iEdwinFepSupport->iFeedback->InstantFeedback(
  2683                                                          this,
  2683                                                          this,
  2684                                                          ETouchFeedbackPopUp,
  2684                                                          ETouchFeedbackPopUp,