1023 { |
1023 { |
1024 return GetMaxTextLength(aControl,aDataText,aApiValue); |
1024 return GetMaxTextLength(aControl,aDataText,aApiValue); |
1025 } |
1025 } |
1026 |
1026 |
1027 EXPORT_C void CAknQueryDialog::HandlePointerEventL(const TPointerEvent& aPointerEvent) |
1027 EXPORT_C void CAknQueryDialog::HandlePointerEventL(const TPointerEvent& aPointerEvent) |
1028 { |
1028 { |
1029 if ( AknLayoutUtils::PenEnabled() ) |
1029 CAknAppUi *appUi = iAvkonAppUi; |
1030 { |
1030 CCoeControl *redirectControl = NULL; |
1031 |
1031 TRect rectToScreenOfControl; |
1032 CAknTouchPane* touchPane = iAvkonAppUi->TouchPane(); |
1032 |
1033 |
1033 if (!Rect().Contains(aPointerEvent.iPosition)) |
1034 if ( !Rect().Contains( aPointerEvent.iPosition ) && touchPane |
1034 { |
1035 && touchPane->IsVisible() ) |
1035 CAknTouchPane* touchPane = appUi->TouchPane(); |
|
1036 CEikStatusPane *statusPane = appUi->StatusPane(); |
|
1037 |
|
1038 if ( touchPane && touchPane->IsVisible() ) |
1036 { |
1039 { |
1037 // touchpane is a window-owning control -> Rect() cannot be used |
1040 // touchpane is a window-owning control -> Rect() cannot be used |
1038 TRect touchPaneRect( touchPane->Position(), touchPane->Size() ); |
1041 rectToScreenOfControl.SetRect( touchPane->Position(), touchPane->Size() ); |
1039 |
1042 redirectControl = touchPane; |
1040 if ( touchPaneRect.Contains( aPointerEvent.iParentPosition ) ) |
1043 } |
|
1044 else if ( statusPane && statusPane->IsVisible() && |
|
1045 Layout_Meta_Data::IsLandscapeOrientation() && |
|
1046 !IsFocused()) |
|
1047 { |
|
1048 CCoeControl* cbControl = statusPane->ControlL(TUid::Uid(EEikStatusPaneUidCombined)); |
|
1049 if ( cbControl && !statusPane->IsFaded() ) |
1041 { |
1050 { |
1042 TPointerEvent pointerEvent( aPointerEvent ); |
1051 rectToScreenOfControl.SetRect( cbControl->PositionRelativeToScreen(), cbControl->Size() ); |
1043 |
1052 redirectControl = cbControl; |
1044 // make event's coordinates touch pane relative |
|
1045 pointerEvent.iPosition = aPointerEvent.iParentPosition - |
|
1046 touchPaneRect.iTl; |
|
1047 |
|
1048 static_cast<CCoeControl*>( touchPane )->HandlePointerEventL( |
|
1049 pointerEvent ); |
|
1050 } |
1053 } |
1051 } |
1054 } |
1052 else |
1055 } |
1053 { |
1056 |
1054 // Forward also those pointerevents that the dialog rect does not contain |
1057 if ( redirectControl && rectToScreenOfControl.Contains(aPointerEvent.iParentPosition) ) |
1055 CAknDialog::HandlePointerEventL( aPointerEvent ); |
1058 { |
1056 } |
1059 // make event's coordinates relative to new control. |
|
1060 TPointerEvent pointerEvent( aPointerEvent ); |
|
1061 pointerEvent.iPosition = aPointerEvent.iParentPosition - rectToScreenOfControl.iTl; |
|
1062 |
|
1063 redirectControl->HandlePointerEventL( pointerEvent ); |
|
1064 } |
|
1065 else |
|
1066 { |
|
1067 // Forward also those pointerevents that the dialog rect does not contain |
|
1068 CAknDialog::HandlePointerEventL( aPointerEvent ); |
1057 } |
1069 } |
1058 } |
1070 } |
1059 |
1071 |
1060 EXPORT_C void* CAknQueryDialog::ExtensionInterface( TUid /*aInterface*/ ) |
1072 EXPORT_C void* CAknQueryDialog::ExtensionInterface( TUid /*aInterface*/ ) |
1061 { |
1073 { |