377 ) |
377 ) |
378 ); |
378 ); |
379 |
379 |
380 TRAP_IGNORE( iGrid->ScrollBarFrame()->SetScrollBarVisibilityL( |
380 TRAP_IGNORE( iGrid->ScrollBarFrame()->SetScrollBarVisibilityL( |
381 CEikScrollBarFrame::EOff, CEikScrollBarFrame::EOff ) ); |
381 CEikScrollBarFrame::EOff, CEikScrollBarFrame::EOff ) ); |
|
382 iGrid->ScrollBarFrame()->VerticalScrollBar()->SetRect( TRect( 0,0,0,0 ) ); |
382 CFormattedCellListBoxData* data = iGrid->ItemDrawer()->FormattedCellData(); |
383 CFormattedCellListBoxData* data = iGrid->ItemDrawer()->FormattedCellData(); |
383 |
384 |
384 data->SetTransparentSubCellL( SDM_TN_CIF_TURNED, ETrue ); //5 |
385 data->SetTransparentSubCellL( SDM_TN_CIF_TURNED, ETrue ); //5 |
385 data->SetTransparentSubCellL( SDM_TN_CIF, ETrue ); //7 |
386 data->SetTransparentSubCellL( SDM_TN_CIF, ETrue ); //7 |
386 data->SetTransparentSubCellL( SDM_TN_VGA_TURNED, ETrue ); //9 |
387 data->SetTransparentSubCellL( SDM_TN_VGA_TURNED, ETrue ); //9 |
1040 // Function to handle all touch (pointer events) |
1041 // Function to handle all touch (pointer events) |
1041 // ---------------------------------------------------------------------------- |
1042 // ---------------------------------------------------------------------------- |
1042 void CSpdiaContainer::HandlePointerEventL(const TPointerEvent& aPointerEvent) |
1043 void CSpdiaContainer::HandlePointerEventL(const TPointerEvent& aPointerEvent) |
1043 { |
1044 { |
1044 if ( !iView->IsAssignCompleted() ) |
1045 if ( !iView->IsAssignCompleted() ) |
|
1046 { |
|
1047 return; |
|
1048 } |
|
1049 |
|
1050 // check if the position is in grid view |
|
1051 CAknGridView* gridView = iGrid->GridView(); |
|
1052 TInt itemIndex = 0; |
|
1053 TRect visibleItemsRect(gridView->ViewRect().iTl, |
|
1054 TSize(gridView->ItemSize(itemIndex).iWidth * gridView->NumberOfColsInView(), |
|
1055 gridView->ItemSize(itemIndex).iHeight * gridView->NumberOfRowsInView())); |
|
1056 if (!visibleItemsRect.Contains(aPointerEvent.iPosition)) |
1045 { |
1057 { |
1046 return; |
1058 return; |
1047 } |
1059 } |
1048 |
1060 |
1049 // Check if touch is enabled or not. |
1061 // Check if touch is enabled or not. |
1146 // -------------------------------------------------------------------------- |
1158 // -------------------------------------------------------------------------- |
1147 // CSpdiaContainer::HandleLongTapEventL |
1159 // CSpdiaContainer::HandleLongTapEventL |
1148 // -------------------------------------------------------------------------- |
1160 // -------------------------------------------------------------------------- |
1149 // |
1161 // |
1150 void CSpdiaContainer::HandleLongTapEventL( |
1162 void CSpdiaContainer::HandleLongTapEventL( |
1151 const TPoint& /*aPenEventLocation*/, |
1163 const TPoint& aPenEventLocation, |
1152 const TPoint& aPenEventScreenLocation ) |
1164 const TPoint& /*aPenEventScreenLocation*/ ) |
1153 { |
1165 { |
1154 // Get the Current Data Index |
1166 // Get the Current Data Index |
1155 TInt itemIndex( KErrNotFound ); |
1167 TInt itemIndex( KErrNotFound ); |
1156 |
1168 |
1157 // Get position when user press screen |
1169 // Get position when user press screen |
1158 iGrid->View()->XYPosToItemIndex( aPenEventScreenLocation, itemIndex ); |
1170 iGrid->View()->XYPosToItemIndex( aPenEventLocation, itemIndex ); |
1159 |
1171 |
1160 // Compare two index |
1172 // Compare two index |
1161 if ( AknLayoutUtils::PenEnabled() && ( itemIndex == iGrid->CurrentDataIndex() ) ) |
1173 if ( AknLayoutUtils::PenEnabled() && ( itemIndex == iGrid->CurrentDataIndex() ) ) |
1162 { |
1174 { |
1163 iLongTapUsed = ETrue; |
1175 iLongTapUsed = ETrue; |