267 // --------------------------------------------------------------------------- |
270 // --------------------------------------------------------------------------- |
268 // |
271 // |
269 TInt CGlxCloudViewControl::LayoutVisibleRows(TPoint aStartPoint,TInt aRowStartIndex |
272 TInt CGlxCloudViewControl::LayoutVisibleRows(TPoint aStartPoint,TInt aRowStartIndex |
270 , TInt aRowEndIndex) |
273 , TInt aRowEndIndex) |
271 { |
274 { |
272 TRACER("CGlxCloudViewControl::LayoutVisibleRows"); |
275 TRACER("GLX_CLOUD::CGlxCloudViewControl::DrawRow"); |
273 TSize vsize; |
276 TSize vsize; |
274 TPoint tl, br; |
277 TPoint tl, br; |
275 tl = aStartPoint; |
278 tl = aStartPoint; |
276 br.iX = 0; |
|
277 br.iY = tl.iY + KRowHeight; |
279 br.iY = tl.iY + KRowHeight; |
278 const TInt KMaxScreenWidth = iTagScreenWidth - iScrollPaneHandle.iW; |
|
279 //drawing in reverse for arabic hebrew support |
280 //drawing in reverse for arabic hebrew support |
280 if ( GlxGeneralUiUtilities::LayoutIsMirrored ()) |
281 if ( GlxGeneralUiUtilities::LayoutIsMirrored ()) |
281 { |
282 { |
282 GLX_LOG_INFO("Mirrorred Layout"); |
283 br.iX = aStartPoint.iX; |
283 //In Mirrored layout, 'BottomRight' considers scrollpane width for each row |
284 const TInt KMaxScreenWidth = iTagScreenWidth - iScrollPaneHandle.iW; |
284 br.iX = aStartPoint.iX - iScrollPaneHandle.iW; |
|
285 //Set the positions of tags in a row. |
285 //Set the positions of tags in a row. |
286 for (TInt j = aRowStartIndex; j <= aRowEndIndex; j++) |
286 for (TInt j = aRowStartIndex; j <= aRowEndIndex; j++) |
287 { |
287 { |
288 vsize = iLabels[j]->TextExtents(); |
288 vsize = iLabels[j]->TextExtents (); |
289 if ( vsize.iWidth < KMinTagSize ) |
289 if ( vsize.iWidth < KMinTagSize ) |
290 { |
290 { |
291 vsize.iWidth = KMinTagSize; |
291 vsize.iWidth = KMinTagSize; |
292 } |
292 } |
293 //If the size of the tag is more than the screen size then wrap it |
293 //If the size of the tag is more than the screen size then wrap it |
294 if (vsize.iWidth > KMaxScreenWidth) |
294 if (vsize.iWidth > KMaxScreenWidth) |
295 { |
295 { |
296 TAlfRealSize tagSize( KMaxScreenWidth, br.iY ); |
296 TAlfRealSize tagSize( KMaxScreenWidth, br.iY ); |
297 iLabels[j]->SetWrapping( CAlfTextVisual::ELineWrapTruncate ); |
297 iLabels[j]->SetWrapping( CAlfTextVisual::ELineWrapTruncate ); |
|
298 vsize = iLabels[j]->TextExtents (); |
298 tl.iX -= aStartPoint.iX; |
299 tl.iX -= aStartPoint.iX; |
299 tl.iY = aStartPoint.iY; |
300 tl.iY = aStartPoint.iY; |
300 br.iX = tagSize.iWidth; |
301 br.iX = tagSize.iWidth; |
301 } |
302 } |
302 else |
303 else |
303 { |
304 { |
304 tl.iX = br.iX - vsize.iWidth; |
305 tl.iX -= (vsize.iWidth + KColSpace); |
305 } |
306 } |
306 |
|
307 //Set the anchor points for the tags |
307 //Set the anchor points for the tags |
308 iLayout->SetAnchor (EAlfAnchorTopLeft, iLayoutIndex, |
308 iLayout->SetAnchor (EAlfAnchorTopLeft, iLayoutIndex, |
309 EAlfAnchorOriginLeft, EAlfAnchorOriginTop, |
309 EAlfAnchorOriginLeft, EAlfAnchorOriginTop, |
310 EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, |
310 EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, |
311 TAlfTimedPoint (tl.iX, tl.iY)); |
311 TAlfTimedPoint (tl.iX, tl.iY)); |
312 iLayout->SetAnchor (EAlfAnchorBottomRight, iLayoutIndex, |
312 iLayout->SetAnchor (EAlfAnchorBottomRight, iLayoutIndex, |
313 EAlfAnchorOriginLeft, EAlfAnchorOriginTop, |
313 EAlfAnchorOriginLeft, EAlfAnchorOriginTop, |
314 EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, |
314 EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, |
315 TAlfTimedPoint (br.iX, br.iY)); |
315 TAlfTimedPoint (br.iX, br.iY)); |
316 //Bottom-Right corner for next tag in same row |
|
317 br.iX -= (vsize.iWidth + KColSpace); |
316 br.iX -= (vsize.iWidth + KColSpace); |
318 iLayoutIndex += 1; |
317 iLayoutIndex += 1; |
319 } |
318 } |
|
319 |
320 } |
320 } |
321 else |
321 else |
322 { |
322 { |
323 GLX_LOG_INFO("NOT Mirrorred Layout"); |
323 const TInt KMaxScreenWidth = iTagScreenWidth - iScrollPaneHandle.iW; |
324 for (TInt j = aRowStartIndex; j <= aRowEndIndex; j++) |
324 for (TInt j = aRowStartIndex; j <= aRowEndIndex; j++) |
325 { |
325 { |
326 vsize = iLabels[j]->TextExtents(); |
326 vsize = iLabels[j]->TextExtents (); |
327 if( vsize.iWidth < KMinTagSize ) |
327 if( vsize.iWidth < KMinTagSize ) |
328 { |
328 { |
329 vsize.iWidth = KMinTagSize; |
329 vsize.iWidth = KMinTagSize; |
330 } |
330 } |
331 if (vsize.iWidth > KMaxScreenWidth) |
331 if (vsize.iWidth > KMaxScreenWidth) |
332 { |
332 { |
333 TAlfRealSize tagSize( KMaxScreenWidth, br.iY ); |
333 TAlfRealSize tagSize( KMaxScreenWidth, br.iY ); |
|
334 TAlfRealPoint startPos( aStartPoint.iX, 0 ); |
334 iLabels[j]->SetWrapping( CAlfTextVisual::ELineWrapTruncate ); |
335 iLabels[j]->SetWrapping( CAlfTextVisual::ELineWrapTruncate ); |
335 tl.iX = aStartPoint.iX; |
336 tl.iX = aStartPoint.iX; |
336 tl.iY = aStartPoint.iY; |
337 tl.iY = aStartPoint.iY; |
337 br.iX = tagSize.iWidth; |
338 br.iX = tagSize.iWidth; |
338 } |
339 } |
339 else |
340 else |
340 { |
341 { |
341 br.iX = tl.iX + vsize.iWidth; |
342 br.iX += vsize.iWidth + KColSpace; |
342 } |
343 } |
343 |
|
344 iLayout->SetAnchor (EAlfAnchorTopLeft, iLayoutIndex, |
344 iLayout->SetAnchor (EAlfAnchorTopLeft, iLayoutIndex, |
345 EAlfAnchorOriginLeft, EAlfAnchorOriginTop, |
345 EAlfAnchorOriginLeft, EAlfAnchorOriginTop, |
346 EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, |
346 EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, |
347 TAlfTimedPoint (tl.iX, tl.iY)); |
347 TAlfTimedPoint (tl.iX, tl.iY)); |
348 iLayout->SetAnchor (EAlfAnchorBottomRight, iLayoutIndex, |
348 iLayout->SetAnchor (EAlfAnchorBottomRight, iLayoutIndex, |
349 EAlfAnchorOriginLeft, EAlfAnchorOriginTop, |
349 EAlfAnchorOriginLeft, EAlfAnchorOriginTop, |
350 EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, |
350 EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, |
351 TAlfTimedPoint (br.iX, br.iY)); |
351 TAlfTimedPoint (br.iX, br.iY)); |
352 //Top-Left Corner for next tag in same row |
352 tl.iX = br.iX; |
353 tl.iX += (vsize.iWidth + KColSpace); |
|
354 iLayoutIndex += 1; |
353 iLayoutIndex += 1; |
355 } |
354 } |
356 } |
355 } |
357 return 0; |
356 return 0; |
358 } |
357 } |
|
358 |
|
359 |
|
360 |
359 |
361 |
360 // --------------------------------------------------------------------------- |
362 // --------------------------------------------------------------------------- |
361 // LayoutVisibleArea() |
363 // LayoutVisibleArea() |
362 // |
364 // |
363 // --------------------------------------------------------------------------- |
365 // --------------------------------------------------------------------------- |
364 void CGlxCloudViewControl::LayoutVisibleArea() |
366 void CGlxCloudViewControl::LayoutVisibleArea() |
365 { |
367 { |
366 TRACER("CGlxCloudViewControl::LayoutVisibleArea"); |
|
367 //screen height for boundary check:how many rows fit in. |
368 //screen height for boundary check:how many rows fit in. |
368 //find out how many rows can fit in. |
369 //find out how many rows can fit in. |
369 //add upper and lower margin spacing 5 pixels |
370 //add upper and lower margin spacing 5 pixels |
370 |
371 |
371 //draw the row on screens |
372 //draw the row on screens |
374 //If the layout is arabic hebrew then start positioning of tags from end |
375 //If the layout is arabic hebrew then start positioning of tags from end |
375 if ( GlxGeneralUiUtilities::LayoutIsMirrored ()) |
376 if ( GlxGeneralUiUtilities::LayoutIsMirrored ()) |
376 { |
377 { |
377 startpoint.iX = iTagScreenWidth - KRightmargin; |
378 startpoint.iX = iTagScreenWidth - KRightmargin; |
378 } |
379 } |
379 //else start from beginning |
380 |
|
381 //else start from biginning |
380 else |
382 else |
381 { |
383 { |
382 startpoint.iX = KLeftMargin; |
384 startpoint.iX = KLeftMargin; |
383 } |
385 } |
384 startpoint.iY = KNumMinRowSpace; |
386 startpoint.iY = KNumMinRowSpace; |
385 |
|
386 //associate the active visuals with anchor layout |
387 //associate the active visuals with anchor layout |
387 GLX_LOG_INFO("GLX_CLOUD ::CGlxCloudViewControl::::LayoutVisibleArea Layout reset"); |
388 GLX_LOG_INFO("GLX_CLOUD ::CGlxCloudViewControl::::LayoutVisibleArea Layout reset"); |
388 GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::::LayoutVisibleArea layout Count after reset %d ", iLayout->Count ()); |
389 GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::::LayoutVisibleArea layout Count after reset %d ", iLayout->Count ()); |
389 GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::::LayoutVisibleArea iCloudInfo[0].iStartIndex %d ", iCloudInfo[0].iStartIndex); |
390 GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::::LayoutVisibleArea iCloudInfo[0].iStartIndex %d ", iCloudInfo[0].iStartIndex); |
390 TInt endindex = iCloudInfo.Count()-1; |
391 TInt endindex = iCloudInfo.Count()-1; |
391 |
392 |
392 for (TInt j = iCloudInfo[0].iStartIndex; j <=iCloudInfo[endindex].iEndIndex; j++) |
393 for (TInt j = iCloudInfo[0].iStartIndex; j <=iCloudInfo[endindex].iEndIndex; j++) |
393 { |
394 { |
394 GLX_LOG_INFO("GLX_CLOUD ::CGlxCloudViewControl::::FindEndRowIndex Entering layout append"); |
395 GLX_LOG_INFO("GLX_CLOUD ::CGlxCloudViewControl::::FindEndRowIndex Entering layout append"); |
395 |
396 |
|
397 |
396 TAlfTimedValue opacity; |
398 TAlfTimedValue opacity; |
397 opacity.SetValueNow(1.0); // immediate change |
399 opacity.SetValueNow(1.0); // immediate change |
398 iLabels[j]->SetOpacity(opacity); |
400 iLabels[j]->SetOpacity(opacity); |
399 } |
401 } |
400 |
402 |
401 GLX_LOG_INFO("GLX_CLOUD ::CGlxCloudViewControl::::LayoutVisibleArea Exiting layout append"); |
403 GLX_LOG_INFO("GLX_CLOUD ::CGlxCloudViewControl::::LayoutVisibleArea Exiting layout append"); |
402 iLayoutIndex = 0; |
404 iLayoutIndex = 0; |
403 GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::::LayoutVisibleArea layout Count realloc %d ", iLayout->Count ()); |
405 GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::::LayoutVisibleArea layout Count realloc %d ", iLayout->Count ()); |
404 TInt totalHeight = 0; |
406 for (TInt j = 0; j <= iEndRowIndex; j++) |
405 for (TInt j = 0; j <= iCloudInfo.Count() - 1; j++) |
|
406 { |
407 { |
407 GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::::LayoutVisibleArea Drawing row started %d ", j); |
408 GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::::LayoutVisibleArea Drawing row started %d ", j); |
408 LayoutVisibleRows (startpoint,iCloudInfo[j].iStartIndex, |
409 LayoutVisibleRows (startpoint,iCloudInfo[j].iStartIndex, |
409 iCloudInfo[j].iEndIndex); |
410 iCloudInfo[j].iEndIndex); |
410 startpoint.iY += KRowHeight + KNumMinRowSpace; |
411 startpoint.iY += KRowHeight + KNumMinRowSpace; |
411 |
412 } |
|
413 TInt totalHeight = 0; |
|
414 for (TInt j = 0; j <= iCloudInfo.Count()-1; j++) |
|
415 { |
412 totalHeight+=KRowHeight; |
416 totalHeight+=KRowHeight; |
413 totalHeight+=KNumMinRowSpace; |
417 totalHeight+=KNumMinRowSpace; |
414 } |
418 } |
415 |
419 |
416 //Set the virtual size of viewport to the total size of anchor. |
420 //Set the virtual size of viewport to the total size of anchor. |
441 { |
445 { |
442 ((IAlfScrollBarModel *)(iScrollBarWidget->model()))->changeData(iScrollEventData.mSpan, |
446 ((IAlfScrollBarModel *)(iScrollBarWidget->model()))->changeData(iScrollEventData.mSpan, |
443 iScrollEventData.mViewLength, |
447 iScrollEventData.mViewLength, |
444 0); |
448 0); |
445 DisplayScrollBar(); |
449 DisplayScrollBar(); |
446 } |
450 } |
|
451 //constructing the bubblecontainer |
|
452 CreateBubleContainer(); |
447 |
453 |
448 iLayout->UpdateChildrenLayout (); //update layout |
454 iLayout->UpdateChildrenLayout (); //update layout |
449 |
455 |
450 HandleLayoutFocusChange (); |
456 HandleLayoutFocusChange (); |
451 |
457 |
452 MoveDownIfRequired(); |
458 MoveDownIfRequired(); |
453 } |
459 } |
454 |
460 |
|
461 |
455 // --------------------------------------------------------------------------- |
462 // --------------------------------------------------------------------------- |
456 // OfferEventL() |
463 // OfferEventL() |
457 // --------------------------------------------------------------------------- |
464 // --------------------------------------------------------------------------- |
458 // |
465 // |
459 TBool CGlxCloudViewControl::OfferEventL(const TAlfEvent &aEvent) |
466 TBool CGlxCloudViewControl::OfferEventL(const TAlfEvent &aEvent) |
460 { |
467 { TRACER("GLX_CLOUD:: CGlxCloudViewControl::OfferEventL"); |
461 TRACER("GLX_CLOUD:: CGlxCloudViewControl::OfferEventL"); |
|
462 |
468 |
463 //check if key inputs needs handling |
469 //check if key inputs needs handling |
464 TBool consumed = EFalse; |
470 TBool consumed = EFalse; |
465 if (iLabels.Count() == 0) |
471 if ( ( iLabels.Count () == 0 ) ) |
466 { |
472 { |
467 GLX_LOG_INFO( "GLX_CLOUD ::CGlxCloudViewControl::offerkeyeventL no key press returning "); |
473 GLX_LOG_INFO( "GLX_CLOUD ::CGlxCloudViewControl::offerkeyeventL no key press returning "); |
468 return EFalse; //return as no futher processing is required |
474 return EFalse; //return as no futher processing is required |
469 } |
475 } |
470 |
476 |
471 if (aEvent.IsKeyEvent() && iTagsContextMenuControl->ItemMenuVisibility()) |
|
472 { |
|
473 // Hide the context menu, if visible |
|
474 ShowContextItemMenuL(EFalse); |
|
475 } |
|
476 |
|
477 if ( aEvent.IsKeyEvent ()&& aEvent.Code() == EEventKey ) |
477 if ( aEvent.IsKeyEvent ()&& aEvent.Code() == EEventKey ) |
478 { |
478 { |
479 switch (aEvent.KeyEvent().iCode) |
479 switch (aEvent.KeyEvent().iCode) |
480 { |
480 { |
|
481 //@ EABI-7R7FRU Fute failure: Tag views enter key has no functionality. |
481 case EKeyEnter : |
482 case EKeyEnter : |
482 case EKeyDevice3: |
483 case EKeyDevice3: |
483 { |
484 { |
484 if (iShowFocus) |
485 iObserverEnterKeyEvent.HandleEnterKeyEventL( (TInt)EAknCmdOpen ); |
|
486 consumed= ETrue; |
|
487 } |
|
488 break; |
|
489 case EKeyUpArrow: |
|
490 { |
|
491 if(iCloudInfo.Count() >1 ) |
485 { |
492 { |
486 iShowFocus = EFalse; |
493 HandleKeyUpL (); |
487 iObserverEnterKeyEvent.HandleEnterKeyEventL( |
494 consumed = ETrue; |
488 (TInt) EAknCmdOpen); |
495 iFocusRowIndex = RowNumber (iMediaList.FocusIndex ()); |
|
496 |
|
497 MoveUpIfRequired(); |
|
498 } |
|
499 } |
|
500 break; |
|
501 |
|
502 case EKeyDownArrow: |
|
503 { |
|
504 if (iCloudInfo.Count() > 1) |
|
505 { |
|
506 HandleKeyDownL (); |
|
507 consumed = ETrue; |
|
508 iFocusRowIndex = RowNumber (iMediaList.FocusIndex ()); |
|
509 |
|
510 MoveDownIfRequired(); |
|
511 } |
|
512 } |
|
513 break; |
|
514 |
|
515 case EKeyLeftArrow: |
|
516 case EKeyPrevious: |
|
517 { |
|
518 // arabic hebrew change |
|
519 if ( GlxGeneralUiUtilities::LayoutIsMirrored () ) |
|
520 { |
|
521 if ( iMediaList.FocusIndex() == iMediaList.Count() - 1 ) |
|
522 { |
|
523 iMediaList.SetFocusL (NGlxListDefs::EAbsolute, 0); |
|
524 } |
|
525 else |
|
526 { |
|
527 iMediaList.SetFocusL (NGlxListDefs::EAbsolute, |
|
528 iMediaList.FocusIndex ()+ 1); |
|
529 } |
|
530 iScrollDirection = 0; |
489 } |
531 } |
490 else |
532 else |
491 { |
533 { |
492 SetFocusToFirstVisibleItemL(); |
534 if ( iMediaList.FocusIndex ()== 0 ) |
|
535 { |
|
536 iMediaList.SetFocusL (NGlxListDefs::EAbsolute, |
|
537 iMediaList.Count() - 1 ); |
|
538 } |
|
539 else |
|
540 { |
|
541 iMediaList.SetFocusL (NGlxListDefs::EAbsolute, |
|
542 iMediaList.FocusIndex ()- 1); |
|
543 } |
|
544 iScrollDirection = 1; |
493 } |
545 } |
494 consumed = ETrue; |
546 consumed = ETrue; |
|
547 TInt focusRowIndex = RowNumber (iMediaList.FocusIndex ()); |
|
548 if(iFocusRowIndex != focusRowIndex) |
|
549 { |
|
550 iFocusRowIndex = focusRowIndex; |
|
551 if( iScrollDirection == 0 ) |
|
552 { |
|
553 MoveDownIfRequired(); |
|
554 } |
|
555 else |
|
556 { |
|
557 MoveUpIfRequired(); |
|
558 } |
|
559 } |
495 } |
560 } |
|
561 |
496 break; |
562 break; |
497 case EKeyUpArrow: |
563 |
498 { |
564 case EKeyRightArrow: |
499 if (iShowFocus) |
565 case EKeyNext: |
|
566 { |
|
567 // arabic hebrew change |
|
568 if ( GlxGeneralUiUtilities::LayoutIsMirrored () ) |
500 { |
569 { |
501 HandleKeyUpL(); |
570 if ( iMediaList.FocusIndex ()== 0 ) |
502 iFocusRowIndex = RowNumber(iMediaList.FocusIndex()); |
571 { |
503 |
572 iMediaList.SetFocusL (NGlxListDefs::EAbsolute, |
504 MoveUpIfRequired(); |
573 iMediaList.Count() - 1 ); |
|
574 } |
|
575 else |
|
576 { |
|
577 iMediaList.SetFocusL (NGlxListDefs::EAbsolute, |
|
578 iMediaList.FocusIndex ()- 1); |
|
579 } |
|
580 iScrollDirection = 1; |
505 } |
581 } |
506 else |
582 else |
507 { |
583 { |
508 SetFocusToFirstVisibleItemL(); |
584 if ( iMediaList.FocusIndex ()== iMediaList.Count() - 1 ) |
509 } |
|
510 consumed = ETrue; |
|
511 } |
|
512 break; |
|
513 |
|
514 case EKeyDownArrow: |
|
515 { |
|
516 if (iShowFocus) |
|
517 { |
|
518 HandleKeyDownL(); |
|
519 iFocusRowIndex = RowNumber(iMediaList.FocusIndex()); |
|
520 |
|
521 MoveDownIfRequired(); |
|
522 } |
|
523 else |
|
524 { |
|
525 SetFocusToFirstVisibleItemL(); |
|
526 } |
|
527 consumed = ETrue; |
|
528 } |
|
529 break; |
|
530 |
|
531 case EKeyLeftArrow: |
|
532 case EKeyPrevious: |
|
533 { |
|
534 if (iShowFocus) |
|
535 { |
|
536 // arabic hebrew change |
|
537 if (GlxGeneralUiUtilities::LayoutIsMirrored()) |
|
538 { |
585 { |
539 if (iMediaList.FocusIndex() == iMediaList.Count() - 1) |
586 iMediaList.SetFocusL (NGlxListDefs::EAbsolute, 0); |
540 { |
|
541 iMediaList.SetFocusL(NGlxListDefs::EAbsolute, 0); |
|
542 } |
|
543 else |
|
544 { |
|
545 iMediaList.SetFocusL(NGlxListDefs::EAbsolute, |
|
546 iMediaList.FocusIndex() + 1); |
|
547 } |
|
548 iScrollDirection = 0; |
|
549 } |
587 } |
550 else |
588 else |
551 { |
589 { |
552 if (iMediaList.FocusIndex() == 0) |
590 iMediaList.SetFocusL (NGlxListDefs::EAbsolute, |
553 { |
591 iMediaList.FocusIndex ()+ 1); |
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; |
|
563 } |
592 } |
564 TInt focusRowIndex = RowNumber(iMediaList.FocusIndex()); |
593 iScrollDirection = 0; |
565 if (iFocusRowIndex != focusRowIndex) |
594 } |
566 { |
595 TInt focusRowIndex = RowNumber (iMediaList.FocusIndex ()); |
567 iFocusRowIndex = focusRowIndex; |
596 |
568 if (iScrollDirection == 0) |
597 if( iFocusRowIndex != focusRowIndex ) |
569 { |
598 { |
570 MoveDownIfRequired(); |
599 iFocusRowIndex = focusRowIndex; |
571 } |
600 if( iScrollDirection == 1 ) |
572 else |
601 { |
573 { |
602 MoveUpIfRequired(); |
574 MoveUpIfRequired(); |
603 } |
575 } |
604 else |
|
605 { |
|
606 MoveDownIfRequired(); |
576 } |
607 } |
577 } |
608 } |
578 else |
609 } |
579 { |
|
580 SetFocusToFirstVisibleItemL(); |
|
581 } |
|
582 consumed = ETrue; |
610 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()) |
|
593 { |
|
594 if (iMediaList.FocusIndex() == 0) |
|
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; |
|
605 } |
|
606 else |
|
607 { |
|
608 if (iMediaList.FocusIndex() == iMediaList.Count() - 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; |
|
618 } |
|
619 TInt focusRowIndex = RowNumber(iMediaList.FocusIndex()); |
|
620 |
|
621 if (iFocusRowIndex != focusRowIndex) |
|
622 { |
|
623 iFocusRowIndex = focusRowIndex; |
|
624 if (iScrollDirection == 1) |
|
625 { |
|
626 MoveUpIfRequired(); |
|
627 } |
|
628 else |
|
629 { |
|
630 MoveDownIfRequired(); |
|
631 } |
|
632 } |
|
633 } |
|
634 else |
|
635 { |
|
636 SetFocusToFirstVisibleItemL(); |
|
637 } |
|
638 consumed = ETrue; |
|
639 } |
|
640 break; |
611 break; |
641 |
612 |
642 default: |
613 default: |
643 break; |
614 break; |
644 } |
615 } |
710 // |
682 // |
711 void CGlxCloudViewControl::HandleLayoutFocusChange() |
683 void CGlxCloudViewControl::HandleLayoutFocusChange() |
712 { |
684 { |
713 TRACER("GLX_CLOUD::CGlxCloudViewControl::HandleLayoutFocusChange"); |
685 TRACER("GLX_CLOUD::CGlxCloudViewControl::HandleLayoutFocusChange"); |
714 |
686 |
715 if ((iShowFocus || !iUiUtility->IsPenSupported()) && (iLabels.Count() - 1 |
687 if ( iLabels.Count()-1 >= iMediaList.FocusIndex()) |
716 >= iMediaList.FocusIndex())) |
|
717 { |
688 { |
718 //to highlight focused element |
689 //to highlight focused element |
719 SetFocusColor(); |
690 SetFocusColor(); |
720 } |
691 } |
721 } |
692 } |
|
693 |
722 |
694 |
723 // --------------------------------------------------------------------------- |
695 // --------------------------------------------------------------------------- |
724 // FocusUpdate() |
696 // FocusUpdate() |
725 // --------------------------------------------------------------------------- |
697 // --------------------------------------------------------------------------- |
726 // |
698 // |
727 void CGlxCloudViewControl::FocusUpdate() |
699 void CGlxCloudViewControl::FocusUpdate() |
728 { |
700 { |
729 TRACER("GLX_CLOUD::CGlxCloudViewControl::FocusUpdate"); |
701 TRACER("GLX_CLOUD::CGlxCloudViewControl::FocusUpdate"); |
730 iFocusRowIndex = RowNumber(iMediaList.FocusIndex()); |
702 GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::FocusUpdate HighLighted RowNum %d ",iFocusRowIndex); |
731 GLX_LOG_INFO1("GLX_CLOUD::FocusUpdate iFocusRowIndex=%d", |
703 GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::FocusUpdate End RowNumn %d ",iCloudInfo.Count()-1); |
732 iFocusRowIndex); |
704 iFocusRowIndex = RowNumber (iMediaList.FocusIndex ()); |
|
705 iEndRowIndex = iCloudInfo.Count()-1; |
733 LayoutVisibleArea(); |
706 LayoutVisibleArea(); |
734 } |
707 } |
|
708 |
735 |
709 |
736 // --------------------------------------------------------------------------- |
710 // --------------------------------------------------------------------------- |
737 // ResetLayout() |
711 // ResetLayout() |
738 // --------------------------------------------------------------------------- |
712 // --------------------------------------------------------------------------- |
739 // |
713 // |
1273 |
1260 |
1274 // --------------------------------------------------------------------------- |
1261 // --------------------------------------------------------------------------- |
1275 // SetFocusColor() |
1262 // SetFocusColor() |
1276 // --------------------------------------------------------------------------- |
1263 // --------------------------------------------------------------------------- |
1277 // |
1264 // |
1278 void CGlxCloudViewControl::SetFocusColor() |
1265 void CGlxCloudViewControl::SetFocusColor() |
1279 { |
1266 { |
1280 TRACER("GLX_CLOUD::CGlxCloudViewControl::SetFocusColor"); |
1267 iLabels[iMediaList.FocusIndex()]->SetColor (KAknsIIDQsnHighlightColors ,EAknsCIQsnHighlightColorsCG3); |
1281 if (iMediaList.Count()) |
1268 } |
1282 { |
1269 |
1283 iLabels[iMediaList.FocusIndex()]->SetColor( |
1270 |
1284 KAknsIIDQsnHighlightColors, EAknsCIQsnHighlightColorsCG3); |
1271 // --------------------------------------------------------------------------- |
1285 } |
1272 // SetBubleMidPoint() |
1286 } |
1273 // --------------------------------------------------------------------------- |
1287 |
1274 // |
1288 // --------------------------------------------------------------------------- |
1275 void CGlxCloudViewControl::SetBubleMidPoint(TPoint& aMidPoint) |
1289 // ResetFocusColor() |
1276 { |
1290 // --------------------------------------------------------------------------- |
1277 TRACER("GLX_CLOUD::CGlxCloudViewControl::SetBubleMidPoint"); |
1291 // |
1278 //Substract the viewport position so as to set the buble at the right position on the screen |
1292 void CGlxCloudViewControl::ResetFocusColor() |
1279 aMidPoint.iX-=iViewPortPosition.iX; |
1293 { |
1280 aMidPoint.iY-=iViewPortPosition.iY; |
1294 TRACER("GLX_CLOUD::CGlxCloudViewControl::ResetFocusColor"); |
1281 } |
1295 if (iMediaList.Count()) |
1282 |
1296 { |
1283 // --------------------------------------------------------------------------- |
1297 iLabels[iMediaList.FocusIndex()]->SetColor(KAknsIIDQsnTextColors, |
1284 // CreateBubleContainer() |
1298 EAknsCIQsnTextColorsCG6); |
1285 // --------------------------------------------------------------------------- |
1299 } |
1286 // |
|
1287 void CGlxCloudViewControl::CreateBubleContainer() |
|
1288 { |
1300 } |
1289 } |
1301 |
1290 |
1302 // --------------------------------------------------------------------------- |
1291 // --------------------------------------------------------------------------- |
1303 // MoveUpIfRequired() |
1292 // MoveUpIfRequired() |
1304 // --------------------------------------------------------------------------- |
1293 // --------------------------------------------------------------------------- |
1305 // |
1294 // |
1306 void CGlxCloudViewControl::MoveUpIfRequired() |
1295 void CGlxCloudViewControl::MoveUpIfRequired() |
1307 { |
1296 { |
1308 TRACER("GLX_CLOUD::CGlxCloudViewControl::MoveUpIfRequired"); |
1297 TRACER("GLX_CLOUD::CGlxCloudViewControl::MoveUpIfRequired"); |
1309 TInt focusIndex = iMediaList.FocusIndex(); |
|
1310 |
|
1311 //get the focused item's position |
1298 //get the focused item's position |
1312 TPoint point; |
1299 TPoint point; |
1313 iLayout->ChildPos(focusIndex,point); |
1300 iLayout->ChildPos(iMediaList.FocusIndex(),point); |
1314 TSize size; |
1301 TSize size; |
1315 iLayout->ChildSize(focusIndex,size); |
1302 iLayout->ChildSize(iMediaList.FocusIndex(),size); |
1316 |
1303 TInt focus = iMediaList.FocusIndex(); |
1317 TInt rownumber = RowNumber(focusIndex); |
1304 TInt rownumber = RowNumber(focus); |
1318 //if the focused item is not visible then move the viewport |
1305 //if the focused item is not visible then move the viewport |
1319 if(point.iY < iViewPortPosition.iY) |
1306 if(point.iY < iViewPortPosition.iY) |
1320 { |
1307 { |
1321 //set the new position of viewport |
1308 //set the new position of viewport |
1322 TInt offset = iViewPortPosition.iY - point.iY; |
1309 TInt offeset = iViewPortPosition.iY - point.iY; |
1323 iViewPortPosition.iY-=offset; |
1310 iViewPortPosition.iY-=offeset; |
1324 if( (iViewPortPosition.iY < 0) ) |
1311 if( (iViewPortPosition.iY < 0) ) |
1325 { |
1312 { |
1326 iViewPortPosition.iY = 0; |
1313 iViewPortPosition.iY = 0; |
1327 } |
1314 } |
1328 } |
1315 } |
1334 iViewPortLayout->SetViewportPos(iViewPortPosition, KSlowCloudMovement); |
1321 iViewPortLayout->SetViewportPos(iViewPortPosition, KSlowCloudMovement); |
1335 iScrollEventData.mViewStartPos = iViewPortPosition.iY; |
1322 iScrollEventData.mViewStartPos = iViewPortPosition.iY; |
1336 Scroll(); |
1323 Scroll(); |
1337 } |
1324 } |
1338 |
1325 |
|
1326 |
1339 // --------------------------------------------------------------------------- |
1327 // --------------------------------------------------------------------------- |
1340 // MoveDownIfRequired() |
1328 // MoveDownIfRequired() |
1341 // --------------------------------------------------------------------------- |
1329 // --------------------------------------------------------------------------- |
1342 // |
1330 // |
1343 void CGlxCloudViewControl::MoveDownIfRequired() |
1331 void CGlxCloudViewControl::MoveDownIfRequired() |
1344 { |
1332 { |
1345 TRACER("GLX_CLOUD::CGlxCloudViewControl::MoveDownIfRequired"); |
1333 TRACER("GLX_CLOUD::CGlxCloudViewControl::MoveDownIfRequired"); |
1346 TInt focusIndex = iMediaList.FocusIndex(); |
|
1347 |
|
1348 //get the focused item's position |
1334 //get the focused item's position |
1349 TPoint point; |
1335 TPoint point; |
1350 iLayout->ChildPos(focusIndex, point); |
1336 iLayout->ChildPos(iMediaList.FocusIndex(),point); |
1351 TSize size; |
1337 TSize size; |
1352 iLayout->ChildSize(focusIndex, size); |
1338 iLayout->ChildSize(iMediaList.FocusIndex(),size); |
1353 |
1339 //if the focused visual is not visible then move the viewport |
1354 //Reset viewport position for cases: |
1340 if(point.iY+size.iHeight > iViewPortPosition.iY+iViewPortSize.iHeight ) |
1355 //case 1)Focus index is first item |
1341 { |
1356 if (focusIndex == 0) |
1342 //set the new position of viewport |
1357 { |
1343 TInt offeset = (point.iY+size.iHeight) - (iViewPortPosition.iY+iViewPortSize.iHeight); |
1358 iViewPortPosition.iY = 0; |
1344 iViewPortPosition.iY+=offeset; |
1359 } |
1345 if( (iViewPortPosition.iY > iViewPortVirtualSize.iHeight) ) |
1360 //case 2)Focused item is in last screen |
1346 { |
1361 else if( point.iY > (iViewPortVirtualSize.iHeight - iViewPortSize.iHeight)) |
1347 iViewPortPosition.iY = iViewPortVirtualSize.iHeight - iViewPortSize.iHeight; |
1362 { |
1348 } |
1363 iViewPortPosition.iY = iViewPortVirtualSize.iHeight - iViewPortSize.iHeight; |
1349 } |
1364 } |
1350 //if its key event then it should be cyclic |
1365 else |
1351 else if (iMediaList.FocusIndex() == 0) |
1366 { |
1352 { |
1367 iViewPortPosition.iY = point.iY + KNumMinRowSpace; |
1353 iViewPortPosition.iY = 0; |
1368 } |
1354 } |
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); |
|
1378 iViewPortLayout->SetViewportPos(iViewPortPosition, KSlowCloudMovement); |
1355 iViewPortLayout->SetViewportPos(iViewPortPosition, KSlowCloudMovement); |
1379 iScrollEventData.mViewStartPos = iViewPortPosition.iY; |
1356 iScrollEventData.mViewStartPos = iViewPortPosition.iY; |
1380 if(iScrollBarWidget) |
1357 if(iScrollBarWidget) |
1381 { |
1358 { |
1382 Scroll(); |
1359 Scroll(); |
1383 } |
1360 } |
1384 } |
1361 } |
|
1362 |
|
1363 // --------------------------------------------------------------------------- |
|
1364 // MoveDownIfRequired() |
|
1365 // --------------------------------------------------------------------------- |
|
1366 // |
|
1367 void CGlxCloudViewControl::CalculateBubleMidPoint() |
|
1368 { |
|
1369 TRACER("GLX_CLOUD::CGlxCloudViewControl::CalculateBubleMidPoint"); |
|
1370 TPoint midpoint; |
|
1371 TAlfRealRect focussedItemRect; |
|
1372 TRect mainPaneRect; |
|
1373 AknLayoutUtils::LayoutMetricsRect (AknLayoutUtils::EMainPane, mainPaneRect); |
|
1374 |
|
1375 CAlfVisual& visual = iLayout->Visual( iMediaList.FocusIndex() ); |
|
1376 focussedItemRect = visual.DisplayRect(); |
|
1377 |
|
1378 if( GlxGeneralUiUtilities::LayoutIsMirrored () ) |
|
1379 { |
|
1380 midpoint.iX = focussedItemRect.iBr.iX + |
|
1381 ((focussedItemRect.iTl.iX - focussedItemRect.iBr.iX )/2); |
|
1382 } |
|
1383 |
|
1384 else |
|
1385 { |
|
1386 midpoint.iX=focussedItemRect.iTl.iX + |
|
1387 ((focussedItemRect.iBr.iX - focussedItemRect.iTl.iX )/2); |
|
1388 } |
|
1389 |
|
1390 midpoint.iY=focussedItemRect.iTl.iY+ |
|
1391 ((focussedItemRect.iBr.iY - focussedItemRect.iTl.iY )/2); |
|
1392 TPoint anchorRect; |
|
1393 |
|
1394 //Get the position of anchor layout |
|
1395 iViewPortLayout->ChildPos (0, anchorRect); |
|
1396 |
|
1397 //Add the differance to the midpoint |
|
1398 midpoint.iX+=anchorRect.iX; |
|
1399 midpoint.iY+=anchorRect.iY; |
|
1400 |
|
1401 //Substract from the viewport position the viewport position |
|
1402 SetBubleMidPoint(midpoint); |
|
1403 } |
1385 |
1404 |
1386 // --------------------------------------------------------------------------- |
1405 // --------------------------------------------------------------------------- |
1387 // HandlePointerEventL() |
1406 // HandlePointerEventL() |
1388 // --------------------------------------------------------------------------- |
1407 // --------------------------------------------------------------------------- |
1389 // |
1408 // |
1390 TBool CGlxCloudViewControl::HandlePointerEventL( const TAlfEvent &aEvent ) |
1409 TBool CGlxCloudViewControl::HandlePointerEventL( const TAlfEvent &aEvent ) |
1391 { |
1410 { |
1392 TRACER("GLX_CLOUD::CGlxCloudViewControl::HandlePointerEventL"); |
1411 TRACER("GLX_CLOUD::CGlxCloudViewControl::HandlePointerEventL"); |
1393 CAlfVisual* tappedvisual = aEvent.Visual(); |
1412 CAlfVisual* tappedvisual = aEvent.Visual(); |
1394 TBool consumed = EFalse; |
1413 TBool consumed = EFalse; |
1822 |
1833 |
1823 // --------------------------------------------------------------------------- |
1834 // --------------------------------------------------------------------------- |
1824 // DisplayScrollBar() |
1835 // DisplayScrollBar() |
1825 // --------------------------------------------------------------------------- |
1836 // --------------------------------------------------------------------------- |
1826 // |
1837 // |
1827 void CGlxCloudViewControl::DisplayScrollBar() |
1838 void CGlxCloudViewControl::DisplayScrollBar() |
1828 { |
1839 { |
1829 TRACER("GLX_CLOUD::CGlxCloudViewControl::DisplayScrollBar()"); |
|
1830 if (iScrollBarWidget) |
1840 if (iScrollBarWidget) |
1831 { |
1841 { |
1832 IAlfElement* vertBaseElement =(iScrollBarWidget->control()->findElement ("BaseElement")); |
1842 IAlfElement* vertBaseElement =(iScrollBarWidget->control()->findElement ("BaseElement")); |
1833 IAlfScrollBarDefaultBaseElement* scrollbarbaselement=static_cast<IAlfScrollBarDefaultBaseElement*> ( |
1843 IAlfScrollBarDefaultBaseElement* scrollbarbaselement=static_cast<IAlfScrollBarDefaultBaseElement*> ( |
1834 vertBaseElement->makeInterface (IAlfScrollBarDefaultBaseElement::type() ) ); |
1844 vertBaseElement->makeInterface (IAlfScrollBarDefaultBaseElement::type() ) ); |
1835 |
1845 |
1836 TInt totalHeight = 0; |
1846 // To set the scrollbar visibility, it's enough to set the opacity |
1837 for (TInt index = 0; index <= iCloudInfo.Count() - 1; index++) |
1847 // of baselayout. No need to set the opacity of thumb separately. |
1838 { |
1848 if (iScrollEventData.mSpan) |
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) |
|
1848 { |
1849 { |
1849 //make scroll bar visible |
1850 //make scroll bar visible |
1850 GLX_LOG_INFO("GLX_CLOUD: Make scrollbar visible!"); |
|
1851 scrollbarbaselement->setOpacity(1.0); |
1851 scrollbarbaselement->setOpacity(1.0); |
1852 } |
1852 } |
1853 else |
1853 else |
1854 { |
1854 { |
1855 //make scroll bar invisible |
1855 //make scroll bar invisible |
1866 { |
1866 { |
1867 TRect rect; |
1867 TRect rect; |
1868 AknLayoutUtils::LayoutMetricsRect (AknLayoutUtils::EMainPane, rect); |
1868 AknLayoutUtils::LayoutMetricsRect (AknLayoutUtils::EMainPane, rect); |
1869 if ((rect.Width() != (iTagScreenWidth + KRightmargin)) || (rect.Height() != iScreenHeight)) |
1869 if ((rect.Width() != (iTagScreenWidth + KRightmargin)) || (rect.Height() != iScreenHeight)) |
1870 { |
1870 { |
1871 //set the new screen dimensions |
1871 //set the new screen dimensions |
1872 iScreenHeight = rect.Height(); |
1872 iScreenHeight=rect.Height(); |
1873 iTagScreenWidth = rect.Width() - KRightmargin; |
1873 iTagScreenWidth = rect.Width()- KRightmargin; |
1874 if (IsLandscape()) |
1874 if(IsLandscape()) |
1875 { |
1875 { |
1876 iTagScreenHeight = rect.Height(); |
1876 iTagScreenHeight = rect.Height(); |
1877 } |
1877 } |
1878 else |
1878 else |
1879 { |
1879 { |
1880 iTagScreenHeight = KTagScreenHeight; |
1880 iTagScreenHeight = KTagScreenHeight; |
1881 } |
1881 } |
1882 |
1882 |
1883 iViewPortLayout->SetSize( |
1883 iViewPortLayout->SetSize(TAlfRealSize(iTagScreenWidth,iTagScreenHeight), 0); |
1884 TAlfRealSize(iTagScreenWidth, iTagScreenHeight), 0); |
1884 //delete all layout associations |
1885 //delete all layout associations |
1885 if ( iCloudInfo.Count ()!= 0)//check for the empty cloud view |
1886 if (iCloudInfo.Count() != 0)//check for the empty cloud view |
1886 { |
1887 { |
1887 UpdateLayout(); |
1888 UpdateLayout(); |
1888 FetchAttributeFromCacheL(); |
1889 FetchAttributeFromCacheL(); |
1889 //generate row structures and draw rows on screen |
1890 //generate row structures and draw rows on screen |
1890 UpdateRowDataL (); |
1891 UpdateRowDataL(); |
1891 |
1892 |
1892 InitPhysicsL(); |
1893 InitPhysicsL(); |
1893 } |
1894 } |
1894 } |
1895 } |
|
1896 } |
1895 } |
1897 |
1896 |
1898 // --------------------------------------------------------------------------- |
1897 // --------------------------------------------------------------------------- |
1899 // InitPhysicsL() |
1898 // InitPhysicsL() |
1900 // --------------------------------------------------------------------------- |
1899 // --------------------------------------------------------------------------- |
1983 ((focussedItemRect.iBr.iY - focussedItemRect.iTl.iY )/2); |
1981 ((focussedItemRect.iBr.iY - focussedItemRect.iTl.iY )/2); |
1984 |
1982 |
1985 TRect rect; |
1983 TRect rect; |
1986 AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, rect); |
1984 AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, rect); |
1987 |
1985 |
1988 //only if not dragged and physics hasnt started |
1986 if(!iPhysicsStarted)//only if physics hasnt started |
1989 if (!iPhysicsStarted && !iViewDragged) |
|
1990 { |
1987 { |
1991 iTagsContextMenuControl->SetViewableRect(rect); |
1988 iTagsContextMenuControl->SetViewableRect(rect); |
1992 iTagsContextMenuControl->ShowItemMenuL(ETrue); |
1989 iTagsContextMenuControl->ShowItemMenuL(ETrue); |
1993 iTagsContextMenuControl->SetDisplay(midpoint); |
1990 iTagsContextMenuControl->SetDisplay(midpoint); |
1994 } |
1991 } |
1995 } |
1992 } |
1996 |
|
1997 // --------------------------------------------------------------------------- |
1993 // --------------------------------------------------------------------------- |
1998 // ShowContextItemMenuL() |
1994 // ShowContextItemMenuL() |
1999 // --------------------------------------------------------------------------- |
1995 // --------------------------------------------------------------------------- |
2000 // |
1996 // |
2001 void CGlxCloudViewControl::ShowContextItemMenuL(TBool aShow) |
1997 void CGlxCloudViewControl::ShowContextItemMenuL(TBool aShow) |
2002 { |
1998 { |
2003 TRACER("GLX_CLOUD::ShowContextItemMenuL"); |
|
2004 GLX_LOG_INFO1("GLX_CLOUD::ShowContextItemMenuL() aShow=%d", aShow); |
|
2005 iTagsContextMenuControl->ShowItemMenuL(aShow); |
1999 iTagsContextMenuControl->ShowItemMenuL(aShow); |
2006 if(!aShow) |
2000 if(!aShow) |
2007 { |
2001 { |
2008 iViewPortLayout->UpdateChildrenLayout(0); |
2002 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(); |
|
2036 } |
2003 } |
2037 } |
2004 } |
2038 |
2005 |
2039 //End of file |
2006 //End of file |