404 iRichTextViewer->ApplyLayoutChangesL(); |
391 iRichTextViewer->ApplyLayoutChangesL(); |
405 ); |
392 ); |
406 |
393 |
407 if ( iRichTextViewer->Size().iWidth != richTextViewerWidth ) |
394 if ( iRichTextViewer->Size().iWidth != richTextViewerWidth ) |
408 { |
395 { |
409 // Most of this case is screen orientation, in this case we need to |
396 // Most of this case is screen orientation, in this case we need to |
410 // Record the index of focusing link, after updating link array, then |
397 // Record the index of focusing link, after updating link array, then |
411 // reset the focusing to original one. |
398 // reset the focusing to original one. |
412 TInt focusingIndex = iRichTextViewer->GetFocusLink(); |
399 TInt focusingIndex = iRichTextViewer->GetFocusLink(); |
413 if ( KErrNotFound != focusingIndex ) |
400 if ( KErrNotFound != focusingIndex ) |
414 { |
401 { |
415 iRichTextViewer->SetFocusLink( focusingIndex ); |
402 iRichTextViewer->SetFocusLink( focusingIndex ); |
416 //wake up current contact menu selection by calling this |
403 //wake up current contact menu selection by calling this |
417 iRichTextViewer->FocusChanged(ENoDrawNow); |
404 iRichTextViewer->FocusChanged(ENoDrawNow); |
418 } |
405 } |
419 } |
406 } |
420 } |
407 } |
421 |
408 |
422 // --------------------------------------------------------------------------- |
409 // --------------------------------------------------------------------------- |
423 // CESMRViewerLocationField::SetContainerWindowL |
410 // CESMRViewerLocationField::SetContainerWindowL |
424 // --------------------------------------------------------------------------- |
411 // --------------------------------------------------------------------------- |
563 // |
550 // |
564 TBool CESMRViewerLocationField::HandleTapEventL( const TPoint& aPosition ) |
551 TBool CESMRViewerLocationField::HandleTapEventL( const TPoint& aPosition ) |
565 { |
552 { |
566 TBool ret( EFalse ); |
553 TBool ret( EFalse ); |
567 |
554 |
568 if( iLocked ) |
555 // Button events are handled by HandleControlEvent. |
|
556 // Tap on link is handled by rich text viewer. |
|
557 if ( !iFieldButton->Rect().Contains( aPosition ) |
|
558 && !iRichTextViewer->GetSelectedLink() ) |
569 { |
559 { |
570 HandleTactileFeedbackL(); |
560 HandleTactileFeedbackL(); |
571 |
561 |
572 CESMRGlobalNote::ExecuteL( |
562 NotifyEventL( EAknSoftkeyContextOptions ); |
573 CESMRGlobalNote::EESMRUnableToEdit ); |
563 |
574 |
564 // Event is always consumed, if we come inside this if-clause |
575 // Field locked, let's consume the event |
|
576 ret = ETrue; |
565 ret = ETrue; |
577 } |
566 } |
578 else |
|
579 { |
|
580 // Button events are handled by HandleControlEvent. |
|
581 // Tap on link is handled by rich text viewer. |
|
582 if ( !iFieldButton->Rect().Contains( aPosition ) |
|
583 && !iRichTextViewer->GetSelectedLink() ) |
|
584 { |
|
585 NotifyEventL( EAknSoftkeyContextOptions ); |
|
586 |
|
587 ret = ETrue; |
|
588 |
|
589 HandleTactileFeedbackL(); |
|
590 } |
|
591 } |
|
592 |
567 |
593 return ret; |
568 return ret; |
594 } |
569 } |
595 |
570 |
|
571 // --------------------------------------------------------------------------- |
|
572 // CESMRViewerLocationField::SupportsLongTapFunctionalityL |
|
573 // --------------------------------------------------------------------------- |
|
574 // |
|
575 TBool CESMRViewerLocationField::SupportsLongTapFunctionalityL( |
|
576 const TPointerEvent &aPointerEvent ) |
|
577 { |
|
578 FUNC_LOG; |
|
579 TBool ret( EFalse ); |
|
580 |
|
581 if ( iRichTextViewer->Rect().Contains( aPointerEvent.iPosition ) ) |
|
582 { |
|
583 if( iRichTextViewer->PointerEventOccuresOnALinkL( aPointerEvent ) ) |
|
584 { |
|
585 ret = ETrue; |
|
586 } |
|
587 } |
|
588 |
|
589 return ret; |
|
590 } |
|
591 |
596 //EOF |
592 //EOF |