3383 AknLayoutUtils::LayoutLabel(iPrompt->Line(2), rect.Rect(), lineLayout ); |
3383 AknLayoutUtils::LayoutLabel(iPrompt->Line(2), rect.Rect(), lineLayout ); |
3384 } |
3384 } |
3385 |
3385 |
3386 EXPORT_C void CAknQueryControl::HandlePointerEventL(const TPointerEvent& aPointerEvent) |
3386 EXPORT_C void CAknQueryControl::HandlePointerEventL(const TPointerEvent& aPointerEvent) |
3387 { |
3387 { |
3388 CEikMfne* edwin = NULL; |
3388 if ( iEditorFrame.Rect().Contains( aPointerEvent.iPosition ) ) |
3389 if ( iTimeEdwin ) |
3389 { |
3390 { |
3390 /*For the events happening inside editor frame's rect, query control will forward |
3391 edwin = iTimeEdwin; |
3391 the events to editors to handle.This is added to fix bug ESLM-85YFCH:Text editor is hard |
3392 } |
3392 to open in input dialog (usability). The valid area is enlarged to editor frame rect, |
3393 else if ( iDateEdwin ) |
3393 instead of text's rect, because text rect is too small for user to tap*/ |
3394 { |
3394 CCoeControl* ctrl = ControlByLayoutOrNull( iQueryType ); |
3395 edwin = iDateEdwin; |
3395 if( ctrl ) |
3396 } |
3396 { |
3397 else if ( LocationEd() ) |
3397 TPointerEvent pointerEvent( aPointerEvent ); |
3398 { |
3398 if( !ctrl->Rect().Contains( aPointerEvent.iPosition ) && ( NbrOfEditorLines() == 1 ) ) |
3399 edwin = LocationEd(); |
3399 { |
3400 } |
3400 // for the pointerevents happening in editor frame rect, |
3401 else if ( iDurationEdwin ) |
3401 // query control forward events to editors after justification |
3402 { |
3402 pointerEvent.iPosition.iY = ctrl->Rect().iTl.iY + ctrl->Rect().Height()/2; |
3403 edwin = iDurationEdwin; |
3403 } |
3404 } |
3404 ctrl->HandlePointerEventL( pointerEvent ); |
3405 |
3405 } |
3406 if ( edwin && iEditorFrame.Rect().Contains(aPointerEvent.iPosition) ) |
3406 else |
3407 { |
3407 { |
3408 edwin->HandlePointerEventL(aPointerEvent); |
3408 CAknControl::HandlePointerEventL( aPointerEvent ); |
3409 } |
3409 } |
|
3410 } |
3410 else |
3411 else |
3411 { |
3412 { |
3412 CAknControl::HandlePointerEventL(aPointerEvent); |
3413 CAknControl::HandlePointerEventL( aPointerEvent ); |
3413 } |
3414 } |
3414 } |
3415 } |
3415 |
3416 |
3416 EXPORT_C void* CAknQueryControl::ExtensionInterface( TUid /*aInterface*/ ) |
3417 EXPORT_C void* CAknQueryControl::ExtensionInterface( TUid /*aInterface*/ ) |
3417 { |
3418 { |
3418 return NULL; |
3419 return NULL; |
3785 } |
3786 } |
3786 } |
3787 } |
3787 |
3788 |
3788 EXPORT_C void CAknExtQueryControl::HandlePointerEventL(const TPointerEvent& aPointerEvent) |
3789 EXPORT_C void CAknExtQueryControl::HandlePointerEventL(const TPointerEvent& aPointerEvent) |
3789 { |
3790 { |
3790 if ( iIpEditor && iEditorFrame.Rect().Contains(aPointerEvent.iPosition) ) |
3791 if ( iEditorFrame.Rect().Contains( aPointerEvent.iPosition ) ) |
3791 { |
3792 { |
3792 iIpEditor->HandlePointerEventL(aPointerEvent); |
3793 /*For the events happening inside editor frame's rect, query control will forward |
3793 } |
3794 the events to editors to handle.This is added to fix bug ESLM-85YFCH:Text editor is hard |
3794 else |
3795 to open in input dialog (usability). The valid area is enlarged to editor frame rect, |
3795 { |
3796 instead of text's rect, because text rect is too small for user to tap*/ |
3796 CAknQueryControl::HandlePointerEventL(aPointerEvent); |
3797 CCoeControl* ctrl = ControlByLayoutOrNull( iQueryType ); |
3797 } |
3798 if( ctrl ) |
|
3799 { |
|
3800 TPointerEvent pointerEvent( aPointerEvent ); |
|
3801 if( !ctrl->Rect().Contains( aPointerEvent.iPosition ) && ( NbrOfEditorLines() == 1 ) ) |
|
3802 { |
|
3803 // for the pointerevents happening in editor frame rect, |
|
3804 // query control forward events to editors after justification |
|
3805 pointerEvent.iPosition.iY = ctrl->Rect().iTl.iY + ctrl->Rect().Height()/2; |
|
3806 } |
|
3807 ctrl->HandlePointerEventL( pointerEvent ); |
|
3808 } |
|
3809 else |
|
3810 { |
|
3811 CAknControl::HandlePointerEventL( aPointerEvent ); |
|
3812 } |
|
3813 } |
|
3814 else |
|
3815 { |
|
3816 CAknControl::HandlePointerEventL( aPointerEvent ); |
|
3817 } |
3798 } |
3818 } |
3799 |
3819 |
3800 EXPORT_C void* CAknExtQueryControl::ExtensionInterface( TUid /*aInterface*/ ) |
3820 EXPORT_C void* CAknExtQueryControl::ExtensionInterface( TUid /*aInterface*/ ) |
3801 { |
3821 { |
3802 return NULL; |
3822 return NULL; |