photosgallery/viewframework/views/cloudview/src/glxinfobubble.cpp
changeset 0 4e91876724a2
child 18 bcb43dc84c44
equal deleted inserted replaced
-1:000000000000 0:4e91876724a2
       
     1 /*
       
     2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:    Info Bubble source file
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 //Includes
       
    21 #include "glxinfobubble.h" //header file
       
    22 
       
    23 //AlfT classes
       
    24 #include <alf/alftextstylemanager.h> // For CAlfTextStyleManager
       
    25 #include <alf/alftextstyle.h> // For CAlfTextStyle
       
    26 #include <alf/alfanchorlayout.h> // For CAlfAnchorLayout
       
    27 #include <alf/alfdecklayout.h> // For CAlfDeckLayout
       
    28 #include <alf/alfimagevisual.h> // For CAlfImageVisual
       
    29 #include <alf/alftextvisual.h> // For CAlfTextVisual
       
    30 #include <alf/alfborderbrush.h> // For CAlfBorderBrush
       
    31 #include <alf/alfbrusharray.h> // For CAlfBrushArray
       
    32 
       
    33 
       
    34 #include <AknUtils.h> //main pane rect
       
    35 #include <glxicons.mbg> //gallery icons file
       
    36 #include <glxtracer.h>	
       
    37 #include <glxlog.h>	// For Logs
       
    38 #include <data_caging_path_literals.hrh> 
       
    39 #include <e32math.h> //math functions
       
    40 #include <glxgeneraluiutilities.h> 
       
    41 #include <glxuiutility.h>  // For CGlxUiUtilities
       
    42 #include <glxtexturemanager.h> // For CGlxTextureManager
       
    43 
       
    44 
       
    45 const TInt KGlxBubbleMinimumWidth(22);
       
    46 const TInt KGlxBubbleWidthOffset(65);
       
    47 const TInt KGlxBubbleThumbnailOffset(55);
       
    48 const TInt KGlxBubblePosOffset(17);
       
    49 const TInt KGlxBubbleHeight(75);
       
    50 const TInt KGlxBubblePosPreOffset( 5 );
       
    51 const TInt KGlxBubbleTextHeightPos(25);
       
    52 const TInt KGlxBubbleMaxExcluder( 78 ); // Max Space to be excluded to form the biggest bubble.
       
    53 const TInt KGlxBubbleRightStrip(5);
       
    54 
       
    55 
       
    56 _LIT(KCloudViewMifFile, "glxicons.mif");
       
    57  
       
    58 
       
    59 
       
    60 // ---------------------------------------------------------------------------
       
    61 // Default C++ Constructor
       
    62 // ---------------------------------------------------------------------------
       
    63 //
       
    64 EXPORT_C CGlxInfoBubble::CGlxInfoBubble(): 
       
    65 CAlfControl()
       
    66 	{
       
    67 	TRACER("GLX_CLOUD::CGlxInfoBubble::CGlxInfoBubble");
       
    68 	}
       
    69 
       
    70 // ---------------------------------------------------------------------------
       
    71 // ConstructL()
       
    72 // ---------------------------------------------------------------------------
       
    73 //
       
    74 EXPORT_C void CGlxInfoBubble::BaseConstructL(CAlfControl &aOwnerControl, CAlfEnv &aEnv)
       
    75 	{
       
    76 
       
    77 	TRACER("GLX_CLOUD::CGlxInfoBubble::BaseConstructL");
       
    78 	CAlfControl::ConstructL(aEnv);
       
    79 	iUiUtility = CGlxUiUtility::UtilityL();
       
    80 	iUiUtility->AddSkinChangeObserverL(*this);
       
    81 	iInfoDeck = CAlfDeckLayout::AddNewL (aOwnerControl); //deck layout is the root layout
       
    82 	//adding deck layout to anchor layout
       
    83 	iInfoDeck->SetFlags (EAlfVisualFlagManualSize);
       
    84 	iInfoDeck->SetFlags (EAlfVisualFlagManualPosition);
       
    85 	iInfoBubbleContainer = CAlfAnchorLayout::AddNewL (*this, iInfoDeck); //item container anchor layout
       
    86 	iInfoBubble = CAlfAnchorLayout::AddNewL (*this, iInfoDeck); //anchor layout for bubble
       
    87 
       
    88 	//InfoBubbleContainer associated items
       
    89 	iDeckCentreimage = CAlfImageVisual::AddNewL (*this, iInfoBubbleContainer);
       
    90 	iBubbleTextTitle = CAlfTextVisual::AddNewL (*this, iInfoBubbleContainer);
       
    91     iBubbleTextTitle->SetFlag( EAlfVisualFlagManualSize );
       
    92 	iBubbleTextTitle->SetWrapping( CAlfTextVisual::ELineWrapTruncate );	
       
    93 	iBubbleTextSubTitle = CAlfTextVisual::AddNewL (*this, iInfoBubbleContainer);
       
    94 
       
    95 	//InfoBubble components
       
    96 	iBubbleLeft= CAlfImageVisual::AddNewL (*this); //Visual for left arc of Bubble
       
    97 	iBubbleRight= CAlfImageVisual::AddNewL (*this); //Visual for rightarc of Bubble
       
    98 	iBubbleTailStrip= CAlfImageVisual::AddNewL (*this); //Visual for strip that connects to tail of Bubble
       
    99 	iBubbleTail= CAlfImageVisual::AddNewL (*this); //Visual for tail of Bubble
       
   100 	iTempTitleText = CAlfTextVisual::AddNewL (*this);//temporary visual for storing tilte
       
   101 
       
   102 	//load common components for bubble
       
   103 	iMifFile=KDC_APP_BITMAP_DIR;
       
   104 	iMifFile.Append(KCloudViewMifFile);
       
   105 	iImageBubbleLeft = iUiUtility->GlxTextureManager().CreateIconTextureL( 
       
   106 		EMbmGlxiconsQgn_graf_mediatag_bubble_side_l, iMifFile);
       
   107 	iImageBubbleRight = iUiUtility->GlxTextureManager().CreateIconTextureL(
       
   108 		EMbmGlxiconsQgn_graf_mediatag_side_r, iMifFile);
       
   109 	iImageBubbleExpand = iUiUtility->GlxTextureManager().CreateIconTextureL(
       
   110 		EMbmGlxiconsQgn_graf_mediatag_bubble_center, iMifFile);
       
   111 
       
   112 	iThumbnailBorderBrush = CAlfBorderBrush::NewL(aEnv,2, 2, 0, 0);
       
   113 	
       
   114 	//set the text properties
       
   115 	//fetching the s60 font styles
       
   116 	TInt iTypefaceSecondaryStyleId = CGlxInfoBubble::Env().TextStyleManager().CreatePlatformTextStyleL 
       
   117 		(EAknLogicalFontSecondaryFont, EAlfTextStyleNormal);
       
   118 	TInt iTypefacePrimaryStyleId = CGlxInfoBubble::Env().TextStyleManager().CreatePlatformTextStyleL 
       
   119 		(EAknLogicalFontPrimaryFont, EAlfTextStyleNormal);
       
   120 	CAlfTextStyle* stylePrimary = CGlxInfoBubble::Env().TextStyleManager().TextStyle
       
   121 		(iTypefacePrimaryStyleId);
       
   122 	CAlfTextStyle* styleSecondary = CGlxInfoBubble::Env().TextStyleManager().TextStyle 
       
   123 		(iTypefaceSecondaryStyleId);
       
   124 	styleSecondary->SetTextSizeInPixels (14, 0);
       
   125 	stylePrimary->SetTextSizeInPixels (21, 0);
       
   126 
       
   127 	iBubbleTextTitle->SetTextStyle (iTypefacePrimaryStyleId);
       
   128 	
       
   129 	TAlfTimedValue opacity;
       
   130     opacity.SetTarget(1, 500);
       
   131     iBubbleTextTitle->SetOpacity(opacity);
       
   132     
       
   133 //	iBubbleTextTitle->iOpacity.Set (1);
       
   134 	iBubbleTextTitle->SetColor (KRgbBlack);
       
   135 
       
   136 	iBubbleTextSubTitle->SetTextStyle (iTypefaceSecondaryStyleId);
       
   137 	
       
   138     opacity.SetTarget(1, 500);
       
   139     iBubbleTextSubTitle->SetOpacity(opacity);
       
   140     
       
   141 //	iBubbleTextSubTitle->iOpacity.Set (1);
       
   142 	iBubbleTextSubTitle->SetColor (KRgbBlack);
       
   143 
       
   144 	}
       
   145 
       
   146 // ---------------------------------------------------------------------------
       
   147 // Destructor
       
   148 // ---------------------------------------------------------------------------
       
   149 //
       
   150 EXPORT_C CGlxInfoBubble::~CGlxInfoBubble()
       
   151 	{
       
   152 
       
   153 	TRACER("GLX_CLOUD::CGlxInfoBubble::~CGlxInfoBubble");
       
   154 	if ( iThumbnailBorderBrush)
       
   155 		{
       
   156 		delete iThumbnailBorderBrush;
       
   157 		}
       
   158 	ResetBubbleComponent();
       
   159 	iBubbleExpandStrip.ResetAndDestroy ();
       
   160 	iBubbleExpandStrip.Close ();
       
   161 	GLX_LOG_INFO1("GLX_CLOUD::CGlxInfoBubble::ResetBubbleComponent -iBubbleExpandStrip.Count()(%d)", iBubbleExpandStrip.Count());
       
   162 	GLX_LOG_INFO1("GLX_CLOUD::CGlxInfoBubble::ResetBubbleComponent -iInfoBubble->Count()(%d)", iInfoBubble->Count());
       
   163 	iUiUtility->RemoveSkinChangeObserver(*this);
       
   164 	if ( iUiUtility)
       
   165 		{
       
   166 		iUiUtility->Close ();
       
   167 		}
       
   168 	}
       
   169 
       
   170 // ---------------------------------------------------------------------------
       
   171 // DisappearBubble()
       
   172 // ---------------------------------------------------------------------------
       
   173 //
       
   174 EXPORT_C void CGlxInfoBubble::DisappearBubble()
       
   175 	{
       
   176 	TRACER("GLX_CLOUD::CGlxInfoBubble::DisappearBubble");
       
   177     TAlfTimedValue opacity;
       
   178     opacity.SetTarget(0, 500);
       
   179     iInfoDeck->SetOpacity(opacity);
       
   180 	}
       
   181 	
       
   182 // ---------------------------------------------------------------------------
       
   183 // CreateThumbnailTextureL()
       
   184 // ---------------------------------------------------------------------------
       
   185 //	
       
   186 EXPORT_C CAlfTexture& CGlxInfoBubble::CreateThumbnailTextureL(const TGlxMedia& aMedia,
       
   187         const TGlxIdSpaceId& aIdSpaceId,const TSize& aSize )
       
   188     {
       
   189     TRACER("GLX_CLOUD::CGlxInfoBubble::CreateThumbnailTextureL");
       
   190     return iUiUtility->GlxTextureManager().CreateThumbnailTextureL(aMedia,
       
   191         aIdSpaceId, aSize, this );    
       
   192     }
       
   193     
       
   194 void CGlxInfoBubble::ResetBubbleComponent()
       
   195 	{
       
   196 
       
   197 	TRACER("GLX_CLOUD::CGlxInfoBubble::ResetBubbleComponent");
       
   198 	GLX_LOG_INFO1("GLX_CLOUD::CGlxInfoBubble::ResetBubbleComponent -iBubbleExpandStrip.Count()(%d)", iBubbleExpandStrip.Count());
       
   199 	GLX_LOG_INFO1("GLX_CLOUD::CGlxInfoBubble::ResetBubbleComponent -iInfoBubble->Count()(%d)", iInfoBubble->Count());
       
   200 	iBubbleExpandStrip.ResetAndDestroy ();
       
   201 	if ( iInfoBubble->Count ()!=0)
       
   202 		{
       
   203 		iInfoBubble->Remove (iBubbleLeft);
       
   204 		iInfoBubble->Remove (iBubbleTailStrip);
       
   205 		iInfoBubble->Remove (iBubbleRight);
       
   206 		iInfoBubble->Remove (iBubbleTail);
       
   207 
       
   208 		iInfoBubble->UpdateChildrenLayout (); //update layout
       
   209 		}
       
   210 	GLX_LOG_INFO1("GLX_CLOUD::CGlxInfoBubble::ResetBubbleComponent -iBubbleExpandStrip.Count()(%d)", iBubbleExpandStrip.Count());
       
   211 	GLX_LOG_INFO1("GLX_CLOUD::CGlxInfoBubble::ResetBubbleComponent -iInfoBubble->Count()(%d)", iInfoBubble->Count());
       
   212 
       
   213 	}
       
   214 
       
   215 void CGlxInfoBubble::LoadTailAssemblyL(TInt aTailEnumId, TInt aTailStripEnumId)
       
   216 	{
       
   217 
       
   218 	TRACER("GLX_CLOUD::CGlxInfoBubble::LoadTailAssemblyL");
       
   219 	iImageBubbleTail = iUiUtility->GlxTextureManager().CreateIconTextureL (aTailEnumId, iMifFile);
       
   220 	iImageBubbleStrip =iUiUtility->GlxTextureManager().CreateIconTextureL (aTailStripEnumId, iMifFile);
       
   221 	iBubbleTailStrip->SetImage (iImageBubbleStrip);
       
   222 	iBubbleTail->SetImage (iImageBubbleTail);
       
   223 
       
   224 	}
       
   225 
       
   226 void CGlxInfoBubble::CreateItemContainerLayoutL()
       
   227 	{
       
   228 
       
   229 	TRACER("GLX_CLOUD::CGlxInfoBubble::CreateItemContainerLayoutL");
       
   230 
       
   231 	iDeckCentreimage->EnableBrushesL ();
       
   232 	//Ownership of the brush is not transferred to the visual.
       
   233 	iDeckCentreimage->Brushes()->AppendL (iThumbnailBorderBrush, EAlfDoesNotHaveOwnership);
       
   234  
       
   235     TAlfTimedValue opacity;
       
   236     opacity.SetValueNow(1); // immediate change
       
   237     iDeckCentreimage->SetOpacity(opacity);
       
   238 
       
   239     SetThumbnailBorderColor();
       
   240 	iThumbnailBorderBrush->SetLayer (EAlfBrushLayerForeground);
       
   241     if( GlxGeneralUiUtilities::LayoutIsMirrored () )
       
   242         {	   
       
   243         TInt bublepos = iBubbleSize.iWidth-60;
       
   244         
       
   245         iInfoBubbleContainer->SetAnchor (EAlfAnchorTopLeft, 0,
       
   246             EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   247             EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, TAlfTimedPoint (
       
   248             bublepos, iPositionOffset+ 5));
       
   249 
       
   250         iInfoBubbleContainer->SetAnchor (EAlfAnchorBottomRight, 0,
       
   251             EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   252             EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, TAlfTimedPoint (
       
   253             bublepos+50, iPositionOffset + 55));       
       
   254 
       
   255         iInfoBubbleContainer->SetAnchor (EAlfAnchorTopLeft, 1,
       
   256             EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   257             EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, TAlfTimedPoint (
       
   258             5, iPositionOffset + 5));
       
   259 
       
   260         iInfoBubbleContainer->SetAnchor (EAlfAnchorBottomRight, 1,
       
   261             EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   262             EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, TAlfTimedPoint (
       
   263             5+ iBubbleTextTitle->TextExtents().iWidth,
       
   264             iPositionOffset+iBubbleTextTitle->TextExtents().iHeight+5));
       
   265 
       
   266         iInfoBubbleContainer->SetAnchor (EAlfAnchorTopLeft, 2,
       
   267             EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   268             EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, TAlfTimedPoint (
       
   269             5, iPositionOffset+iBubbleTextTitle->TextExtents().iHeight +10));
       
   270 
       
   271         iInfoBubbleContainer->SetAnchor (EAlfAnchorBottomRight, 2,
       
   272             EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   273             EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, TAlfTimedPoint (
       
   274             5+ iBubbleTextSubTitle->TextExtents().iWidth,
       
   275             iPositionOffset+iBubbleTextTitle->TextExtents().iHeight +10+
       
   276             iBubbleTextSubTitle->TextExtents().iHeight));
       
   277         }
       
   278 
       
   279     else
       
   280         {       
       
   281         //setting anchors 
       
   282         iInfoBubbleContainer->SetAnchor (EAlfAnchorTopLeft, 0,
       
   283             EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   284             EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, TAlfTimedPoint (
       
   285             5, iPositionOffset+ 5));
       
   286 
       
   287         iInfoBubbleContainer->SetAnchor (EAlfAnchorBottomRight, 0,
       
   288             EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   289             EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, TAlfTimedPoint (
       
   290             55, iPositionOffset + 55));
       
   291 
       
   292         iInfoBubbleContainer->SetAnchor (EAlfAnchorTopLeft, 1,
       
   293             EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   294             EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, TAlfTimedPoint (
       
   295             60, iPositionOffset + 5));
       
   296 
       
   297         iInfoBubbleContainer->SetAnchor (EAlfAnchorBottomRight, 1,
       
   298             EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   299             EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, TAlfTimedPoint (
       
   300             60+ iBubbleTextTitle->TextExtents().iWidth,
       
   301             iPositionOffset+iBubbleTextTitle->TextExtents().iHeight+5));
       
   302 
       
   303         iInfoBubbleContainer->SetAnchor (EAlfAnchorTopLeft, 2,
       
   304             EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   305             EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, TAlfTimedPoint (
       
   306             65, iPositionOffset+iBubbleTextTitle->TextExtents().iHeight +10));
       
   307             
       
   308         iInfoBubbleContainer->SetAnchor (EAlfAnchorBottomRight, 2,
       
   309             EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   310             EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, TAlfTimedPoint (
       
   311             65+ iBubbleTextSubTitle->TextExtents().iWidth,
       
   312             iPositionOffset+iBubbleTextTitle->TextExtents().iHeight +10+
       
   313             iBubbleTextSubTitle->TextExtents().iHeight));				
       
   314 
       
   315         }
       
   316 	}
       
   317 
       
   318 void CGlxInfoBubble::SetVariableVisualCountL()
       
   319 	{
       
   320 
       
   321 	TRACER("GLX_CLOUD::CGlxInfoBubble::SetVariableVisualCountL");
       
   322     TInt stripCount( 0 );    
       
   323     TInt tempTitleLength = iTempTitleText->TextExtents().iWidth; 
       
   324     TInt tempPos = (iPos.iX>KGlxBubbleWidthOffset?KGlxBubbleThumbnailOffset:iPos.iX-25);
       
   325 	if ( tempTitleLength > (iBubbleTextSubTitle->TextExtents().iWidth))
       
   326 		{
       
   327 		stripCount = tempTitleLength;
       
   328 		}
       
   329 	else
       
   330 		{
       
   331 		stripCount = iBubbleTextSubTitle->TextExtents().iWidth;
       
   332 		}
       
   333 		
       
   334     if ( stripCount>iScreenWidth/2 - 15 )
       
   335 	    {
       
   336      	stripCount = ( ( iScreenWidth - iPos.iX > stripCount+KGlxBubbleThumbnailOffset ) ? stripCount :
       
   337      	                                                     stripCount-iPos.iX +tempPos );
       
   338      	                                                     
       
   339 	    }
       
   340 	// Bubbles stripCount should be a maximum of Screenwidth - KGlxBubbleMaxExcluder
       
   341 	stripCount = Min( stripCount, iScreenWidth - KGlxBubbleMaxExcluder );
       
   342 	
       
   343 	//set the tag size
       
   344 	TAlfRealSize tagSize( stripCount, KGlxBubbleTextHeightPos );
       
   345 	iBubbleTextTitle->SetSize( tagSize, 0 );
       
   346 
       
   347 	GLX_LOG_INFO1("GLX_CLOUD::CGlxInfoBubble::DrawBubbleExtemsibleComponent stripCount  %d ",stripCount);
       
   348 	//set the deck layout size
       
   349 	iBubbleSize.iHeight = KGlxBubbleHeight; //height is constant
       
   350 	iBubbleSize.iWidth = KGlxBubbleWidthOffset + stripCount + KGlxBubbleRightStrip; //KGlxBubbleRightStrip (5) is for right strip
       
   351 	iInfoDeck->SetSize (iBubbleSize);
       
   352 	TReal variableWidth = (KGlxBubbleWidthOffset + stripCount) - KGlxBubbleMinimumWidth;
       
   353 	TReal slotsToFill =variableWidth/12.0;
       
   354 	Math::Round (iRoudedSlotValue, slotsToFill, 0);
       
   355 	}
       
   356 // ---------------------------------------------------------------------------
       
   357 // UpdateTextureL()
       
   358 // ---------------------------------------------------------------------------
       
   359 //	
       
   360 EXPORT_C void CGlxInfoBubble::UpdateTextureL(CAlfTexture& aTexture)
       
   361     {  
       
   362     iDeckCentreimage->SetImage(TAlfImage(aTexture));
       
   363 	// Fix for BUG EDKZ-77UKMZ( The Image is cropped to fit in the info bubble thumbnail space )
       
   364     iDeckCentreimage->SetScaleMode( CAlfImageVisual::EScaleCover );
       
   365     iDeckCentreimage->SetFlag( EAlfVisualFlagClipping );
       
   366 	return;
       
   367     }
       
   368 // ---------------------------------------------------------------------------
       
   369 // ResetImage()
       
   370 // ---------------------------------------------------------------------------
       
   371 //	
       
   372 EXPORT_C void CGlxInfoBubble::ResetImage()
       
   373     { 
       
   374     TAlfImage image;
       
   375     iDeckCentreimage->SetImage(image);
       
   376     }
       
   377     
       
   378 // ---------------------------------------------------------------------------
       
   379 // DisplayBubble()
       
   380 // ---------------------------------------------------------------------------
       
   381 //
       
   382 EXPORT_C void CGlxInfoBubble::DisplayBubbleL(TPoint aPos, CAlfTexture& aTexture, const TDesC
       
   383 		&aTitle, const TDesC &aSubTitle)
       
   384 	{
       
   385 
       
   386 	TRACER("GLX_CLOUD::CGlxInfoBubble::DisplayBubble");
       
   387 	iPos = aPos; //bubble draw point
       
   388 	ResetBubbleComponent();
       
   389 
       
   390 	//assign the params
       
   391 	//setting the texts value and image brush boundary
       
   392 	iBubbleTextTitle->SetTextL(aTitle);
       
   393 	//to-check
       
   394 	//iBubbleTextTitle->SetChanged();
       
   395 	iBubbleTextSubTitle->SetTextL(aSubTitle);
       
   396 	_LIT(KNullDesc,"");
       
   397 	iTempTitleText->SetTextL(KNullDesc());
       
   398 	iTempTitleText->SetTextL(aTitle);
       
   399 	
       
   400 	//loading the texture for thumbanil image		
       
   401     UpdateTextureL(aTexture);
       
   402     //to-check
       
   403 	//iInfoDeck->Changed();
       
   404 	TRect rect;
       
   405 	AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, rect);
       
   406 	iScreenWidth = rect.Width();
       
   407 	iScreenHeight = rect.Height();
       
   408 	
       
   409 	//determing the info bubble posotion
       
   410 	TInt dx (iPos.iY);
       
   411 	TInt dy (iPos.iX);
       
   412     TInt rx = iScreenHeight - dx; //remaining distance form x axis
       
   413     TInt ry = iScreenWidth - dy;//remaining distance form y axis
       
   414 
       
   415 	//sets the variable Visual count
       
   416 	SetVariableVisualCountL();
       
   417 
       
   418 	//Deciding bubble positions
       
   419 	if ((ry >= dy) && (rx >= dx))
       
   420 	//down- towards right
       
   421 		{
       
   422 		iPositionOffset=15;
       
   423 		LoadTailAssemblyL(EMbmGlxiconsQgn_graf_mediatag_bubble_corner_tl,EMbmGlxiconsQgn_graf_mediatag_bubble_side_b);
       
   424 		DrawBubbleFirstQuadL(aPos);
       
   425 
       
   426 		}
       
   427 	if ((ry < dy) && (rx > dx))
       
   428 	//down- towards left
       
   429 		{
       
   430 		iPositionOffset=15;
       
   431 		LoadTailAssemblyL(EMbmGlxiconsQgn_graf_mediatag_bubble_corner_tr,EMbmGlxiconsQgn_graf_mediatag_bubble_side_b);
       
   432 		DrawBubbleSecondQuadL(aPos);
       
   433 		}
       
   434 	if ((ry >= dy) && (rx <= dx))
       
   435 	//up-  towards right
       
   436 		{
       
   437 		iPositionOffset=0;
       
   438 		LoadTailAssemblyL(EMbmGlxiconsQgn_graf_mediatag_bubble_corner_bl,EMbmGlxiconsQgn_graf_mediatag_bubble_side_t);
       
   439 		DrawBubbleThirdQuadL(aPos);
       
   440 		}
       
   441 	if ((ry < dy) && (rx < dx))
       
   442 	//up- towards left
       
   443 		{
       
   444 		iPositionOffset=0;
       
   445 		LoadTailAssemblyL(EMbmGlxiconsQgn_graf_mediatag_bubble_corner_br,EMbmGlxiconsQgn_graf_mediatag_bubble_side_t);
       
   446 		DrawBubbleFourthQuadL(aPos);
       
   447 		}
       
   448 //to-check
       
   449 //	iInfoBubble->SetChanged();
       
   450 	
       
   451 	//all texture loaded
       
   452 	//now find the width of bubblle and create layout based on these visuals.
       
   453 	//optimize logic for tail allignment towards centre of the focussed item  
       
   454 	TInt bubblewidth = iInfoDeck->Size().iX.Target();
       
   455 	
       
   456 	// make sure that bubble does not get outside the screen
       
   457 	// first check the left hand side
       
   458 	if( GlxGeneralUiUtilities::LayoutIsMirrored () )
       
   459 	    {
       
   460 	   	if( iBubbleRectDrawPoint.iX < 0 )
       
   461     	    {
       
   462     	    // set bubble to be as left as possible
       
   463     	    iBubbleRectDrawPoint.iX = 13;
       
   464     	    }
       
   465     	    
       
   466     	// then check the right hand side
       
   467     	if( ( iBubbleRectDrawPoint.iX + bubblewidth ) > iScreenWidth )
       
   468     	    {
       
   469     	    // set bubble to be as left as possible
       
   470     	    iBubbleRectDrawPoint.iX = iScreenWidth - bubblewidth+5;
       
   471     	    } 
       
   472 	    }
       
   473 	else
       
   474 	    {	   
       
   475     	if( iBubbleRectDrawPoint.iX < 0 )
       
   476     	    {
       
   477     	    // set bubble to be as left as possible
       
   478 	        iBubbleRectDrawPoint.iX = 0;
       
   479 	        }
       
   480     // then check the right hand side
       
   481     	if( ( iBubbleRectDrawPoint.iX + bubblewidth ) > iScreenWidth )
       
   482     	    {
       
   483     	    // set bubble to be as left as possible
       
   484     	    iBubbleRectDrawPoint.iX = iScreenWidth - bubblewidth;
       
   485     	    }
       
   486 	    }
       
   487 	 
       
   488 	TAlfTimedValue opacity;
       
   489     opacity.SetTarget(0.9, 500);
       
   490     iInfoBubble->SetOpacity(opacity);
       
   491         
       
   492 	//iInfoBubble->iOpacity.Set(0.9, 1000);
       
   493 	iInfoDeck->SetPos(iBubbleRectDrawPoint);
       
   494 	CreateItemContainerLayoutL();
       
   495 
       
   496 	//Setting properies for Layouts
       
   497 	iInfoDeck->MoveToFront();
       
   498 	
       
   499 //	TAlfTimedValue opacity;
       
   500     opacity.SetTarget(0, 500);
       
   501     iInfoDeck->SetOpacity(opacity);
       
   502     
       
   503 //	iInfoDeck->iOpacity.Set(0);
       
   504 	
       
   505 	opacity.SetTarget(1.0, 800);
       
   506 	iInfoDeck->SetOpacity(opacity);
       
   507 	//iInfoDeck->iOpacity.Set(1.0,800);
       
   508 	
       
   509 	opacity.SetTarget(1.0, 500);
       
   510 	iInfoBubble->SetOpacity(opacity);
       
   511 	//iInfoBubble->iOpacity.Set(1.0);
       
   512 	
       
   513 	iInfoBubbleContainer->MoveToFront();
       
   514 	//to-check
       
   515    //	iInfoDeck->SetChanged();
       
   516 
       
   517 	/// @todo would need to reposition the tail as well somehow!!!
       
   518 
       
   519 	}
       
   520 
       
   521 void CGlxInfoBubble::DrawBubbleFirstQuadL(TPoint aReferencepos)
       
   522 	{
       
   523 
       
   524 	TRACER("GLX_CLOUD::CGlxInfoBubble::DrawBubble");
       
   525 
       
   526 	//determining the position of tail and setting postion for bubble rect
       
   527 	if ( (aReferencepos.iX - KGlxBubblePosOffset) >= 5)
       
   528 		{
       
   529 		iBubbleRectDrawPoint.iX= aReferencepos.iX - KGlxBubblePosOffset;
       
   530 		iTailNormalPosition=1;
       
   531 		}
       
   532 	else
       
   533 		if ( (aReferencepos.iX - KGlxBubblePosPreOffset) >= 5)
       
   534 			{
       
   535 			iBubbleRectDrawPoint.iX= aReferencepos.iX - KGlxBubblePosPreOffset;
       
   536 			iTailNormalPosition=0;
       
   537 			}
       
   538 	iBubbleRectDrawPoint.iY = aReferencepos.iY;
       
   539 
       
   540 	//drawing bubble
       
   541 	iBubbleComponentCount=0;
       
   542 	iBubbleXaxisInc=0;
       
   543 
       
   544 	DrawBubbleLeftComponentL ();
       
   545 	if ( iTailNormalPosition ==1)
       
   546 		{
       
   547 		//draw tail:
       
   548 		iInfoBubble->Append (iBubbleTail);
       
   549 		iInfoBubble->SetAnchor (EAlfAnchorTopLeft, iBubbleComponentCount,
       
   550 				EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   551 				EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
       
   552 				TAlfTimedPoint (17, 1));
       
   553 		iInfoBubble->SetAnchor (EAlfAnchorBottomRight, iBubbleComponentCount,
       
   554 				EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   555 				EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
       
   556 				TAlfTimedPoint (29, 16));
       
   557 		iBubbleComponentCount+=1;
       
   558 		//tail end
       
   559 		DrawBubbleExtensibleComponentL (1);
       
   560 		DrawBubbleTailComponentL ();
       
   561 		DrawBubbleExtensibleComponentL (iRoudedSlotValue -1);
       
   562 		}
       
   563 	else
       
   564 		{
       
   565 		DrawBubbleTailComponentL ();
       
   566 		DrawBubbleExtensibleComponentL (iRoudedSlotValue);
       
   567 		//draw tail:
       
   568 		iInfoBubble->Append (iBubbleTail);
       
   569 		iInfoBubble->SetAnchor (EAlfAnchorTopLeft, iBubbleComponentCount,
       
   570 				EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   571 				EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
       
   572 				TAlfTimedPoint (5, 1));
       
   573 		iInfoBubble->SetAnchor (EAlfAnchorBottomRight, iBubbleComponentCount,
       
   574 				EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   575 				EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
       
   576 				TAlfTimedPoint (17, 16));
       
   577 		iBubbleComponentCount+=1;
       
   578 		//tail end
       
   579 		}
       
   580 	DrawBubbleRightComponentL ();
       
   581 
       
   582 	}
       
   583 
       
   584 void CGlxInfoBubble::DrawBubbleSecondQuadL(TPoint aReferencepos)
       
   585 	{
       
   586 
       
   587 	//determining the position of tail and setting postion for bubble rect
       
   588 	if ( (aReferencepos.iX + KGlxBubblePosOffset) <= iScreenWidth)
       
   589 		{
       
   590 		iBubbleRectDrawPoint.iX= aReferencepos.iX -(iBubbleSize.iWidth - KGlxBubblePosOffset);
       
   591 		iTailNormalPosition=1;
       
   592 		}
       
   593 	else
       
   594 		if ( (aReferencepos.iX + KGlxBubblePosPreOffset) <= iScreenWidth)
       
   595 			{
       
   596 			iBubbleRectDrawPoint.iX= aReferencepos.iX - (iBubbleSize.iWidth -KGlxBubblePosPreOffset);
       
   597 			iTailNormalPosition=0;
       
   598 			}
       
   599 	iBubbleRectDrawPoint.iY = aReferencepos.iY;
       
   600 
       
   601 	//drawing bubble
       
   602 	iBubbleComponentCount=0;
       
   603 	iBubbleXaxisInc=0;
       
   604 	DrawBubbleLeftComponentL ();
       
   605 	TInt xCord=KGlxBubbleMinimumWidth + (iRoudedSlotValue*12);
       
   606 	xCord -=29;
       
   607 	if ( iTailNormalPosition ==1)
       
   608 		{
       
   609 		//draw tail:
       
   610 		iInfoBubble->Append (iBubbleTail);
       
   611 		iInfoBubble->SetAnchor (EAlfAnchorTopLeft, iBubbleComponentCount,
       
   612 				EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   613 				EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
       
   614 				TAlfTimedPoint (xCord, 1));
       
   615 		iInfoBubble->SetAnchor (EAlfAnchorBottomRight, iBubbleComponentCount,
       
   616 				EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   617 				EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
       
   618 				TAlfTimedPoint (xCord+12, 16));
       
   619 		iBubbleComponentCount+=1;
       
   620 		//tail end
       
   621 		DrawBubbleExtensibleComponentL (iRoudedSlotValue-1);
       
   622 		DrawBubbleTailComponentL ();
       
   623 		DrawBubbleExtensibleComponentL (1);
       
   624 		}
       
   625 	else
       
   626 		{
       
   627 		DrawBubbleExtensibleComponentL (iRoudedSlotValue);
       
   628 		DrawBubbleTailComponentL ();
       
   629 		//draw tail:
       
   630 		iInfoBubble->Append (iBubbleTail);
       
   631 		iInfoBubble->SetAnchor (EAlfAnchorTopLeft, iBubbleComponentCount,
       
   632 				EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   633 				EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
       
   634 				TAlfTimedPoint (xCord+12, 1));
       
   635 		iInfoBubble->SetAnchor (EAlfAnchorBottomRight, iBubbleComponentCount,
       
   636 				EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   637 				EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
       
   638 				TAlfTimedPoint (xCord+24, 16));
       
   639 		iBubbleComponentCount+=1;
       
   640 		//tail end
       
   641 		}
       
   642 	DrawBubbleRightComponentL ();
       
   643 
       
   644 	}
       
   645 
       
   646 void CGlxInfoBubble::DrawBubbleThirdQuadL(TPoint aReferencepos)
       
   647 	{
       
   648 
       
   649 	//determining the position of tail and setting postion for bubble rect
       
   650 	if ( (aReferencepos.iX - KGlxBubblePosOffset) >= 5)
       
   651 		{
       
   652 		iBubbleRectDrawPoint.iX= aReferencepos.iX - KGlxBubblePosOffset;
       
   653 		iTailNormalPosition=1;
       
   654 		}
       
   655 	else
       
   656 		if ( (aReferencepos.iX - KGlxBubblePosPreOffset) >= 5)
       
   657 			{
       
   658 			iBubbleRectDrawPoint.iX= aReferencepos.iX - KGlxBubblePosPreOffset;
       
   659 			iTailNormalPosition=0;
       
   660 			}
       
   661 	iBubbleRectDrawPoint.iY = aReferencepos.iY -KGlxBubbleHeight;
       
   662 	//drawing bubble
       
   663 	iBubbleComponentCount=0;
       
   664 	iBubbleXaxisInc=0;
       
   665 	DrawBubbleLeftComponentL ();
       
   666 	if ( iTailNormalPosition ==1)
       
   667 		{
       
   668 		//draw tail:
       
   669 		iInfoBubble->Append (iBubbleTail);
       
   670 		iInfoBubble->SetAnchor (EAlfAnchorTopLeft, iBubbleComponentCount,
       
   671 				EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   672 				EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
       
   673 				TAlfTimedPoint (17, 60));
       
   674 		iInfoBubble->SetAnchor (EAlfAnchorBottomRight, iBubbleComponentCount,
       
   675 				EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   676 				EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
       
   677 				TAlfTimedPoint (29, 75));
       
   678 		iBubbleComponentCount+=1;
       
   679 		//tail end
       
   680 		DrawBubbleExtensibleComponentL (1);
       
   681 		DrawBubbleTailComponentL ();
       
   682 		DrawBubbleExtensibleComponentL (iRoudedSlotValue -1);
       
   683 
       
   684 		}
       
   685 	else
       
   686 		{
       
   687 		DrawBubbleTailComponentL ();
       
   688 		DrawBubbleExtensibleComponentL (iRoudedSlotValue);
       
   689 		//draw tail:
       
   690 		iInfoBubble->Append (iBubbleTail);
       
   691 		iInfoBubble->SetAnchor (EAlfAnchorTopLeft, iBubbleComponentCount,
       
   692 				EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   693 				EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
       
   694 				TAlfTimedPoint (5, 60));
       
   695 		iInfoBubble->SetAnchor (EAlfAnchorBottomRight, iBubbleComponentCount,
       
   696 				EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   697 				EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
       
   698 				TAlfTimedPoint (17, 75));
       
   699 		iBubbleComponentCount+=1;
       
   700 		//tail end
       
   701 		}
       
   702 	DrawBubbleRightComponentL ();
       
   703 	}
       
   704 
       
   705 void CGlxInfoBubble::DrawBubbleFourthQuadL(TPoint aReferencepos)
       
   706 	{
       
   707 	//determining the position of tail and setting postion for bubble rect
       
   708 
       
   709 	if ( (aReferencepos.iX + KGlxBubblePosOffset) <= iScreenWidth)
       
   710 		{
       
   711 		iBubbleRectDrawPoint.iX= aReferencepos.iX -(iBubbleSize.iWidth - KGlxBubblePosOffset);
       
   712 		iTailNormalPosition=1;
       
   713 		}
       
   714 	else
       
   715 		if ( (aReferencepos.iX + KGlxBubblePosPreOffset) <= iScreenWidth)
       
   716 			{
       
   717 			iBubbleRectDrawPoint.iX= aReferencepos.iX - (iBubbleSize.iWidth -KGlxBubblePosPreOffset);
       
   718 			iTailNormalPosition=0;
       
   719 			}
       
   720 	iBubbleRectDrawPoint.iY = aReferencepos.iY -KGlxBubbleHeight;
       
   721 
       
   722 	//drawing bubble
       
   723 	iBubbleComponentCount=0;
       
   724 	iBubbleXaxisInc=0;
       
   725 	DrawBubbleLeftComponentL ();
       
   726 	TInt xCord=KGlxBubbleMinimumWidth + (iRoudedSlotValue*12);
       
   727 	xCord -=29;
       
   728 	if ( iTailNormalPosition ==1)
       
   729 		{
       
   730 		//draw tail:
       
   731 		iInfoBubble->Append (iBubbleTail);
       
   732 
       
   733 		iInfoBubble->SetAnchor (EAlfAnchorTopLeft, iBubbleComponentCount,
       
   734 				EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   735 				EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, TAlfTimedPoint (
       
   736 						xCord, 60));
       
   737 		iInfoBubble->SetAnchor (EAlfAnchorBottomRight, iBubbleComponentCount,
       
   738 				EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   739 				EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, TAlfTimedPoint (
       
   740 						xCord+12, 75));
       
   741 		iBubbleComponentCount+=1;
       
   742 		//tail end
       
   743 		DrawBubbleExtensibleComponentL (iRoudedSlotValue-1);
       
   744 		DrawBubbleTailComponentL ();
       
   745 		DrawBubbleExtensibleComponentL (1);
       
   746 		}
       
   747 	else
       
   748 		{
       
   749 		DrawBubbleExtensibleComponentL (iRoudedSlotValue);
       
   750 		DrawBubbleTailComponentL ();
       
   751 		//draw tail:
       
   752 		iInfoBubble->Append (iBubbleTail);
       
   753 		iInfoBubble->SetAnchor (EAlfAnchorTopLeft, iBubbleComponentCount,
       
   754 				EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   755 				EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
       
   756 				TAlfTimedPoint (xCord+12, 60));
       
   757 		iInfoBubble->SetAnchor (EAlfAnchorBottomRight, iBubbleComponentCount,
       
   758 				EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   759 				EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
       
   760 				TAlfTimedPoint (xCord+24, 75) );
       
   761 		iBubbleComponentCount+=1;
       
   762 		//tail end
       
   763 		}
       
   764 	DrawBubbleRightComponentL ();
       
   765 
       
   766 	}
       
   767 
       
   768 void CGlxInfoBubble::DrawBubbleLeftComponentL()
       
   769 	{
       
   770 
       
   771 	TRACER("GLX_CLOUD::CGlxInfoBubble::DrawBubbleLeftComponent");
       
   772 	iInfoBubble->Append (iBubbleLeft);
       
   773 	iBubbleLeft->SetImage (iImageBubbleLeft);
       
   774 	iInfoBubble->SetAnchor (EAlfAnchorTopLeft, iBubbleComponentCount,
       
   775 			EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   776 			EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, TAlfTimedPoint (
       
   777 					iBubbleXaxisInc, iPositionOffset));
       
   778 	iBubbleXaxisInc += 5;
       
   779 	iInfoBubble->SetAnchor (EAlfAnchorBottomRight, iBubbleComponentCount,
       
   780 			EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   781 			EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, TAlfTimedPoint (
       
   782 					iBubbleXaxisInc, iPositionOffset+60));
       
   783 	iBubbleComponentCount+=1;
       
   784 
       
   785 	}
       
   786 void CGlxInfoBubble::DrawBubbleRightComponentL()
       
   787 	{
       
   788 	TRACER("GLX_CLOUD::CGlxInfoBubble::DrawBubbleRightComponent");
       
   789 
       
   790 	iInfoBubble->Append (iBubbleRight);
       
   791 	iBubbleRight->SetImage (iImageBubbleRight);
       
   792 	iInfoBubble->SetAnchor (EAlfAnchorTopLeft, iBubbleComponentCount,
       
   793 			EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   794 			EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, TAlfTimedPoint (
       
   795 					iBubbleXaxisInc, iPositionOffset));
       
   796 	iBubbleXaxisInc+=5;
       
   797 	iInfoBubble->SetAnchor (EAlfAnchorBottomRight, iBubbleComponentCount,
       
   798 			EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   799 			EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, TAlfTimedPoint (
       
   800 					iBubbleXaxisInc, iPositionOffset+60));
       
   801 	iBubbleComponentCount+=1;
       
   802 
       
   803 	}
       
   804 void CGlxInfoBubble::DrawBubbleExtensibleComponentL(TInt aSlots)
       
   805 	{
       
   806 
       
   807 	TRACER("GLX_CLOUD::CGlxInfoBubble::DrawBubbleExtemsibleComponent");
       
   808 	GLX_LOG_INFO1("GLX_CLOUD::CGlxInfoBubble::DrawBubbleExtemsibleComponent slots  %d ",
       
   809 			aSlots);
       
   810 	for (TInt j=0; j<aSlots;j++)
       
   811 		{
       
   812 		CAlfImageVisual *tempimagevisual=CAlfImageVisual::AddNewL (*this);
       
   813 		iBubbleExpandStrip.AppendL (tempimagevisual);
       
   814 		this->Remove (tempimagevisual);
       
   815 		tempimagevisual->SetImage (iImageBubbleExpand); //image visual that will be  used multiple times
       
   816 		iInfoBubble->Append (tempimagevisual);
       
   817 		iInfoBubble->SetAnchor (EAlfAnchorTopLeft, iBubbleComponentCount,
       
   818 				EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   819 				EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
       
   820 				TAlfTimedPoint (iBubbleXaxisInc, iPositionOffset));
       
   821 		iBubbleXaxisInc+=12;
       
   822 		iInfoBubble->SetAnchor (EAlfAnchorBottomRight, iBubbleComponentCount,
       
   823 				EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   824 				EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute,
       
   825 				TAlfTimedPoint (iBubbleXaxisInc, iPositionOffset+60));
       
   826 		iBubbleComponentCount+=1;
       
   827 		}
       
   828 	}
       
   829 	
       
   830 void CGlxInfoBubble::DrawBubbleTailComponentL()
       
   831 	{
       
   832 	TRACER("GLX_CLOUD::CGlxInfoBubble::DrawBubbleTailComponent");
       
   833 
       
   834 	iInfoBubble->Append (iBubbleTailStrip);
       
   835 	iInfoBubble->SetAnchor (EAlfAnchorTopLeft, iBubbleComponentCount,
       
   836 			EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   837 			EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, TAlfTimedPoint (
       
   838 					iBubbleXaxisInc, iPositionOffset));
       
   839 	iBubbleXaxisInc+=12;
       
   840 	iInfoBubble->SetAnchor (EAlfAnchorBottomRight, iBubbleComponentCount,
       
   841 			EAlfAnchorOriginLeft, EAlfAnchorOriginTop,
       
   842 			EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, TAlfTimedPoint (
       
   843 					iBubbleXaxisInc, iPositionOffset+60));
       
   844 	iBubbleComponentCount+=1;
       
   845 
       
   846 	}
       
   847 
       
   848 // ---------------------------------------------------------------------------
       
   849 // SetThumbnailBorderColor()
       
   850 // ---------------------------------------------------------------------------
       
   851 //	
       
   852 void CGlxInfoBubble::SetThumbnailBorderColor()
       
   853     {   
       
   854 	TRgb brushColor;
       
   855 	//Get the cached color
       
   856 	AknsUtils::GetCachedColor(AknsUtils::SkinInstance(), brushColor, KAknsIIDQsnHighlightColors,EAknsCIQsnHighlightColorsCG3);
       
   857 	iThumbnailBorderBrush->SetColor (brushColor);
       
   858     }
       
   859 
       
   860 // ---------------------------------------------------------------------------
       
   861 // HandleSkinChanged()
       
   862 // ---------------------------------------------------------------------------
       
   863 //
       
   864 void CGlxInfoBubble::HandleSkinChanged()
       
   865     {
       
   866     SetThumbnailBorderColor();
       
   867     }
       
   868 
       
   869 // ---------------------------------------------------------------------------
       
   870 // TextureContentChangedL
       
   871 // ---------------------------------------------------------------------------
       
   872 //
       
   873 void CGlxInfoBubble::TextureContentChangedL( TBool /*aHasContent*/ , CAlfTexture* /*aNewTexture*/)
       
   874     {
       
   875     }
       
   876