mulwidgets/mulcoverflowwidget/src/mulcovertemplate2.cpp
branchRCL_3
changeset 26 0e9bb658ef58
parent 0 e83bab7cf002
equal deleted inserted replaced
25:4ea6f81c838a 26:0e9bb658ef58
       
     1 /*
       
     2 * Copyright (c) 2007-2008 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:  Description of various grid templates
       
    15  *
       
    16 */
       
    17 
       
    18  
       
    19 #include "mulcovertemplates.h"
       
    20 #include "mulcoverflowdefinitions.h"
       
    21 #include "mulvisualutility.h"
       
    22 #include "mulutility.h"
       
    23 #include <osn/osnnew.h> 
       
    24 
       
    25 namespace Alf
       
    26     {
       
    27     
       
    28 MulCoverLogicalTemplate2::~MulCoverLogicalTemplate2()
       
    29     {
       
    30     
       
    31     }
       
    32 
       
    33 //----------------------------------------------------------------
       
    34 // PopulateData
       
    35 //----------------------------------------------------------------
       
    36 //    
       
    37 void MulCoverLogicalTemplate2::PopulateData ()
       
    38     {	
       
    39     //For base element
       
    40     LCTElementStructure* prtBaseElem = new (EMM) LCTElementStructure();
       
    41 	//for main layout
       
    42 	prtBaseElem->SetId(UString(KBase));
       
    43 	LCTVisualStructure* mainPrtVS = new (EMM) LCTVisualStructure();
       
    44 	mainPrtVS->SetId(UString(KMainLayout));
       
    45 	//@todo:: later these need to be retrieved from LCT utility
       
    46 	mainPrtVS->SetPositions(0,0);
       
    47 	mainPrtVS->SetDimensions(360,441);
       
    48 	mainPrtVS->SetLCTId(UString("uiaccel_main_aa_coverflow_pane"));
       
    49 	mainPrtVS->SetVarietyId(3);	
       
    50 	CustomAttributeStructure* mainPrtOpacity = new (EMM) CustomAttributeStructure(
       
    51                 UString("opacity"), UString("1.0"));    
       
    52 	mainPrtVS->AddAttribute(mainPrtOpacity);
       
    53 	prtBaseElem->AddVisualStructure(mainPrtVS);
       
    54 	//for item_center
       
    55 	LCTVisualStructure* item_centerPrtVS = new (EMM) LCTVisualStructure();
       
    56 	item_centerPrtVS->SetId(UString(KItemCentre));
       
    57 	item_centerPrtVS->SetPositions(10,22);
       
    58 	item_centerPrtVS->SetDimensions(340,340);
       
    59 	item_centerPrtVS->SetLCTId(UString("uiaccel_aacf_image_pane"));
       
    60 	item_centerPrtVS->SetVarietyId(0);
       
    61 	
       
    62 	CustomAttributeStructure* item_centerPrtFM = new (EMM) CustomAttributeStructure(
       
    63 	        UString("fitmode"), UString("off"));
       
    64 	item_centerPrtVS->AddAttribute(item_centerPrtFM);
       
    65 	prtBaseElem->AddVisualStructure(item_centerPrtVS);
       
    66 	//for counter visual
       
    67 	LCTVisualStructure* counterPrtVS = new (EMM) LCTVisualStructure();
       
    68 	counterPrtVS->SetId(UString(KMulCount));
       
    69 	counterPrtVS->SetPositions(238,0);
       
    70 	counterPrtVS->SetDimensions(112,21);
       
    71 	counterPrtVS->SetLCTId(UString("uiaccel_main_aa_coverflow_pane_t1"));
       
    72 	counterPrtVS->SetVarietyId(0);
       
    73 	//add extra attributes to the gridlayout
       
    74 		
       
    75 	CustomAttributeStructure* stylePrtC = new (EMM) CustomAttributeStructure(
       
    76 	        UString("style"), UString("qfn_secondary"));
       
    77 	
       
    78 	CustomAttributeStructure* opacityPrtC = new (EMM) CustomAttributeStructure(
       
    79 	        UString("opacity"), UString("1.0"));
       
    80 	
       
    81 	CustomAttributeStructure* redPrtC = new (EMM) CustomAttributeStructure(
       
    82 	        UString("red"), UString("255"));
       
    83 	
       
    84      CustomAttributeStructure* greenPrtC = new (EMM) CustomAttributeStructure(
       
    85                 UString("green"), UString("255"));
       
    86      
       
    87     CustomAttributeStructure* bluePrtC = new (EMM) CustomAttributeStructure(
       
    88         UString("blue"), UString("255"));
       
    89     
       
    90     CustomAttributeStructure* alphaPrtC = new (EMM) CustomAttributeStructure(
       
    91         UString("alpha"), UString("0"));
       
    92     
       
    93     CustomAttributeStructure* horizontalalignPrtC = new (EMM) CustomAttributeStructure(
       
    94             UString("horizontalalign"), UString("2"));
       
    95         
       
    96     counterPrtVS->AddAttribute(stylePrtC);
       
    97     counterPrtVS->AddAttribute(opacityPrtC);
       
    98     counterPrtVS->AddAttribute(redPrtC);
       
    99     counterPrtVS->AddAttribute(greenPrtC);
       
   100     counterPrtVS->AddAttribute(bluePrtC);
       
   101     counterPrtVS->AddAttribute(alphaPrtC);
       
   102     counterPrtVS->AddAttribute(horizontalalignPrtC);
       
   103     
       
   104     //for text layout
       
   105     LCTVisualStructure* textPrtLtVS = new (EMM) LCTVisualStructure();
       
   106     textPrtLtVS->SetId(UString(KText));
       
   107     textPrtLtVS->SetPositions(10,230);
       
   108     textPrtLtVS->SetDimensions(340,82);
       
   109     textPrtLtVS->SetLCTId(UString("uiaccel_aacf_image_title_pane"));
       
   110     textPrtLtVS->SetVarietyId(0);
       
   111     prtBaseElem->AddVisualStructure(textPrtLtVS);
       
   112     
       
   113     //for text background
       
   114     LCTVisualStructure* textPrtBgVS = new (EMM) LCTVisualStructure();
       
   115     textPrtBgVS->SetId(UString(KMulBackGround));
       
   116     textPrtBgVS->SetPositions(0,0);
       
   117     textPrtBgVS->SetDimensions(340,82);
       
   118     textPrtBgVS->SetLCTId(UString("uiaccel_aacf_image_title_pane_g1"));
       
   119     textPrtBgVS->SetVarietyId(0);
       
   120     //Add attributes to the text background visual
       
   121     CustomAttributeStructure* bgHaPrtTV = new (EMM) CustomAttributeStructure(
       
   122                 UString("horizontalalign"), UString("1"));
       
   123     textPrtBgVS->AddAttribute(bgHaPrtTV);
       
   124     CustomAttributeStructure* bgoPrtTV = new (EMM) CustomAttributeStructure(
       
   125         UString("opacity"), UString("0.5"));
       
   126     textPrtBgVS->AddAttribute(bgoPrtTV);
       
   127     CustomAttributeStructure* bgcPrtTV = new (EMM) CustomAttributeStructure(
       
   128             UString("colour"), UString("0"));
       
   129     textPrtBgVS->AddAttribute(bgcPrtTV);
       
   130     prtBaseElem->AddVisualStructure(textPrtBgVS);
       
   131     
       
   132     //for text title
       
   133     LCTVisualStructure* textTPrtVS = new (EMM) LCTVisualStructure();
       
   134     textTPrtVS->SetId(UString(KMulTitle));
       
   135     textTPrtVS->SetPositions(10,9);
       
   136     textTPrtVS->SetDimensions(320,27);
       
   137     textTPrtVS->SetLCTId(UString("uiaccel_aacf_image_title_pane_t1"));
       
   138     textTPrtVS->SetVarietyId(0);
       
   139     //add extra attributes to the countervisual
       
   140     CustomAttributeStructure* textTStylePrt = new (EMM) CustomAttributeStructure(
       
   141              UString("style"), UString("qfn_secondary"));
       
   142     textTPrtVS->AddAttribute(textTStylePrt);
       
   143     
       
   144     CustomAttributeStructure* textTFtcPrt = new (EMM) CustomAttributeStructure(
       
   145             UString("fontthemecolor"), UString("9"));
       
   146     textTPrtVS->AddAttribute(textTFtcPrt);
       
   147     
       
   148     CustomAttributeStructure* textTHaPrt = new (EMM) CustomAttributeStructure(
       
   149             UString("horizontalalign"), UString("1"));
       
   150     textTPrtVS->AddAttribute(textTHaPrt);
       
   151     
       
   152     CustomAttributeStructure* textTVaPrt = new (EMM) CustomAttributeStructure(
       
   153             UString("verticalalign"), UString("1"));
       
   154     textTPrtVS->AddAttribute(textTVaPrt);
       
   155     
       
   156     CustomAttributeStructure* textTRedPrt = new (EMM) CustomAttributeStructure(
       
   157             UString("red"), UString("255"));
       
   158     textTPrtVS->AddAttribute(textTRedPrt);
       
   159     
       
   160      CustomAttributeStructure* textTGreenPrt = new (EMM) CustomAttributeStructure(
       
   161                 UString("green"), UString("255"));
       
   162      textTPrtVS->AddAttribute(textTGreenPrt);
       
   163      
       
   164     CustomAttributeStructure* textTBluePrt = new (EMM) CustomAttributeStructure(
       
   165         UString("blue"), UString("255"));
       
   166     textTPrtVS->AddAttribute(textTBluePrt);
       
   167     
       
   168     CustomAttributeStructure* textTAlphaPrt = new (EMM) CustomAttributeStructure(
       
   169         UString("alpha"), UString("0"));
       
   170     textTPrtVS->AddAttribute(textTAlphaPrt);
       
   171     
       
   172     CustomAttributeStructure* textTTsciPrt = new (EMM) CustomAttributeStructure(
       
   173             UString("textskincolorid"), UString("KAknsIIDQsnTextColors"));
       
   174     textTPrtVS->AddAttribute(textTTsciPrt);
       
   175     
       
   176     CustomAttributeStructure* textTTcsiPrt = new (EMM) CustomAttributeStructure(
       
   177         UString("textcolorskinindex"), UString("5"));
       
   178     textTPrtVS->AddAttribute(textTTcsiPrt);
       
   179     
       
   180     CustomAttributeStructure* textTOpacityPrt = new (EMM) CustomAttributeStructure(
       
   181         UString("opacity"), UString("1.0"));
       
   182     textTPrtVS->AddAttribute(textTOpacityPrt);
       
   183     
       
   184     prtBaseElem->AddVisualStructure(textTPrtVS);
       
   185     
       
   186     //for text detail
       
   187     LCTVisualStructure* textDPrtVS = new (EMM) LCTVisualStructure();
       
   188     textDPrtVS->SetId(UString(KMulDetail));
       
   189     textDPrtVS->SetPositions(10,46);
       
   190     textDPrtVS->SetDimensions(320,27);
       
   191     textDPrtVS->SetLCTId(UString("uiaccel_aacf_image_title_pane_t2"));
       
   192     textDPrtVS->SetVarietyId(0);
       
   193     //add extra attributes to the countervisual
       
   194     CustomAttributeStructure* textDStylePrt = new (EMM) CustomAttributeStructure(
       
   195              UString("style"), UString("qfn_secondary"));
       
   196     textDPrtVS->AddAttribute(textDStylePrt);
       
   197     
       
   198     CustomAttributeStructure* textDFtcPrt = new (EMM) CustomAttributeStructure(
       
   199             UString("fontthemecolor"), UString("9"));
       
   200     textDPrtVS->AddAttribute(textDFtcPrt);
       
   201     
       
   202     CustomAttributeStructure* textDHaPrt = new (EMM) CustomAttributeStructure(
       
   203             UString("horizontalalign"), UString("1"));
       
   204     textDPrtVS->AddAttribute(textDHaPrt);
       
   205     
       
   206     CustomAttributeStructure* textDVaPrt = new (EMM) CustomAttributeStructure(
       
   207             UString("verticalalign"), UString("1"));
       
   208     textDPrtVS->AddAttribute(textDVaPrt);
       
   209     
       
   210     CustomAttributeStructure* textDRedPrt = new (EMM) CustomAttributeStructure(
       
   211             UString("red"), UString("255"));
       
   212     textDPrtVS->AddAttribute(textTRedPrt);
       
   213     
       
   214      CustomAttributeStructure* textDGreenPrt = new (EMM) CustomAttributeStructure(
       
   215                 UString("green"), UString("255"));
       
   216      textDPrtVS->AddAttribute(textTGreenPrt);
       
   217      
       
   218     CustomAttributeStructure* textDBluePrt = new (EMM) CustomAttributeStructure(
       
   219         UString("blue"), UString("255"));
       
   220     textDPrtVS->AddAttribute(textTBluePrt);
       
   221     
       
   222     CustomAttributeStructure* textDAlphaPrt = new (EMM) CustomAttributeStructure(
       
   223         UString("alpha"), UString("0"));
       
   224     textDPrtVS->AddAttribute(textTAlphaPrt);
       
   225     
       
   226     CustomAttributeStructure* textDTsciPrt = new (EMM) CustomAttributeStructure(
       
   227             UString("textskincolorid"), UString("KAknsIIDQsnTextColors"));
       
   228     textDPrtVS->AddAttribute(textTTsciPrt);
       
   229     
       
   230     CustomAttributeStructure* textDTcsiPrt = new (EMM) CustomAttributeStructure(
       
   231         UString("textcolorskinindex"), UString("5"));
       
   232     textDPrtVS->AddAttribute(textDTcsiPrt);
       
   233     
       
   234     CustomAttributeStructure* textDOpacityPrt = new (EMM) CustomAttributeStructure(
       
   235         UString("opacity"), UString("0.7"));
       
   236     textDPrtVS->AddAttribute(textDOpacityPrt);
       
   237     
       
   238     CustomAttributeStructure* textDMarqueePrt = new (EMM) CustomAttributeStructure(
       
   239         UString("marquee"), UString("yes"));
       
   240     textDPrtVS->AddAttribute(textDMarqueePrt);
       
   241     
       
   242     prtBaseElem->AddVisualStructure(textDPrtVS);
       
   243 
       
   244 	prtBaseElem->AddVisualStructure(counterPrtVS);
       
   245 		
       
   246 	mTemplatePrtStruct.push_back(prtBaseElem);
       
   247 	
       
   248 	//now populate data for prtNonhilightElem element
       
   249     //----------------------------------------------------------------------
       
   250     LCTElementStructure* prtNonhilightElem = new (EMM) LCTElementStructure();
       
   251     prtNonhilightElem->SetId(UString("nohighlight"));
       
   252 
       
   253     //for backgroung of non-highlighted imagevisual        
       
   254     LCTVisualStructure* nHPrtDeckVs = new (EMM) LCTVisualStructure();
       
   255     nHPrtDeckVs->SetId(UString("deck"));
       
   256     CustomAttributeStructure* nHPrtDeckOpacity = new CustomAttributeStructure(
       
   257                 UString("opacity"),UString("1.0"),EAttributeOpacity);
       
   258     nHPrtDeckVs->AddAttribute(nHPrtDeckOpacity);
       
   259     prtNonhilightElem->AddVisualStructure(nHPrtDeckVs);
       
   260 	    
       
   261     //for non-highlighted imagevisual
       
   262     LCTVisualStructure* nonHPrtIcon = new (EMM) LCTVisualStructure();
       
   263     nonHPrtIcon->SetVisualType(EVisualImage);
       
   264     nonHPrtIcon->SetId(UString("mul_icon"));
       
   265     nonHPrtIcon->SetPositions(0,0);
       
   266     nonHPrtIcon->SetDimensions(340,340);
       
   267     nonHPrtIcon->SetLCTId(UString("uiaccel_aacf_image_pane_g1"));
       
   268     nonHPrtIcon->SetVarietyId(0);
       
   269     
       
   270     //ADD EXTRA ATTRIBUTE FOR FITMODE
       
   271        
       
   272     CustomAttributeStructure* nonHIPath = new CustomAttributeStructure(
       
   273         UString("imagepath"),UString("mul_icon"),EAttributeNone,
       
   274         ECategoryData);
       
   275     nonHPrtIcon->AddAttribute(nonHIPath);
       
   276     
       
   277     CustomAttributeStructure* nHIOpacity = new CustomAttributeStructure(
       
   278         UString("opacity"),UString("1.0"),EAttributeOpacity);
       
   279     nonHPrtIcon->AddAttribute(nHIOpacity);
       
   280     
       
   281     prtNonhilightElem->AddVisualStructure(nonHPrtIcon);
       
   282     
       
   283     mTemplatePrtStruct.push_back(prtNonhilightElem);
       
   284     
       
   285     //now populate data for prthilightElem element
       
   286     //----------------------------------------------------------------------
       
   287     LCTElementStructure* prtHilightElem = new (EMM) LCTElementStructure();
       
   288     prtHilightElem->SetId(UString("highlight"));
       
   289 
       
   290     //for backgroung of non-highlighted imagevisual        
       
   291     LCTVisualStructure* hPrtDeckVs = new (EMM) LCTVisualStructure();
       
   292     hPrtDeckVs->SetId(UString("deck"));
       
   293     CustomAttributeStructure* hDeckOpacity = new CustomAttributeStructure(
       
   294             UString("opacity"),UString("1.0"),EAttributeOpacity);
       
   295     hPrtDeckVs->AddAttribute(hDeckOpacity);
       
   296     prtHilightElem->AddVisualStructure(hPrtDeckVs);
       
   297         
       
   298     //for non-highlighted imagevisual
       
   299     LCTVisualStructure* hPrtIcon = new (EMM) LCTVisualStructure();
       
   300     hPrtIcon->SetVisualType(EVisualImage);
       
   301     hPrtIcon->SetId(UString("mul_icon"));
       
   302     hPrtIcon->SetPositions(0,0);
       
   303     hPrtIcon->SetDimensions(340,340);
       
   304     hPrtIcon->SetLCTId(UString("uiaccel_main_aa_coverflow_pane"));
       
   305     hPrtIcon->SetVarietyId(0);
       
   306     
       
   307     //ADD EXTRA ATTRIBUTE FOR FITMODE
       
   308         
       
   309     CustomAttributeStructure* hIPath = new CustomAttributeStructure(
       
   310             UString("mul_icon"),UString("imagepath"),EAttributeNone,
       
   311         ECategoryData);
       
   312     hPrtIcon->AddAttribute(hIPath);
       
   313     
       
   314     CustomAttributeStructure* hIOpacity = new CustomAttributeStructure(
       
   315         UString("opacity"),UString("1.0"),EAttributeOpacity);
       
   316     hPrtIcon->AddAttribute(hIOpacity);
       
   317     
       
   318     prtHilightElem->AddVisualStructure(hPrtIcon);
       
   319     
       
   320     mTemplatePrtStruct.push_back(prtHilightElem);
       
   321     
       
   322 	//==========================================================================	
       
   323 	//same procedure for filling up of LSC
       
   324 	//==========================================================================
       
   325 	//for main layout
       
   326 	LCTElementStructure* lscBaseElem = new (EMM) LCTElementStructure();
       
   327 	lscBaseElem->SetId(UString("base"));
       
   328 	LCTVisualStructure* mainLscVS2 = new (EMM) LCTVisualStructure();
       
   329 	mainLscVS2->SetId(UString("mainlayout"));
       
   330 	mainLscVS2->SetPositions(0,0);
       
   331 	mainLscVS2->SetDimensions(502,299);
       
   332 	mainLscVS2->SetLCTId(UString("uiaccel_main_aa_coverflow_pane"));
       
   333 	mainLscVS2->SetVarietyId(0);	
       
   334 	CustomAttributeStructure* mainLscOpacity = new (EMM) CustomAttributeStructure(
       
   335 	            UString("opacity"), UString("1.0"));	
       
   336 	mainLscVS2->AddAttribute(mainLscOpacity);
       
   337 	lscBaseElem->AddVisualStructure(mainLscVS2);	
       
   338 	//for item_center
       
   339 	LCTVisualStructure* item_centerLscVs = new (EMM) LCTVisualStructure();
       
   340 	item_centerLscVs->SetId(UString("item_center"));
       
   341 	item_centerLscVs->SetPositions(114,16);
       
   342 	item_centerLscVs->SetDimensions(266,266);
       
   343 	item_centerLscVs->SetLCTId(UString("uiaccel_aacf_image_pane"));
       
   344 	item_centerLscVs->SetVarietyId(1);
       
   345 	CustomAttributeStructure* item_centerLscFM = new (EMM) CustomAttributeStructure(
       
   346 	        UString("fitmode"), UString("off"));
       
   347 	item_centerLscVs->AddAttribute(item_centerLscFM);
       
   348 	lscBaseElem->AddVisualStructure(item_centerLscVs);
       
   349 	// For Counter
       
   350 	LCTVisualStructure* counterLscVS = new (EMM) LCTVisualStructure();
       
   351 	counterLscVS->SetId(UString("mul_count"));
       
   352 	counterLscVS->SetPositions(420,32);
       
   353 	counterLscVS->SetDimensions(112,21);
       
   354 	counterLscVS->SetLCTId(UString("uiaccel_main_aa_coverflow_pane_t1"));
       
   355 	counterLscVS->SetVarietyId(1);
       
   356     //add extra attributes to the gridlayout    
       
   357     CustomAttributeStructure* styleLscC = new (EMM) CustomAttributeStructure(
       
   358             UString("style"), UString("qfn_secondary"));
       
   359     
       
   360     CustomAttributeStructure* opacityLscC = new (EMM) CustomAttributeStructure(
       
   361             UString("opacity"), UString("1.0"));
       
   362     
       
   363     CustomAttributeStructure* redLscC = new (EMM) CustomAttributeStructure(
       
   364             UString("red"), UString("255"));
       
   365     
       
   366      CustomAttributeStructure* greenLscC = new (EMM) CustomAttributeStructure(
       
   367                 UString("green"), UString("255"));
       
   368      
       
   369     CustomAttributeStructure* blueLscC = new (EMM) CustomAttributeStructure(
       
   370         UString("blue"), UString("255"));
       
   371     
       
   372     CustomAttributeStructure* alphaLscC = new (EMM) CustomAttributeStructure(
       
   373         UString("alpha"), UString("0"));
       
   374     
       
   375     CustomAttributeStructure* horizontalalignLscC = new (EMM) CustomAttributeStructure(
       
   376             UString("horizontalalign"), UString("2"));
       
   377             
       
   378     counterLscVS->AddAttribute(styleLscC);
       
   379     counterLscVS->AddAttribute(opacityLscC);
       
   380     counterLscVS->AddAttribute(redLscC);
       
   381     counterLscVS->AddAttribute(greenLscC);
       
   382     counterLscVS->AddAttribute(blueLscC);
       
   383     counterLscVS->AddAttribute(alphaLscC);
       
   384     counterLscVS->AddAttribute(horizontalalignLscC);
       
   385     
       
   386 	lscBaseElem->AddVisualStructure(counterLscVS);
       
   387 	
       
   388 	//for text layout
       
   389     LCTVisualStructure* textLscLtVS = new (EMM) LCTVisualStructure();
       
   390     textLscLtVS->SetId(UString(KText));
       
   391     textLscLtVS->SetPositions(114,210);
       
   392     textLscLtVS->SetDimensions(266,72);
       
   393     textLscLtVS->SetLCTId(UString("uiaccel_aacf_image_title_pane"));
       
   394     textLscLtVS->SetVarietyId(1);
       
   395     lscBaseElem->AddVisualStructure(textLscLtVS);
       
   396     
       
   397     //for text background
       
   398     LCTVisualStructure* textLscBgVS = new (EMM) LCTVisualStructure();
       
   399     textLscBgVS->SetId(UString(KMulBackGround));
       
   400     textLscBgVS->SetPositions(0,0);
       
   401     textLscBgVS->SetDimensions(266,72);
       
   402     textLscBgVS->SetLCTId(UString("uiaccel_aacf_image_title_pane_g1"));
       
   403     textLscBgVS->SetVarietyId(0);
       
   404     //Add attributes to the text background visual
       
   405     CustomAttributeStructure* bgHaLscTV = new (EMM) CustomAttributeStructure(
       
   406                 UString("horizontalalign"), UString("1"));
       
   407     textLscBgVS->AddAttribute(bgHaLscTV);
       
   408     CustomAttributeStructure* bgoLscTV = new (EMM) CustomAttributeStructure(
       
   409         UString("opacity"), UString("0.5"));
       
   410     textLscBgVS->AddAttribute(bgoLscTV);
       
   411     CustomAttributeStructure* bgcLscTV = new (EMM) CustomAttributeStructure(
       
   412             UString("colour"), UString("0"));
       
   413     textLscBgVS->AddAttribute(bgcLscTV);
       
   414     lscBaseElem->AddVisualStructure(textLscBgVS);
       
   415     
       
   416     //for text title
       
   417     LCTVisualStructure* textTLscVS = new (EMM) LCTVisualStructure();
       
   418     textTLscVS->SetId(UString(KMulTitle));
       
   419     textTLscVS->SetPositions(3,4);
       
   420     textTLscVS->SetDimensions(260,27);
       
   421     textTLscVS->SetLCTId(UString("uiaccel_aacf_image_title_pane_t1"));
       
   422     textTLscVS->SetVarietyId(0);
       
   423     //add extra attributes to the countervisual
       
   424     CustomAttributeStructure* textTStyleLsc = new (EMM) CustomAttributeStructure(
       
   425              UString("style"), UString("qfn_secondary"));
       
   426     textTLscVS->AddAttribute(textTStyleLsc);
       
   427     
       
   428     CustomAttributeStructure* textTFtcLsc = new (EMM) CustomAttributeStructure(
       
   429             UString("fontthemecolor"), UString("9"));
       
   430     textTLscVS->AddAttribute(textTFtcLsc);
       
   431     
       
   432     CustomAttributeStructure* textTHaLsc = new (EMM) CustomAttributeStructure(
       
   433             UString("horizontalalign"), UString("1"));
       
   434     textTLscVS->AddAttribute(textTHaLsc);
       
   435     
       
   436     CustomAttributeStructure* textTVaLsc = new (EMM) CustomAttributeStructure(
       
   437             UString("verticalalign"), UString("1"));
       
   438     textTLscVS->AddAttribute(textTVaLsc);
       
   439     
       
   440     CustomAttributeStructure* textTRedLsc = new (EMM) CustomAttributeStructure(
       
   441             UString("red"), UString("255"));
       
   442     textTLscVS->AddAttribute(textTRedLsc);
       
   443     
       
   444      CustomAttributeStructure* textTGreenLsc = new (EMM) CustomAttributeStructure(
       
   445                 UString("green"), UString("255"));
       
   446      textTLscVS->AddAttribute(textTGreenLsc);
       
   447      
       
   448     CustomAttributeStructure* textTBlueLsc = new (EMM) CustomAttributeStructure(
       
   449         UString("blue"), UString("255"));
       
   450     textTLscVS->AddAttribute(textTBlueLsc);
       
   451     
       
   452     CustomAttributeStructure* textTAlphaLsc = new (EMM) CustomAttributeStructure(
       
   453         UString("alpha"), UString("0"));
       
   454     textTLscVS->AddAttribute(textTAlphaLsc);
       
   455     
       
   456     CustomAttributeStructure* textTTsciLsc = new (EMM) CustomAttributeStructure(
       
   457             UString("textskincolorid"), UString("KAknsIIDQsnTextColors"));
       
   458     textTLscVS->AddAttribute(textTTsciLsc);
       
   459     
       
   460     CustomAttributeStructure* textTTcsiLsc = new (EMM) CustomAttributeStructure(
       
   461         UString("textcolorskinindex"), UString("5"));
       
   462     textTLscVS->AddAttribute(textTTcsiLsc);
       
   463     
       
   464     CustomAttributeStructure* textTOpacityLsc = new (EMM) CustomAttributeStructure(
       
   465         UString("opacity"), UString("1.0"));
       
   466     textTLscVS->AddAttribute(textTOpacityLsc);
       
   467     
       
   468     lscBaseElem->AddVisualStructure(textTLscVS);
       
   469     
       
   470     //for text detail
       
   471     LCTVisualStructure* textDLscVS = new (EMM) LCTVisualStructure();
       
   472     textDLscVS->SetId(UString(KMulDetail));
       
   473     textDLscVS->SetPositions(4,38);
       
   474     textDLscVS->SetDimensions(260,27);
       
   475     textDLscVS->SetLCTId(UString("uiaccel_aacf_image_title_pane_t2"));
       
   476     textDLscVS->SetVarietyId(0);
       
   477     //add extra attributes to the countervisual
       
   478     CustomAttributeStructure* textDStyleLsc = new (EMM) CustomAttributeStructure(
       
   479              UString("style"), UString("qfn_secondary"));
       
   480     textDLscVS->AddAttribute(textDStyleLsc);
       
   481     
       
   482     CustomAttributeStructure* textDFtcLsc = new (EMM) CustomAttributeStructure(
       
   483             UString("fontthemecolor"), UString("9"));
       
   484     textDLscVS->AddAttribute(textDFtcLsc);
       
   485     
       
   486     CustomAttributeStructure* textDHaLsc = new (EMM) CustomAttributeStructure(
       
   487             UString("horizontalalign"), UString("1"));
       
   488     textDLscVS->AddAttribute(textDHaLsc);
       
   489     
       
   490     CustomAttributeStructure* textDVaLsc = new (EMM) CustomAttributeStructure(
       
   491             UString("verticalalign"), UString("1"));
       
   492     textDLscVS->AddAttribute(textDVaLsc);
       
   493     
       
   494     CustomAttributeStructure* textDRedLsc = new (EMM) CustomAttributeStructure(
       
   495             UString("red"), UString("255"));
       
   496     textDLscVS->AddAttribute(textDRedLsc);
       
   497     
       
   498      CustomAttributeStructure* textDGreenLsc = new (EMM) CustomAttributeStructure(
       
   499                 UString("green"), UString("255"));
       
   500      textDLscVS->AddAttribute(textDGreenLsc);
       
   501      
       
   502     CustomAttributeStructure* textDBlueLsc = new (EMM) CustomAttributeStructure(
       
   503         UString("blue"), UString("255"));
       
   504     textDLscVS->AddAttribute(textDBlueLsc);
       
   505     
       
   506     CustomAttributeStructure* textDAlphaLsc = new (EMM) CustomAttributeStructure(
       
   507         UString("alpha"), UString("0"));
       
   508     textDLscVS->AddAttribute(textDAlphaLsc);
       
   509     
       
   510     CustomAttributeStructure* textDTsciLsc = new (EMM) CustomAttributeStructure(
       
   511             UString("textskincolorid"), UString("KAknsIIDQsnTextColors"));
       
   512     textDLscVS->AddAttribute(textDTsciLsc);
       
   513     
       
   514     CustomAttributeStructure* textDTcsiLsc = new (EMM) CustomAttributeStructure(
       
   515         UString("textcolorskinindex"), UString("5"));
       
   516     textDLscVS->AddAttribute(textDTcsiLsc);
       
   517     
       
   518     CustomAttributeStructure* textDOpacityLsc = new (EMM) CustomAttributeStructure(
       
   519         UString("opacity"), UString("0.7"));
       
   520     textDLscVS->AddAttribute(textDOpacityLsc);
       
   521     
       
   522     CustomAttributeStructure* textDMarqueeLsc = new (EMM) CustomAttributeStructure(
       
   523         UString("marquee"), UString("yes"));
       
   524     textDLscVS->AddAttribute(textDMarqueeLsc);
       
   525     
       
   526     lscBaseElem->AddVisualStructure(textDLscVS);
       
   527 	mTemplateLscStruct.push_back(lscBaseElem);
       
   528 	
       
   529    //now populate data for prtNonhilightElem element
       
   530     //----------------------------------------------------------------------
       
   531     LCTElementStructure* lscNonhilightElem = new (EMM) LCTElementStructure();
       
   532     lscNonhilightElem->SetId(UString("nohighlight"));
       
   533 
       
   534     //for backgroung of non-highlighted imagevisual        
       
   535     LCTVisualStructure* nHLscDeckVs = new (EMM) LCTVisualStructure();
       
   536     nHLscDeckVs->SetId(UString("deck"));
       
   537     CustomAttributeStructure* nHDeckOpacity = new CustomAttributeStructure(
       
   538                 UString("opacity"),UString("1"),EAttributeOpacity);
       
   539     nHLscDeckVs->AddAttribute(nHDeckOpacity);
       
   540     lscNonhilightElem->AddVisualStructure(nHLscDeckVs);
       
   541         
       
   542     //for non-highlighted imagevisual
       
   543     LCTVisualStructure* nonHLscIcon = new (EMM) LCTVisualStructure();
       
   544     nonHLscIcon->SetVisualType(EVisualImage);
       
   545     nonHLscIcon->SetId(UString("mul_icon"));
       
   546     nonHLscIcon->SetPositions(0,0);
       
   547     nonHLscIcon->SetDimensions(640,360);
       
   548     nonHLscIcon->SetLCTId(UString("uiaccel_main_aa_coverflow_pane"));
       
   549     nonHLscIcon->SetVarietyId(1);
       
   550     
       
   551     //ADD EXTRA ATTRIBUTE FOR FITMODE
       
   552        
       
   553     CustomAttributeStructure* nonHLscIPath = new CustomAttributeStructure(
       
   554         UString("imagepath"),UString("mul_icon"),EAttributeNone,
       
   555         ECategoryData);
       
   556     nonHLscIcon->AddAttribute(nonHLscIPath);
       
   557     
       
   558     CustomAttributeStructure* nHLscIOpacity = new CustomAttributeStructure(
       
   559         UString("opacity"),UString("1"),EAttributeOpacity);
       
   560     nonHLscIcon->AddAttribute(nHLscIOpacity);
       
   561     
       
   562     lscNonhilightElem->AddVisualStructure(nonHLscIcon);
       
   563     
       
   564     mTemplateLscStruct.push_back(lscNonhilightElem);
       
   565 	    
       
   566     //now populate data for prthilightElem element
       
   567     //----------------------------------------------------------------------
       
   568     LCTElementStructure* lscHilightElem = new (EMM) LCTElementStructure();
       
   569     lscHilightElem->SetId(UString("highlight"));
       
   570 
       
   571     //for backgroung of non-highlighted imagevisual        
       
   572     LCTVisualStructure* hLscDeckVs = new (EMM) LCTVisualStructure();
       
   573     hLscDeckVs->SetId(UString("deck"));
       
   574     CustomAttributeStructure* hLscDeckOpacity = new CustomAttributeStructure(
       
   575             UString("opacity"),UString("1"),EAttributeOpacity);
       
   576     hLscDeckVs->AddAttribute(hLscDeckOpacity);
       
   577     lscHilightElem->AddVisualStructure(hLscDeckVs);
       
   578         
       
   579     //for non-highlighted imagevisual
       
   580     LCTVisualStructure* hLscIcon = new (EMM) LCTVisualStructure();
       
   581     hLscIcon->SetVisualType(EVisualImage);
       
   582     hLscIcon->SetId(UString("mul_icon"));
       
   583     hLscIcon->SetPositions(0,0);
       
   584     hLscIcon->SetDimensions(360,640);
       
   585     hLscIcon->SetLCTId(UString("uiaccel_main_aa_coverflow_pane"));
       
   586     hLscIcon->SetVarietyId(1);
       
   587     
       
   588     //ADD EXTRA ATTRIBUTE FOR FITMODE
       
   589     
       
   590     CustomAttributeStructure* hLscIPath = new CustomAttributeStructure(
       
   591         UString("imagepath"),UString("mul_icon"),EAttributeNone,
       
   592         ECategoryData);
       
   593     hLscIcon->AddAttribute(hLscIPath);
       
   594     
       
   595     CustomAttributeStructure* hLscIOpacity = new CustomAttributeStructure(
       
   596         UString("opacity"),UString("1"),EAttributeOpacity);
       
   597     hLscIcon->AddAttribute(hLscIOpacity);
       
   598     
       
   599     lscHilightElem->AddVisualStructure(hLscIcon);
       
   600     
       
   601     mTemplateLscStruct.push_back(lscHilightElem);
       
   602     }
       
   603 		    
       
   604     }//namespace ends