403 // Tell the attributes that the note has been fully drawn. |
403 // Tell the attributes that the note has been fully drawn. |
404 // Optimized text drawing is allowed only after this. |
404 // Optimized text drawing is allowed only after this. |
405 CAknNoteAttributes* attr = ControlAttributes(); |
405 CAknNoteAttributes* attr = ControlAttributes(); |
406 if ( attr ) |
406 if ( attr ) |
407 { |
407 { |
408 RDebug::Print(_L("CAknNoteDialog allowing opt. draw, %d"), (TUint)this ); |
408 _AKNTRACE( "[%s][%s] allowing opt. draw,0x%x", "CAknNoteDialog", "LayoutAndDraw", this ); |
409 attr->AllowOptimizedDrawing(); |
409 attr->AllowOptimizedDrawing(); |
410 } |
410 } |
411 } |
411 } |
412 _AKNTRACE_FUNC_EXIT; |
412 _AKNTRACE_FUNC_EXIT; |
413 } |
413 } |
855 _AKNTRACE_FUNC_ENTER; |
855 _AKNTRACE_FUNC_ENTER; |
856 if ( AknLayoutUtils::PenEnabled() ) |
856 if ( AknLayoutUtils::PenEnabled() ) |
857 { |
857 { |
858 CCoeControl* ctrl = GrabbingComponent(); |
858 CCoeControl* ctrl = GrabbingComponent(); |
859 CCoeControl::HandlePointerEventL(aPointerEvent); |
859 CCoeControl::HandlePointerEventL(aPointerEvent); |
860 |
860 // Add tactile feedbacup when tap can close note. |
861 if ( aPointerEvent.iType == TPointerEvent::EButton1Up ) |
861 if ( aPointerEvent.iType == TPointerEvent::EButton1Down ) |
|
862 { |
|
863 if ( DialogFlags()&EEikDialogFlagCloseDialogWhenTapped ) |
|
864 { |
|
865 MTouchFeedback* feedback = MTouchFeedback::Instance(); |
|
866 if ( feedback ) |
|
867 { |
|
868 feedback->InstantFeedback( ETouchFeedbackPopUp ); |
|
869 } |
|
870 } |
|
871 } |
|
872 else if ( aPointerEvent.iType == TPointerEvent::EButton1Up ) |
862 { |
873 { |
863 if ( DialogFlags()&EEikDialogFlagCloseDialogWhenTapped ) |
874 if ( DialogFlags()&EEikDialogFlagCloseDialogWhenTapped ) |
864 { |
875 { |
865 //Touch release gives pop-up effect if note can be dismissed. |
|
866 if ( ctrl ) |
876 if ( ctrl ) |
867 { |
877 { |
868 // if grabbingComponent and dialog has 'close dialog when |
878 // if grabbingComponent and dialog has 'close dialog when |
869 // tapped flag', then close dialog here because tapping happened. |
879 // tapped flag', then close dialog here because tapping happened. |
870 if ( !IsBeingDestroyed() ) |
880 if ( !IsBeingDestroyed() ) |
871 { |
881 { |
872 StaticDeleteL( this ); |
882 StaticDeleteL( this ); |
873 } |
883 } |
874 |
884 |
875 MTouchFeedback* feedback = MTouchFeedback::Instance(); |
|
876 if ( feedback ) |
|
877 { |
|
878 feedback->InstantFeedback( ETouchFeedbackPopUp ); |
|
879 } |
|
880 } |
885 } |
881 } |
886 } |
882 } |
887 } |
883 } |
888 } |
884 _AKNTRACE_FUNC_EXIT; |
889 _AKNTRACE_FUNC_EXIT; |