phonebookui/Speeddial/src/SpdiaContainer.cpp
branchRCL_3
changeset 32 2828b4d142c0
parent 23 5586b4d2ec3e
child 39 a6539d1e8e43
equal deleted inserted replaced
26:0d28c1c5b6dd 32:2828b4d142c0
   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;   	    
  1200              resouceId != R_AVKON_STATUS_PANE_LAYOUT_USUAL_EXT )
  1212              resouceId != R_AVKON_STATUS_PANE_LAYOUT_USUAL_EXT )
  1201              {
  1213              {
  1202              statusPane->SwitchLayoutL( R_AVKON_STATUS_PANE_LAYOUT_USUAL );
  1214              statusPane->SwitchLayoutL( R_AVKON_STATUS_PANE_LAYOUT_USUAL );
  1203              }
  1215              }
  1204 
  1216 
  1205          if ( statusPane->IsVisible() )
  1217          if ( statusPane->IsVisible()&&(!iView->IsShowVmbxDlg()) )
  1206              {
  1218              {
  1207              statusPane->MakeVisible( EFalse );
  1219              statusPane->MakeVisible( EFalse );
  1208              }
  1220              }
  1209 
  1221 
  1210          TRect mainPaneRect;
  1222          TRect mainPaneRect;
  1246             iView->LoadCba( MenuResourceID() );
  1258             iView->LoadCba( MenuResourceID() );
  1247             MiddleSoftKeyL();
  1259             MiddleSoftKeyL();
  1248             break;
  1260             break;
  1249         }
  1261         }
  1250     }
  1262     }
       
  1263  
       
  1264  // --------------------------------------------------------------------------
       
  1265  // CSpdiaContainer::GetViewDialogStatus
       
  1266  // Check whether the view note is displaying when making speeddial to background.
       
  1267  // --------------------------------------------------------------------------
       
  1268  // 
       
  1269  CSpdiaNoteDialog* CSpdiaContainer::GetViewDialogStatus()
       
  1270     {
       
  1271     return iDialog;
       
  1272     }
  1251  // End of File  
  1273  // End of File