uifw/AvKon/src/aknnotecontrol.cpp
branchRCL_3
changeset 72 a5e7a4f63858
parent 56 d48ab3b357f1
equal deleted inserted replaced
64:85902f042028 72:a5e7a4f63858
   669         for (TInt i=0; i < nLines; i++)
   669         for (TInt i=0; i < nLines; i++)
   670             {
   670             {
   671 
   671 
   672             AknLayoutUtils::LayoutLabel(TextControl()->Line(i),LayoutRect(),
   672             AknLayoutUtils::LayoutLabel(TextControl()->Line(i),LayoutRect(),
   673                 AKN_LAYOUT_TEXT_Note_with_an_image_pop_up_window_texts_Line_1(
   673                 AKN_LAYOUT_TEXT_Note_with_an_image_pop_up_window_texts_Line_1(
   674                 lafIndex.NWIPWindowTextsLine1Left(i),lafIndex.NWIPWindowTextsLine1Right(i),
   674                 lafIndex.NWIPWindowTextsLine1L(i),lafIndex.NWIPWindowTextsLine1R(i),
   675                 lafIndex.NWIPWindowTextsLine1B(i),lafIndex.NWIPWindowTextsLine1W(i)));
   675                 lafIndex.NWIPWindowTextsLine1B(i),lafIndex.NWIPWindowTextsLine1W(i)));
   676 
   676 
   677             if (!error)
   677             if (!error)
   678               {
   678               {
   679                 // Ignore error
   679                 // Ignore error
   914             TIndex lafIndex(KINMaxNumLines,Icon()!=NULL,imageSize);
   914             TIndex lafIndex(KINMaxNumLines,Icon()!=NULL,imageSize);
   915         
   915         
   916             for (TInt i=0; i < KINMaxNumLines; i++)
   916             for (TInt i=0; i < KINMaxNumLines; i++)
   917                 {
   917                 {
   918                 TAknTextLineLayout lay = AKN_LAYOUT_TEXT_Note_with_an_image_pop_up_window_texts_Line_1(
   918                 TAknTextLineLayout lay = AKN_LAYOUT_TEXT_Note_with_an_image_pop_up_window_texts_Line_1(
   919                     lafIndex.NWIPWindowTextsLine1Left(i),lafIndex.NWIPWindowTextsLine1Right(i),
   919                     lafIndex.NWIPWindowTextsLine1L(i),lafIndex.NWIPWindowTextsLine1R(i),
   920                     lafIndex.NWIPWindowTextsLine1B(i),lafIndex.NWIPWindowTextsLine1W(i));
   920                     lafIndex.NWIPWindowTextsLine1B(i),lafIndex.NWIPWindowTextsLine1W(i));
   921                 text.LayoutText(LayoutRect(), lay);
   921                 text.LayoutText(LayoutRect(), lay);
   922                 TInt width = text.TextRect().Width();
   922                 TInt width = text.TextRect().Width();
   923             
   923             
   924                 iLineWidths->AppendL(width,1);
   924                 iLineWidths->AppendL(width,1);
  1159  * @see CAknTextControl
  1159  * @see CAknTextControl
  1160  */
  1160  */
  1161 EXPORT_C void CAknNoteControl::ResetText()
  1161 EXPORT_C void CAknNoteControl::ResetText()
  1162     {
  1162     {
  1163     // This can not Leave so no need to use TRAP 
  1163     // This can not Leave so no need to use TRAP 
  1164     TRAP_IGNORE(Attributes()->SetTextL(KNullDesC));
  1164     Attributes()->SetTextL(KNullDesC);
  1165     Layout();
  1165     Layout();
  1166     }
  1166     }
  1167 
  1167 
  1168 /**
  1168 /**
  1169  * Set whole text for the note control.
  1169  * Set whole text for the note control.
  1477  * Return Left index into table "Note With Image Popup Window Texts Line 1"
  1477  * Return Left index into table "Note With Image Popup Window Texts Line 1"
  1478  * Index depends on number of text lines, whether or not there is a
  1478  * Index depends on number of text lines, whether or not there is a
  1479  * number type indication (NTI). See table in *.lay and
  1479  * number type indication (NTI). See table in *.lay and
  1480  * LAF specs for working out indexes.
  1480  * LAF specs for working out indexes.
  1481  */
  1481  */
  1482 TInt CAknNoteControl::TIndex::NWIPWindowTextsLine1Left(TInt aLineNum) const
  1482 TInt CAknNoteControl::TIndex::NWIPWindowTextsLine1L(TInt aLineNum) const
  1483     {
  1483     {
  1484     SelfTest();
  1484     SelfTest();
  1485     static const TInt  KNWIPWindowTextsLine1IndexLeft[2][3] = 
  1485     static const TInt  KNWIPWindowTextsLine1IndexL[2][3] = 
  1486     {   
  1486     {   
  1487         {0, 0, 0}, //NO NTI
  1487         {0, 0, 0}, //NO NTI
  1488         {0, 0, 2}  //NTI
  1488         {0, 0, 2}  //NTI
  1489     }; 
  1489     }; 
  1490     
  1490     
  1491     return KNWIPWindowTextsLine1IndexLeft[HasNtiIndex()][aLineNum];
  1491     return KNWIPWindowTextsLine1IndexL[HasNtiIndex()][aLineNum];
  1492     }
  1492     }
  1493 
  1493 
  1494 /**
  1494 /**
  1495  * Return Right index into table "Note With Image Popup Window Texts Line 1"
  1495  * Return Right index into table "Note With Image Popup Window Texts Line 1"
  1496  * Index depends on number of text lines and image size. 
  1496  * Index depends on number of text lines and image size. 
  1499  * Table has 3 dimensions:-
  1499  * Table has 3 dimensions:-
  1500  * - Dimension 1 is the line number
  1500  * - Dimension 1 is the line number
  1501  * - Dimension 2 is the image width  
  1501  * - Dimension 2 is the image width  
  1502  * - Dimension 3 is the image height 
  1502  * - Dimension 3 is the image height 
  1503  */
  1503  */
  1504 TInt CAknNoteControl::TIndex::NWIPWindowTextsLine1Right(TInt aLineNum) const
  1504 TInt CAknNoteControl::TIndex::NWIPWindowTextsLine1R(TInt aLineNum) const
  1505     {
  1505     {
  1506     SelfTest();
  1506     SelfTest();
  1507 
  1507 
  1508     static const TInt  KNWIPWindowTextsLine1IndexRight[3][5][5] = 
  1508     static const TInt  KNWIPWindowTextsLine1IndexR[3][5][5] = 
  1509     {   
  1509     {   
  1510         {{0, 0, 0, 0, 0}, {0, 3, 3, 3, 3}, {0, 5, 5, 5, 5}, {0, 7, 7, 7, 7}, {0, 9, 9, 9, 9} }, //FIRST LINE
  1510         {{0, 0, 0, 0, 0}, {0, 3, 3, 3, 3}, {0, 5, 5, 5, 5}, {0, 7, 7, 7, 7}, {0, 9, 9, 9, 9} }, //FIRST LINE
  1511         {{0, 0, 0, 0, 0}, {0, 3, 3, 3, 3}, {0, 5, 5, 5, 5}, {0, 7, 7, 7, 7}, {0, 9, 9, 9, 9} }, //SECOND LINE
  1511         {{0, 0, 0, 0, 0}, {0, 3, 3, 3, 3}, {0, 5, 5, 5, 5}, {0, 7, 7, 7, 7}, {0, 9, 9, 9, 9} }, //SECOND LINE
  1512         {{0, 0, 0, 0, 0}, {0, 0, 0, 3, 3}, {0, 0, 0, 5, 5}, {0, 0, 0, 7, 7}, {0, 0, 0, 9, 9} }  //THIRD LINE
  1512         {{0, 0, 0, 0, 0}, {0, 0, 0, 3, 3}, {0, 0, 0, 5, 5}, {0, 0, 0, 7, 7}, {0, 0, 0, 9, 9} }  //THIRD LINE
  1513     }; 
  1513     }; 
  1514     
  1514     
  1515     return KNWIPWindowTextsLine1IndexRight[aLineNum][ImageWidthIndex()][ImageHeightIndex()];
  1515     return KNWIPWindowTextsLine1IndexR[aLineNum][ImageWidthIndex()][ImageHeightIndex()];
  1516 
  1516 
  1517     }
  1517     }
  1518 
  1518 
  1519 /**
  1519 /**
  1520  * Return Bottom index into table "Note With Image Popup Window Texts Line 1"
  1520  * Return Bottom index into table "Note With Image Popup Window Texts Line 1"