meetingrequest/mrgui/mrfieldbuilderplugin/src/cesmrviewerlocationfield.cpp
branchRCL_3
changeset 13 8592a65ad3fb
parent 12 4ce476e64c59
child 14 b13141f05c3d
equal deleted inserted replaced
12:4ce476e64c59 13:8592a65ad3fb
   132     		{
   132     		{
   133     		iWaypointIcon =
   133     		iWaypointIcon =
   134     		CMRImage::NewL( NMRBitmapManager::EMRBitmapLocationWaypoint, ETrue );
   134     		CMRImage::NewL( NMRBitmapManager::EMRBitmapLocationWaypoint, ETrue );
   135     		iWaypointIcon->SetParent( this );
   135     		iWaypointIcon->SetParent( this );
   136     		}
   136     		}
   137     	}    
   137     	}
   138     }
   138     }
   139 
   139 
   140 // ---------------------------------------------------------------------------
   140 // ---------------------------------------------------------------------------
   141 // CESMRViewerLocationField::OfferKeyEventL()
   141 // CESMRViewerLocationField::OfferKeyEventL()
   142 // ---------------------------------------------------------------------------
   142 // ---------------------------------------------------------------------------
   391     TRect bgRect( viewerRect );
   391     TRect bgRect( viewerRect );
   392 
   392 
   393     // Move focus rect so that it's relative to field's position.
   393     // Move focus rect so that it's relative to field's position.
   394     bgRect.Move( -Position() );
   394     bgRect.Move( -Position() );
   395     SetFocusRect( bgRect );
   395     SetFocusRect( bgRect );
   396     
   396 
   397     // Failures are ignored.
   397     // Failures are ignored.
   398     TRAP_IGNORE(
   398     TRAP_IGNORE(
   399     		// Try setting font
   399     		// Try setting font
   400     		iRichTextViewer->SetFontL( viewerLayoutText.Font() );
   400     		iRichTextViewer->SetFontL( viewerLayoutText.Font() );
   401     		// Try applying changes
   401     		// Try applying changes
   426     {
   426     {
   427     if ( !iRichTextViewer->LinkSelectedL() )
   427     if ( !iRichTextViewer->LinkSelectedL() )
   428         {
   428         {
   429         HandleTapEventL( aPosition );
   429         HandleTapEventL( aPosition );
   430         }
   430         }
   431     else
       
   432         {
       
   433         // Reset action menu after link selection
       
   434         iRichTextViewer->ResetActionMenuL();
       
   435         }
       
   436     }
   431     }
   437 
   432 
   438 // ---------------------------------------------------------------------------
   433 // ---------------------------------------------------------------------------
   439 // CESMRViewerLocationField::DynInitMenuPaneL
   434 // CESMRViewerLocationField::DynInitMenuPaneL
   440 // ---------------------------------------------------------------------------
   435 // ---------------------------------------------------------------------------
   477 	FUNC_LOG;
   472 	FUNC_LOG;
   478 	if( IsLocked() )
   473 	if( IsLocked() )
   479 		{
   474 		{
   480 		return;
   475 		return;
   481 		}
   476 		}
   482 	
   477 
   483 	CESMRField::LockL();
   478 	CESMRField::LockL();
   484 
   479 
   485 	delete iWaypointIcon;
   480 	delete iWaypointIcon;
   486 	iWaypointIcon = NULL;
   481 	iWaypointIcon = NULL;
   487 	iWaypointIcon = CMRImage::NewL( NMRBitmapManager::EMRBitmapLockField, ETrue );
   482 	iWaypointIcon = CMRImage::NewL( NMRBitmapManager::EMRBitmapLockField, ETrue );
   488 
   483 
   489 	iWaypointIcon->SetParent( this );
   484 	iWaypointIcon->SetParent( this );
   490 	iWaypointIcon->SetObserver( this );	 
   485 	iWaypointIcon->SetObserver( this );
   491 	}
   486 	}
   492 
   487 
   493 // ---------------------------------------------------------------------------
   488 // ---------------------------------------------------------------------------
   494 // CESMRViewerLocationField::GetCursorLineVerticalPos
   489 // CESMRViewerLocationField::GetCursorLineVerticalPos
   495 // ---------------------------------------------------------------------------
   490 // ---------------------------------------------------------------------------
   522             case EEventRequestFocus:
   517             case EEventRequestFocus:
   523                 {
   518                 {
   524                 // Clear viewer selection
   519                 // Clear viewer selection
   525                 iRichTextViewer->ClearSelectionL();
   520                 iRichTextViewer->ClearSelectionL();
   526                 iRichTextViewer->DrawDeferred();
   521                 iRichTextViewer->DrawDeferred();
   527         		
   522                 iRichTextViewer->ResetActionMenuL();
       
   523 
   528                 // Show context menu
   524                 // Show context menu
   529                 HandleTactileFeedbackL();
   525                 HandleTactileFeedbackL();
   530                 NotifyEventL( EAknSoftkeyContextOptions );
   526                 NotifyEventL( EAknSoftkeyContextOptions );
   531                 }
   527                 }
   532 
   528