uifw/EikStd/coctlsrc/EIKEDWIN.CPP
branchRCL_3
changeset 9 aabf2c525e0f
parent 4 8ca85d2f0db7
child 10 9f56a4e1b8ab
equal deleted inserted replaced
4:8ca85d2f0db7 9:aabf2c525e0f
  5628         }
  5628         }
  5629     
  5629     
  5630     TRect viewRect( AdjustedViewRect() );
  5630     TRect viewRect( AdjustedViewRect() );
  5631     const TInt formattedLines = Max(1, iLayout->NumFormattedLines());
  5631     const TInt formattedLines = Max(1, iLayout->NumFormattedLines());
  5632     const TInt formattedHeight = iLayout->FormattedHeightInPixels();    
  5632     const TInt formattedHeight = iLayout->FormattedHeightInPixels();    
       
  5633     const TBool formattedHeightchanged( formattedHeight != iEdwinExtension->iRecordFormattedHeight );
       
  5634     iEdwinExtension->iRecordFormattedHeight = formattedHeight;
  5633     const TInt viewRectHeight = viewRect.Height();
  5635     const TInt viewRectHeight = viewRect.Height();
  5634     const TInt totalChars = iText->DocumentLength();    
  5636     const TInt totalChars = iText->DocumentLength();    
  5635     const TInt formattedLength = Min( totalChars, iLayout->FormattedLength() );
  5637     const TInt formattedLength = Min( totalChars, iLayout->FormattedLength() );
  5636     const TInt topLeftDocPos=iLayout->FirstDocPosFullyInBand();
  5638     const TInt topLeftDocPos=iLayout->FirstDocPosFullyInBand();
  5637     const TInt avgCharsPerLine = iAvgCharsPerLine ? iAvgCharsPerLine : 
  5639     const TInt avgCharsPerLine = iAvgCharsPerLine ? iAvgCharsPerLine : 
  5645         if ( !iLayout->IsFormattingBand() )
  5647         if ( !iLayout->IsFormattingBand() )
  5646             {                        
  5648             {                        
  5647             aVertModel.iThumbSpan = viewRectHeight;
  5649             aVertModel.iThumbSpan = viewRectHeight;
  5648             aVertModel.iScrollSpan = formattedHeight;            
  5650             aVertModel.iScrollSpan = formattedHeight;            
  5649             aVertModel.iThumbPosition = iEdwinExtension->iThumbPos;   
  5651             aVertModel.iThumbPosition = iEdwinExtension->iThumbPos;   
  5650             if ( aVertModel.iThumbPosition == KErrNotFound )
  5652             if ( aVertModel.iThumbPosition == KErrNotFound || formattedHeightchanged )
  5651                 {
  5653                 {
  5652                 if ( bottomPos == totalChars )
  5654                 if ( bottomPos == totalChars )
  5653                     {
  5655                     {
  5654                     aVertModel.iThumbPosition = aVertModel.iScrollSpan - 
  5656                     aVertModel.iThumbPosition = aVertModel.iScrollSpan - 
  5655                         aVertModel.iThumbSpan;
  5657                         aVertModel.iThumbSpan;
  6653 
  6655 
  6654     switch (aType)
  6656     switch (aType)
  6655         {
  6657         {
  6656     case KEikDynamicLayoutVariantSwitch:
  6658     case KEikDynamicLayoutVariantSwitch:
  6657         {
  6659         {
       
  6660         if ( KineticScrollingEnabled() )
       
  6661             {
       
  6662             iEdwinExtension->iPhysicsHandler->DisableDragging();
       
  6663             }
       
  6664         
  6658         iEdwinExtension->iThumbPos = KErrNotFound;
  6665         iEdwinExtension->iThumbPos = KErrNotFound;
  6659         SizeChanged();
  6666         SizeChanged();
  6660         if ( !IsReadOnly() && !IsNonFocusing() 
  6667         if ( !IsReadOnly() && !IsNonFocusing() 
  6661                 && !( iEdwinUserFlags & EDisplayOnly ) )
  6668                 && !( iEdwinUserFlags & EDisplayOnly )
       
  6669                 && !KineticScrollingEnabled() )
  6662             {
  6670             {
  6663             TInt docPos = CursorPos();
  6671             TInt docPos = CursorPos();
  6664             TRect viewRect( AdjustedViewRect() );
  6672             TRect viewRect( AdjustedViewRect() );
  6665             TViewYPosQualifier yPosQ;
  6673             TViewYPosQualifier yPosQ;
  6666             TInt yPos = ( viewRect.iBr.iY + viewRect.iTl.iY )/2;
  6674             TInt yPos = ( viewRect.iBr.iY + viewRect.iTl.iY )/2;
  8563     	{
  8571     	{
  8564         SetAknEditorFlags( edwinState->Flags() | EAknEditorFlagSelectionVisible );
  8572         SetAknEditorFlags( edwinState->Flags() | EAknEditorFlagSelectionVisible );
  8565     	}
  8573     	}
  8566     else
  8574     else
  8567     	{
  8575     	{
       
  8576         HandleSelectionForSmiley( TCursorSelection( 0, 0 ) );
  8568     	SetAknEditorFlags( edwinState->Flags() & ~EAknEditorFlagSelectionVisible );
  8577     	SetAknEditorFlags( edwinState->Flags() & ~EAknEditorFlagSelectionVisible );
  8569     	}
  8578     	}
  8570     return;
  8579     return;
  8571     }
  8580     }
  8572 TBool CEikEdwin::IsSelectionVisible()
  8581 TBool CEikEdwin::IsSelectionVisible()