401 } |
399 } |
402 |
400 |
403 GLX_LOG_INFO("GLX_CLOUD ::CGlxCloudViewControl::::LayoutVisibleArea Exiting layout append"); |
401 GLX_LOG_INFO("GLX_CLOUD ::CGlxCloudViewControl::::LayoutVisibleArea Exiting layout append"); |
404 iLayoutIndex = 0; |
402 iLayoutIndex = 0; |
405 GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::::LayoutVisibleArea layout Count realloc %d ", iLayout->Count ()); |
403 GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::::LayoutVisibleArea layout Count realloc %d ", iLayout->Count ()); |
406 for (TInt j = 0; j <= iEndRowIndex; j++) |
404 TInt totalHeight = 0; |
|
405 for (TInt j = 0; j <= iCloudInfo.Count() - 1; j++) |
407 { |
406 { |
408 GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::::LayoutVisibleArea Drawing row started %d ", j); |
407 GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::::LayoutVisibleArea Drawing row started %d ", j); |
409 LayoutVisibleRows (startpoint,iCloudInfo[j].iStartIndex, |
408 LayoutVisibleRows (startpoint,iCloudInfo[j].iStartIndex, |
410 iCloudInfo[j].iEndIndex); |
409 iCloudInfo[j].iEndIndex); |
411 startpoint.iY += KRowHeight + KNumMinRowSpace; |
410 startpoint.iY += KRowHeight + KNumMinRowSpace; |
412 } |
411 |
413 TInt totalHeight = 0; |
|
414 for (TInt j = 0; j <= iCloudInfo.Count()-1; j++) |
|
415 { |
|
416 totalHeight+=KRowHeight; |
412 totalHeight+=KRowHeight; |
417 totalHeight+=KNumMinRowSpace; |
413 totalHeight+=KNumMinRowSpace; |
418 } |
414 } |
419 |
415 |
420 //Set the virtual size of viewport to the total size of anchor. |
416 //Set the virtual size of viewport to the total size of anchor. |
459 // --------------------------------------------------------------------------- |
455 // --------------------------------------------------------------------------- |
460 // OfferEventL() |
456 // OfferEventL() |
461 // --------------------------------------------------------------------------- |
457 // --------------------------------------------------------------------------- |
462 // |
458 // |
463 TBool CGlxCloudViewControl::OfferEventL(const TAlfEvent &aEvent) |
459 TBool CGlxCloudViewControl::OfferEventL(const TAlfEvent &aEvent) |
464 { TRACER("GLX_CLOUD:: CGlxCloudViewControl::OfferEventL"); |
460 { |
|
461 TRACER("GLX_CLOUD:: CGlxCloudViewControl::OfferEventL"); |
465 |
462 |
466 //check if key inputs needs handling |
463 //check if key inputs needs handling |
467 TBool consumed = EFalse; |
464 TBool consumed = EFalse; |
468 if ( ( iLabels.Count () == 0 ) ) |
465 if (iLabels.Count() == 0) |
469 { |
466 { |
470 GLX_LOG_INFO( "GLX_CLOUD ::CGlxCloudViewControl::offerkeyeventL no key press returning "); |
467 GLX_LOG_INFO( "GLX_CLOUD ::CGlxCloudViewControl::offerkeyeventL no key press returning "); |
471 return EFalse; //return as no futher processing is required |
468 return EFalse; //return as no futher processing is required |
472 } |
469 } |
473 |
470 |
|
471 if (aEvent.IsKeyEvent() && iTagsContextMenuControl->ItemMenuVisibility()) |
|
472 { |
|
473 // Hide the context menu, if visible |
|
474 ShowContextItemMenuL(EFalse); |
|
475 } |
|
476 |
474 if ( aEvent.IsKeyEvent ()&& aEvent.Code() == EEventKey ) |
477 if ( aEvent.IsKeyEvent ()&& aEvent.Code() == EEventKey ) |
475 { |
478 { |
476 switch (aEvent.KeyEvent().iCode) |
479 switch (aEvent.KeyEvent().iCode) |
477 { |
480 { |
478 //@ EABI-7R7FRU Fute failure: Tag views enter key has no functionality. |
|
479 case EKeyEnter : |
481 case EKeyEnter : |
480 case EKeyDevice3: |
482 case EKeyDevice3: |
481 { |
483 { |
482 iObserverEnterKeyEvent.HandleEnterKeyEventL( (TInt)EAknCmdOpen ); |
484 if (iShowFocus) |
483 consumed= ETrue; |
485 { |
|
486 iShowFocus = EFalse; |
|
487 iObserverEnterKeyEvent.HandleEnterKeyEventL( |
|
488 (TInt) EAknCmdOpen); |
|
489 } |
|
490 else |
|
491 { |
|
492 SetFocusToFirstVisibleItemL(); |
|
493 } |
|
494 consumed = ETrue; |
484 } |
495 } |
485 break; |
496 break; |
486 case EKeyUpArrow: |
497 case EKeyUpArrow: |
487 { |
498 { |
488 if(iCloudInfo.Count() >1 ) |
499 if (iShowFocus) |
489 { |
500 { |
490 HandleKeyUpL (); |
501 HandleKeyUpL(); |
491 consumed = ETrue; |
502 iFocusRowIndex = RowNumber(iMediaList.FocusIndex()); |
492 iFocusRowIndex = RowNumber (iMediaList.FocusIndex ()); |
503 |
493 |
504 MoveUpIfRequired(); |
494 MoveUpIfRequired(); |
|
495 } |
505 } |
|
506 else |
|
507 { |
|
508 SetFocusToFirstVisibleItemL(); |
|
509 } |
|
510 consumed = ETrue; |
496 } |
511 } |
497 break; |
512 break; |
498 |
513 |
499 case EKeyDownArrow: |
514 case EKeyDownArrow: |
500 { |
515 { |
501 if (iCloudInfo.Count() > 1) |
516 if (iShowFocus) |
502 { |
517 { |
503 HandleKeyDownL (); |
518 HandleKeyDownL(); |
504 consumed = ETrue; |
519 iFocusRowIndex = RowNumber(iMediaList.FocusIndex()); |
505 iFocusRowIndex = RowNumber (iMediaList.FocusIndex ()); |
520 |
506 |
521 MoveDownIfRequired(); |
507 MoveDownIfRequired(); |
522 } |
508 } |
523 else |
|
524 { |
|
525 SetFocusToFirstVisibleItemL(); |
|
526 } |
|
527 consumed = ETrue; |
509 } |
528 } |
510 break; |
529 break; |
511 |
530 |
512 case EKeyLeftArrow: |
531 case EKeyLeftArrow: |
513 case EKeyPrevious: |
532 case EKeyPrevious: |
514 { |
533 { |
515 // arabic hebrew change |
534 if (iShowFocus) |
516 if ( GlxGeneralUiUtilities::LayoutIsMirrored () ) |
|
517 { |
535 { |
518 if ( iMediaList.FocusIndex() == iMediaList.Count() - 1 ) |
536 // arabic hebrew change |
|
537 if (GlxGeneralUiUtilities::LayoutIsMirrored()) |
519 { |
538 { |
520 iMediaList.SetFocusL (NGlxListDefs::EAbsolute, 0); |
539 if (iMediaList.FocusIndex() == iMediaList.Count() - 1) |
|
540 { |
|
541 iMediaList.SetFocusL(NGlxListDefs::EAbsolute, 0); |
|
542 } |
|
543 else |
|
544 { |
|
545 iMediaList.SetFocusL(NGlxListDefs::EAbsolute, |
|
546 iMediaList.FocusIndex() + 1); |
|
547 } |
|
548 iScrollDirection = 0; |
521 } |
549 } |
522 else |
550 else |
523 { |
551 { |
524 iMediaList.SetFocusL (NGlxListDefs::EAbsolute, |
552 if (iMediaList.FocusIndex() == 0) |
525 iMediaList.FocusIndex ()+ 1); |
553 { |
|
554 iMediaList.SetFocusL(NGlxListDefs::EAbsolute, |
|
555 iMediaList.Count() - 1); |
|
556 } |
|
557 else |
|
558 { |
|
559 iMediaList.SetFocusL(NGlxListDefs::EAbsolute, |
|
560 iMediaList.FocusIndex() - 1); |
|
561 } |
|
562 iScrollDirection = 1; |
526 } |
563 } |
527 iScrollDirection = 0; |
564 TInt focusRowIndex = RowNumber(iMediaList.FocusIndex()); |
|
565 if (iFocusRowIndex != focusRowIndex) |
|
566 { |
|
567 iFocusRowIndex = focusRowIndex; |
|
568 if (iScrollDirection == 0) |
|
569 { |
|
570 MoveDownIfRequired(); |
|
571 } |
|
572 else |
|
573 { |
|
574 MoveUpIfRequired(); |
|
575 } |
|
576 } |
528 } |
577 } |
529 else |
578 else |
530 { |
579 { |
531 if ( iMediaList.FocusIndex ()== 0 ) |
580 SetFocusToFirstVisibleItemL(); |
|
581 } |
|
582 consumed = ETrue; |
|
583 } |
|
584 break; |
|
585 |
|
586 case EKeyRightArrow: |
|
587 case EKeyNext: |
|
588 { |
|
589 if (iShowFocus) |
|
590 { |
|
591 // arabic hebrew change |
|
592 if (GlxGeneralUiUtilities::LayoutIsMirrored()) |
532 { |
593 { |
533 iMediaList.SetFocusL (NGlxListDefs::EAbsolute, |
594 if (iMediaList.FocusIndex() == 0) |
534 iMediaList.Count() - 1 ); |
595 { |
|
596 iMediaList.SetFocusL(NGlxListDefs::EAbsolute, |
|
597 iMediaList.Count() - 1); |
|
598 } |
|
599 else |
|
600 { |
|
601 iMediaList.SetFocusL(NGlxListDefs::EAbsolute, |
|
602 iMediaList.FocusIndex() - 1); |
|
603 } |
|
604 iScrollDirection = 1; |
535 } |
605 } |
536 else |
606 else |
537 { |
607 { |
538 iMediaList.SetFocusL (NGlxListDefs::EAbsolute, |
608 if (iMediaList.FocusIndex() == iMediaList.Count() - 1) |
539 iMediaList.FocusIndex ()- 1); |
609 { |
|
610 iMediaList.SetFocusL(NGlxListDefs::EAbsolute, 0); |
|
611 } |
|
612 else |
|
613 { |
|
614 iMediaList.SetFocusL(NGlxListDefs::EAbsolute, |
|
615 iMediaList.FocusIndex() + 1); |
|
616 } |
|
617 iScrollDirection = 0; |
540 } |
618 } |
541 iScrollDirection = 1; |
619 TInt focusRowIndex = RowNumber(iMediaList.FocusIndex()); |
542 } |
620 |
543 consumed = ETrue; |
621 if (iFocusRowIndex != focusRowIndex) |
544 TInt focusRowIndex = RowNumber (iMediaList.FocusIndex ()); |
622 { |
545 if(iFocusRowIndex != focusRowIndex) |
623 iFocusRowIndex = focusRowIndex; |
546 { |
624 if (iScrollDirection == 1) |
547 iFocusRowIndex = focusRowIndex; |
625 { |
548 if( iScrollDirection == 0 ) |
626 MoveUpIfRequired(); |
549 { |
627 } |
550 MoveDownIfRequired(); |
628 else |
|
629 { |
|
630 MoveDownIfRequired(); |
|
631 } |
551 } |
632 } |
552 else |
|
553 { |
|
554 MoveUpIfRequired(); |
|
555 } |
|
556 } |
|
557 } |
|
558 |
|
559 break; |
|
560 |
|
561 case EKeyRightArrow: |
|
562 case EKeyNext: |
|
563 { |
|
564 // arabic hebrew change |
|
565 if ( GlxGeneralUiUtilities::LayoutIsMirrored () ) |
|
566 { |
|
567 if ( iMediaList.FocusIndex ()== 0 ) |
|
568 { |
|
569 iMediaList.SetFocusL (NGlxListDefs::EAbsolute, |
|
570 iMediaList.Count() - 1 ); |
|
571 } |
|
572 else |
|
573 { |
|
574 iMediaList.SetFocusL (NGlxListDefs::EAbsolute, |
|
575 iMediaList.FocusIndex ()- 1); |
|
576 } |
|
577 iScrollDirection = 1; |
|
578 } |
633 } |
579 else |
634 else |
580 { |
635 { |
581 if ( iMediaList.FocusIndex ()== iMediaList.Count() - 1 ) |
636 SetFocusToFirstVisibleItemL(); |
582 { |
|
583 iMediaList.SetFocusL (NGlxListDefs::EAbsolute, 0); |
|
584 } |
|
585 else |
|
586 { |
|
587 iMediaList.SetFocusL (NGlxListDefs::EAbsolute, |
|
588 iMediaList.FocusIndex ()+ 1); |
|
589 } |
|
590 iScrollDirection = 0; |
|
591 } |
637 } |
592 TInt focusRowIndex = RowNumber (iMediaList.FocusIndex ()); |
638 consumed = ETrue; |
593 |
|
594 if( iFocusRowIndex != focusRowIndex ) |
|
595 { |
|
596 iFocusRowIndex = focusRowIndex; |
|
597 if( iScrollDirection == 1 ) |
|
598 { |
|
599 MoveUpIfRequired(); |
|
600 } |
|
601 else |
|
602 { |
|
603 MoveDownIfRequired(); |
|
604 } |
|
605 } |
|
606 } |
639 } |
607 consumed = ETrue; |
|
608 break; |
640 break; |
609 |
641 |
610 default: |
642 default: |
611 break; |
643 break; |
612 } |
644 } |
1249 |
1273 |
1250 // --------------------------------------------------------------------------- |
1274 // --------------------------------------------------------------------------- |
1251 // SetFocusColor() |
1275 // SetFocusColor() |
1252 // --------------------------------------------------------------------------- |
1276 // --------------------------------------------------------------------------- |
1253 // |
1277 // |
1254 void CGlxCloudViewControl::SetFocusColor() |
1278 void CGlxCloudViewControl::SetFocusColor() |
1255 { |
1279 { |
1256 iLabels[iMediaList.FocusIndex()]->SetColor (KAknsIIDQsnHighlightColors ,EAknsCIQsnHighlightColorsCG3); |
1280 TRACER("GLX_CLOUD::CGlxCloudViewControl::SetFocusColor"); |
1257 } |
1281 if (iMediaList.Count()) |
1258 |
1282 { |
1259 // --------------------------------------------------------------------------- |
1283 iLabels[iMediaList.FocusIndex()]->SetColor( |
1260 // SetBubleMidPoint() |
1284 KAknsIIDQsnHighlightColors, EAknsCIQsnHighlightColorsCG3); |
1261 // --------------------------------------------------------------------------- |
1285 } |
1262 // |
1286 } |
1263 void CGlxCloudViewControl::SetBubleMidPoint(TPoint& aMidPoint) |
1287 |
1264 { |
1288 // --------------------------------------------------------------------------- |
1265 TRACER("GLX_CLOUD::CGlxCloudViewControl::SetBubleMidPoint"); |
1289 // ResetFocusColor() |
1266 //Substract the viewport position so as to set the buble at the right position on the screen |
1290 // --------------------------------------------------------------------------- |
1267 aMidPoint.iX-=iViewPortPosition.iX; |
1291 // |
1268 aMidPoint.iY-=iViewPortPosition.iY; |
1292 void CGlxCloudViewControl::ResetFocusColor() |
|
1293 { |
|
1294 TRACER("GLX_CLOUD::CGlxCloudViewControl::ResetFocusColor"); |
|
1295 if (iMediaList.Count()) |
|
1296 { |
|
1297 iLabels[iMediaList.FocusIndex()]->SetColor(KAknsIIDQsnTextColors, |
|
1298 EAknsCIQsnTextColorsCG6); |
|
1299 } |
1269 } |
1300 } |
1270 |
1301 |
1271 // --------------------------------------------------------------------------- |
1302 // --------------------------------------------------------------------------- |
1272 // MoveUpIfRequired() |
1303 // MoveUpIfRequired() |
1273 // --------------------------------------------------------------------------- |
1304 // --------------------------------------------------------------------------- |
1274 // |
1305 // |
1275 void CGlxCloudViewControl::MoveUpIfRequired() |
1306 void CGlxCloudViewControl::MoveUpIfRequired() |
1276 { |
1307 { |
1277 TRACER("GLX_CLOUD::CGlxCloudViewControl::MoveUpIfRequired"); |
1308 TRACER("GLX_CLOUD::CGlxCloudViewControl::MoveUpIfRequired"); |
|
1309 TInt focusIndex = iMediaList.FocusIndex(); |
|
1310 |
1278 //get the focused item's position |
1311 //get the focused item's position |
1279 TPoint point; |
1312 TPoint point; |
1280 iLayout->ChildPos(iMediaList.FocusIndex(),point); |
1313 iLayout->ChildPos(focusIndex,point); |
1281 TSize size; |
1314 TSize size; |
1282 iLayout->ChildSize(iMediaList.FocusIndex(),size); |
1315 iLayout->ChildSize(focusIndex,size); |
1283 TInt focus = iMediaList.FocusIndex(); |
1316 |
1284 TInt rownumber = RowNumber(focus); |
1317 TInt rownumber = RowNumber(focusIndex); |
1285 //if the focused item is not visible then move the viewport |
1318 //if the focused item is not visible then move the viewport |
1286 if(point.iY < iViewPortPosition.iY) |
1319 if(point.iY < iViewPortPosition.iY) |
1287 { |
1320 { |
1288 //set the new position of viewport |
1321 //set the new position of viewport |
1289 TInt offeset = iViewPortPosition.iY - point.iY; |
1322 TInt offset = iViewPortPosition.iY - point.iY; |
1290 iViewPortPosition.iY-=offeset; |
1323 iViewPortPosition.iY-=offset; |
1291 if( (iViewPortPosition.iY < 0) ) |
1324 if( (iViewPortPosition.iY < 0) ) |
1292 { |
1325 { |
1293 iViewPortPosition.iY = 0; |
1326 iViewPortPosition.iY = 0; |
1294 } |
1327 } |
1295 } |
1328 } |
1307 // MoveDownIfRequired() |
1340 // MoveDownIfRequired() |
1308 // --------------------------------------------------------------------------- |
1341 // --------------------------------------------------------------------------- |
1309 // |
1342 // |
1310 void CGlxCloudViewControl::MoveDownIfRequired() |
1343 void CGlxCloudViewControl::MoveDownIfRequired() |
1311 { |
1344 { |
1312 TRACER("GLX_CLOUD::CGlxCloudViewControl::MoveDownIfRequired"); |
1345 TRACER("GLX_CLOUD::CGlxCloudViewControl::MoveDownIfRequired"); |
|
1346 TInt focusIndex = iMediaList.FocusIndex(); |
|
1347 |
1313 //get the focused item's position |
1348 //get the focused item's position |
1314 TPoint point; |
1349 TPoint point; |
1315 iLayout->ChildPos(iMediaList.FocusIndex(),point); |
1350 iLayout->ChildPos(focusIndex, point); |
1316 TSize size; |
1351 TSize size; |
1317 iLayout->ChildSize(iMediaList.FocusIndex(),size); |
1352 iLayout->ChildSize(focusIndex, size); |
1318 //if the focused visual is not visible then move the viewport |
1353 |
1319 if(point.iY+size.iHeight > iViewPortPosition.iY+iViewPortSize.iHeight ) |
1354 //Reset viewport position for cases: |
1320 { |
1355 //case 1)Focus index is first item |
1321 //set the new position of viewport |
1356 if (focusIndex == 0) |
1322 TInt offeset = (point.iY+size.iHeight) - (iViewPortPosition.iY+iViewPortSize.iHeight); |
1357 { |
1323 iViewPortPosition.iY+=offeset; |
1358 iViewPortPosition.iY = 0; |
1324 if( (iViewPortPosition.iY > iViewPortVirtualSize.iHeight) ) |
1359 } |
1325 { |
1360 //case 2)Focused item is in last screen |
1326 iViewPortPosition.iY = iViewPortVirtualSize.iHeight - iViewPortSize.iHeight; |
1361 else if( point.iY > (iViewPortVirtualSize.iHeight - iViewPortSize.iHeight)) |
1327 } |
1362 { |
1328 } |
1363 iViewPortPosition.iY = iViewPortVirtualSize.iHeight - iViewPortSize.iHeight; |
1329 //if its key event then it should be cyclic |
1364 } |
1330 else if (iMediaList.FocusIndex() == 0) |
1365 else |
1331 { |
1366 { |
1332 iViewPortPosition.iY = 0; |
1367 iViewPortPosition.iY = point.iY + KNumMinRowSpace; |
1333 } |
1368 } |
|
1369 |
|
1370 //Validate the viewport position |
|
1371 if ((iViewPortPosition.iY > iViewPortVirtualSize.iHeight)) |
|
1372 { |
|
1373 iViewPortPosition.iY = iViewPortVirtualSize.iHeight - iViewPortSize.iHeight; |
|
1374 } |
|
1375 |
|
1376 GLX_LOG_INFO1("GLX_CLOUD::MoveDownIfRequired() iViewPortPosition.iY:%d", |
|
1377 iViewPortPosition.iY); |
1334 iViewPortLayout->SetViewportPos(iViewPortPosition, KSlowCloudMovement); |
1378 iViewPortLayout->SetViewportPos(iViewPortPosition, KSlowCloudMovement); |
1335 iScrollEventData.mViewStartPos = iViewPortPosition.iY; |
1379 iScrollEventData.mViewStartPos = iViewPortPosition.iY; |
1336 if(iScrollBarWidget) |
1380 if(iScrollBarWidget) |
1337 { |
1381 { |
1338 Scroll(); |
1382 Scroll(); |
1339 } |
1383 } |
1340 } |
1384 } |
1341 |
|
1342 // --------------------------------------------------------------------------- |
|
1343 // MoveDownIfRequired() |
|
1344 // --------------------------------------------------------------------------- |
|
1345 // |
|
1346 void CGlxCloudViewControl::CalculateBubleMidPoint() |
|
1347 { |
|
1348 TRACER("GLX_CLOUD::CGlxCloudViewControl::CalculateBubleMidPoint"); |
|
1349 TPoint midpoint; |
|
1350 TAlfRealRect focussedItemRect; |
|
1351 TRect mainPaneRect; |
|
1352 AknLayoutUtils::LayoutMetricsRect (AknLayoutUtils::EMainPane, mainPaneRect); |
|
1353 |
|
1354 CAlfVisual& visual = iLayout->Visual( iMediaList.FocusIndex() ); |
|
1355 focussedItemRect = visual.DisplayRect(); |
|
1356 |
|
1357 if( GlxGeneralUiUtilities::LayoutIsMirrored () ) |
|
1358 { |
|
1359 midpoint.iX = focussedItemRect.iBr.iX + |
|
1360 ((focussedItemRect.iTl.iX - focussedItemRect.iBr.iX )/2); |
|
1361 } |
|
1362 |
|
1363 else |
|
1364 { |
|
1365 midpoint.iX=focussedItemRect.iTl.iX + |
|
1366 ((focussedItemRect.iBr.iX - focussedItemRect.iTl.iX )/2); |
|
1367 } |
|
1368 |
|
1369 midpoint.iY=focussedItemRect.iTl.iY+ |
|
1370 ((focussedItemRect.iBr.iY - focussedItemRect.iTl.iY )/2); |
|
1371 TPoint anchorRect; |
|
1372 |
|
1373 //Get the position of anchor layout |
|
1374 iViewPortLayout->ChildPos (0, anchorRect); |
|
1375 |
|
1376 //Add the differance to the midpoint |
|
1377 midpoint.iX+=anchorRect.iX; |
|
1378 midpoint.iY+=anchorRect.iY; |
|
1379 |
|
1380 //Substract from the viewport position the viewport position |
|
1381 SetBubleMidPoint(midpoint); |
|
1382 } |
|
1383 |
1385 |
1384 // --------------------------------------------------------------------------- |
1386 // --------------------------------------------------------------------------- |
1385 // HandlePointerEventL() |
1387 // HandlePointerEventL() |
1386 // --------------------------------------------------------------------------- |
1388 // --------------------------------------------------------------------------- |
1387 // |
1389 // |
1388 TBool CGlxCloudViewControl::HandlePointerEventL( const TAlfEvent &aEvent ) |
1390 TBool CGlxCloudViewControl::HandlePointerEventL( const TAlfEvent &aEvent ) |
1389 { |
1391 { |
1390 TRACER("GLX_CLOUD::CGlxCloudViewControl::HandlePointerEventL"); |
1392 TRACER("GLX_CLOUD::CGlxCloudViewControl::HandlePointerEventL"); |
1391 CAlfVisual* tappedvisual = aEvent.Visual(); |
1393 CAlfVisual* tappedvisual = aEvent.Visual(); |
1392 TBool consumed = EFalse; |
1394 TBool consumed = EFalse; |
1812 |
1822 |
1813 // --------------------------------------------------------------------------- |
1823 // --------------------------------------------------------------------------- |
1814 // DisplayScrollBar() |
1824 // DisplayScrollBar() |
1815 // --------------------------------------------------------------------------- |
1825 // --------------------------------------------------------------------------- |
1816 // |
1826 // |
1817 void CGlxCloudViewControl::DisplayScrollBar() |
1827 void CGlxCloudViewControl::DisplayScrollBar() |
1818 { |
1828 { |
|
1829 TRACER("GLX_CLOUD::CGlxCloudViewControl::DisplayScrollBar()"); |
1819 if (iScrollBarWidget) |
1830 if (iScrollBarWidget) |
1820 { |
1831 { |
1821 IAlfElement* vertBaseElement =(iScrollBarWidget->control()->findElement ("BaseElement")); |
1832 IAlfElement* vertBaseElement =(iScrollBarWidget->control()->findElement ("BaseElement")); |
1822 IAlfScrollBarDefaultBaseElement* scrollbarbaselement=static_cast<IAlfScrollBarDefaultBaseElement*> ( |
1833 IAlfScrollBarDefaultBaseElement* scrollbarbaselement=static_cast<IAlfScrollBarDefaultBaseElement*> ( |
1823 vertBaseElement->makeInterface (IAlfScrollBarDefaultBaseElement::type() ) ); |
1834 vertBaseElement->makeInterface (IAlfScrollBarDefaultBaseElement::type() ) ); |
1824 |
1835 |
1825 // To set the scrollbar visibility, it's enough to set the opacity |
1836 TInt totalHeight = 0; |
1826 // of baselayout. No need to set the opacity of thumb separately. |
1837 for (TInt index = 0; index <= iCloudInfo.Count() - 1; index++) |
1827 if (iScrollEventData.mSpan) |
1838 { |
|
1839 totalHeight += KRowHeight; |
|
1840 totalHeight += KNumMinRowSpace; |
|
1841 } |
|
1842 |
|
1843 // To set the scrollbar visibility, it's enough to set the opacity |
|
1844 // of baselayout. No need to set the opacity of thumb separately. |
|
1845 // Set the scrollbar visibility only |
|
1846 // when visuals height exceeds the screen height |
|
1847 if (iScrollEventData.mSpan && totalHeight > iTagScreenHeight) |
1828 { |
1848 { |
1829 //make scroll bar visible |
1849 //make scroll bar visible |
|
1850 GLX_LOG_INFO("GLX_CLOUD: Make scrollbar visible!"); |
1830 scrollbarbaselement->setOpacity(1.0); |
1851 scrollbarbaselement->setOpacity(1.0); |
1831 } |
1852 } |
1832 else |
1853 else |
1833 { |
1854 { |
1834 //make scroll bar invisible |
1855 //make scroll bar invisible |
1976 // ShowContextItemMenuL() |
1998 // ShowContextItemMenuL() |
1977 // --------------------------------------------------------------------------- |
1999 // --------------------------------------------------------------------------- |
1978 // |
2000 // |
1979 void CGlxCloudViewControl::ShowContextItemMenuL(TBool aShow) |
2001 void CGlxCloudViewControl::ShowContextItemMenuL(TBool aShow) |
1980 { |
2002 { |
|
2003 TRACER("GLX_CLOUD::ShowContextItemMenuL"); |
|
2004 GLX_LOG_INFO1("GLX_CLOUD::ShowContextItemMenuL() aShow=%d", aShow); |
1981 iTagsContextMenuControl->ShowItemMenuL(aShow); |
2005 iTagsContextMenuControl->ShowItemMenuL(aShow); |
1982 if(!aShow) |
2006 if(!aShow) |
1983 { |
2007 { |
1984 iViewPortLayout->UpdateChildrenLayout(0); |
2008 iViewPortLayout->UpdateChildrenLayout(0); |
|
2009 iShowFocus = EFalse; |
|
2010 ResetFocusColor(); |
|
2011 } |
|
2012 } |
|
2013 |
|
2014 // --------------------------------------------------------------------------- |
|
2015 // SetFocusToFirstVisibleItemL() |
|
2016 // --------------------------------------------------------------------------- |
|
2017 // |
|
2018 void CGlxCloudViewControl::SetFocusToFirstVisibleItemL() |
|
2019 { |
|
2020 TRACER("GLX_CLOUD::CGlxCloudViewControl::SetFocusToFirstVisibleItemL()"); |
|
2021 iShowFocus = ETrue; |
|
2022 |
|
2023 TInt visIndex = GetAbsoluteIndex(TPoint(KLeftMargin + KLeftMargin, |
|
2024 KColSpace)); |
|
2025 GLX_LOG_INFO1("GLX_CLOUD::SetFocusToFirstVisibleItemL() visIndex=%d", visIndex); |
|
2026 |
|
2027 if (visIndex != KErrNotFound) |
|
2028 { |
|
2029 iMediaList.SetFocusL(NGlxListDefs::EAbsolute, visIndex); |
|
2030 |
|
2031 MoveUpIfRequired(); |
|
2032 } |
|
2033 else |
|
2034 { |
|
2035 HandleLayoutFocusChange(); |
1985 } |
2036 } |
1986 } |
2037 } |
1987 |
2038 |
1988 //End of file |
2039 //End of file |