emailuis/uicomponents/src/fstreeplaintwolineitemvisualizer.cpp
branchRCL_3
changeset 16 4ce476e64c59
parent 12 f5907b1a1053
child 19 b13141f05c3d
equal deleted inserted replaced
13:0396474f30f5 16:4ce476e64c59
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 *  Description : A visualizer for data items with plain text.
    14 *  Description : A visualizer for data items with plain text.
    15 *  Version     : %version: tr1sido#15 %
    15 *  Version     : %version: tr1sido#16 %
    16 *
    16 *
    17 */
    17 */
    18 
    18 
    19 
    19 
    20 //<cmail> removed __FS_ALFRED_SUPPORT flag
    20 //<cmail> removed __FS_ALFRED_SUPPORT flag
   268     TAlfTimedPoint tpMenuIconTl, tpMenuIconBr;
   268     TAlfTimedPoint tpMenuIconTl, tpMenuIconBr;
   269     TAlfTimedPoint tpFlagIconTl, tpFlagIconBr;
   269     TAlfTimedPoint tpFlagIconTl, tpFlagIconBr;
   270     TAlfTimedPoint tpSubjTextTl, tpSubjTextBr;
   270     TAlfTimedPoint tpSubjTextTl, tpSubjTextBr;
   271     TAlfTimedPoint tpPrevTextTl, tpPrevTextBr;
   271     TAlfTimedPoint tpPrevTextTl, tpPrevTextBr;
   272     
   272     
   273     // <cmail> Layouts
       
   274     
       
   275 /*
       
   276     CFsLayoutManager::TFsLayoutMetrics
       
   277         mainIconMetrics = CFsLayoutManager::EFsLmListMediumLineT2G3G1,
       
   278         markIconMetrics = CFsLayoutManager::EFsLmListMediumLineT2G3G2,
       
   279         menuIconMetrics = CFsLayoutManager::EFsLmListMediumLineT2G3G3,
       
   280         //<cmail> ???        
       
   281         sizeMetrics     = CFsLayoutManager::EFsLmListSingleDycRowPane,
       
   282         //</cmail>
       
   283         exSizeMetrics   = CFsLayoutManager::EFsLmListMediumLineX2,
       
   284         preSizeMetrics  = CFsLayoutManager::EFsLmListMediumLineX3,
       
   285         flagIconMetrics = CFsLayoutManager::EFsLmListMediumLineX2G1;
       
   286 */
       
   287 
       
   288     CFsLayoutManager::TFsLayoutMetrics
   273     CFsLayoutManager::TFsLayoutMetrics
   289         mainIconMetrics = CFsLayoutManager::EFsLmListSingleDycRowPaneG1,
   274         mainIconMetrics = CFsLayoutManager::EFsLmListSingleDycRowPaneG1,
   290         markIconMetrics = CFsLayoutManager::EFsLmListSingleDycRowPaneG4,
   275         markIconMetrics = CFsLayoutManager::EFsLmListSingleDycRowPaneG4,
   291         menuIconMetrics = CFsLayoutManager::EFsLmListSingleDycRowPaneG3,
   276         menuIconMetrics = CFsLayoutManager::EFsLmListSingleDycRowPaneG3,
   292         sizeMetrics     = CFsLayoutManager::EFsLmListSingleDycRowPane,
   277         sizeMetrics     = CFsLayoutManager::EFsLmListSingleDycRowPane,
   363                 if ((iFlags & KFsTreeListItemHasMenu)
   348                 if ((iFlags & KFsTreeListItemHasMenu)
   364                         && (iFlags & KFsTreeListItemFocused))
   349                         && (iFlags & KFsTreeListItemFocused))
   365                     {
   350                     {
   366                     //mainIcon + markIcon + menuIcon
   351                     //mainIcon + markIcon + menuIcon
   367                     mainIconMetrics =
   352                     mainIconMetrics =
   368                         CFsLayoutManager::EFsLmListSingleDycRowPaneG1;//EFsLmListMediumLineX2T3G4G1;
   353                         CFsLayoutManager::EFsLmListSingleDycRowPaneG1;
   369                     mainIconVariety = 3;
   354                     mainIconVariety = 3;
   370                     if (IsPreviewPaneOn())
   355                     if (IsPreviewPaneOn())
   371                         {
   356                         {
   372                         markIconMetrics =
   357                         markIconMetrics =
   373                             CFsLayoutManager::EFsLmListSingleDycRowPaneG4;//EFsLmListMediumLineX3T4G4G4;
   358                             CFsLayoutManager::EFsLmListSingleDycRowPaneG4;
   374                         markIconVariety = 5;
   359                         markIconVariety = 5;
   375 						markIconRow = 2;
   360 						markIconRow = 2;
   376                         }
   361                         }
   377                     else
   362                     else
   378                         {
   363                         {
   379                         markIconMetrics =
   364                         markIconMetrics =
   380                             CFsLayoutManager::EFsLmListSingleDycRowPaneG3;//EFsLmListMediumLineX2T3G4G2;
   365                             CFsLayoutManager::EFsLmListSingleDycRowPaneG3;
   381                         markIconVariety = 1;
   366                         markIconVariety = 1;
   382 						markIconRow = 0;
   367 						markIconRow = 0;
   383                         }
   368                         }
   384                     menuIconMetrics =
   369                     menuIconMetrics =
   385                         CFsLayoutManager::EFsLmListSingleDycRowPaneG4;
   370                         CFsLayoutManager::EFsLmListSingleDycRowPaneG4;
   997                              CFsLayoutManager::EFsLmListSingleDycRowTextPaneT1;
   982                              CFsLayoutManager::EFsLmListSingleDycRowTextPaneT1;
   998                         firstLineTextVarieties[0] = 33;
   983                         firstLineTextVarieties[0] = 33;
   999                         firstLineTextMetrics[1] =
   984                         firstLineTextMetrics[1] =
  1000                              CFsLayoutManager::EFsLmListSingleDycRowTextPaneT3;
   985                              CFsLayoutManager::EFsLmListSingleDycRowTextPaneT3;
  1001                         firstLineTextVarieties[1] = 24;
   986                         firstLineTextVarieties[1] = 24;
  1002 //                        firstLineTextMetrics[2] =
       
  1003 //                             CFsLayoutManager::EFsLmListMediumLineT3RightIconx2T3;
       
  1004                         }
   987                         }
  1005                     }
   988                     }
  1006                 else
   989                 else
  1007                     {
   990                     {
  1008                     //markIcon
   991                     //markIcon
  1028                             CFsLayoutManager::EFsLmListSingleDycRowTextPaneT2;
  1011                             CFsLayoutManager::EFsLmListSingleDycRowTextPaneT2;
  1029                         firstLineTextVarieties[1] = 16;
  1012                         firstLineTextVarieties[1] = 16;
  1030                         }
  1013                         }
  1031                     else if (firstLineTextFields==3)
  1014                     else if (firstLineTextFields==3)
  1032                         {
  1015                         {
  1033 //                        markIconMetrics =
       
  1034 //                            CFsLayoutManager::EFsLmListMediumLineT3RightIconG1;
       
  1035 //                        firstLineTextMetrics[0] =
       
  1036 //                            CFsLayoutManager::EFsLmListMediumLineT3RightIconT1;
       
  1037 //                        firstLineTextMetrics[1] =
       
  1038 //                            CFsLayoutManager::EFsLmListMediumLineT3RightIconT2;
       
  1039 //                        firstLineTextMetrics[2] =
       
  1040 //                            CFsLayoutManager::EFsLmListMediumLineT32RightIconT2;
       
  1041                         }
  1016                         }
  1042                     }
  1017                     }
  1043                 }
  1018                 }
  1044             else
  1019             else
  1045                 {
  1020                 {
  1069                             CFsLayoutManager::EFsLmListSingleDycRowTextPaneT2;
  1044                             CFsLayoutManager::EFsLmListSingleDycRowTextPaneT2;
  1070                         firstLineTextVarieties[1] = 16;
  1045                         firstLineTextVarieties[1] = 16;
  1071                         }
  1046                         }
  1072                     else if (firstLineTextFields==3)
  1047                     else if (firstLineTextFields==3)
  1073                         {
  1048                         {
  1074 //                        menuIconMetrics =
       
  1075 //                            CFsLayoutManager::EFsLmListMediumLineT3RightIconG1;
       
  1076 //                        firstLineTextMetrics[0] =
       
  1077 //                            CFsLayoutManager::EFsLmListMediumLineT3RightIconT1;
       
  1078 //                        firstLineTextMetrics[1] =
       
  1079 //                            CFsLayoutManager::EFsLmListMediumLineT3RightIconT2;
       
  1080 //                        firstLineTextMetrics[2] =
       
  1081 //                            CFsLayoutManager::EFsLmListMediumLineT3RightIconT2;
       
  1082                         }
  1049                         }
  1083                     }
  1050                     }
  1084                 else
  1051                 else
  1085                     {
  1052                     {
  1086                     //plain item
  1053                     //plain item
  1279 
  1246 
  1280         if ((iFlags & KFsTreeListItemAlwaysExtended) ||
  1247         if ((iFlags & KFsTreeListItemAlwaysExtended) ||
  1281                 (iFlags & KFsTreeListItemExtended))
  1248                 (iFlags & KFsTreeListItemExtended))
  1282             {
  1249             {
  1283             TRect secondLineParentRect;
  1250             TRect secondLineParentRect;
  1284             CFsLayoutManager::LayoutMetricsRect(currentSize, CFsLayoutManager::EFsLmListSingleDycRowPane, secondLineParentRect, 1, 1);
  1251             
       
  1252             // WORKAROUND FIX FOR LAYOUT PROBLEM -- RETURN THIS TO NORMAL WHEN LAYOUT'S ARE OK
       
  1253             //CFsLayoutManager::LayoutMetricsRect(currentSize, CFsLayoutManager::EFsLmListSingleDycRowPane, secondLineParentRect, 1, 1);
       
  1254             CFsLayoutManager::LayoutMetricsRect(currentSize, CFsLayoutManager::EFsLmListSingleDycRowPane, secondLineParentRect, 2, 1);
       
  1255             // WORKAROUND FIX FOR LAYOUT PROBLEM -- RETURN THIS TO NORMAL WHEN LAYOUT'S ARE OK
       
  1256             
  1285             CFsLayoutManager::LayoutMetricsRect(secondLineParentRect, CFsLayoutManager::EFsLmListSingleDycRowTextPane, secondLineParentRect, secondLineTextVariety);
  1257             CFsLayoutManager::LayoutMetricsRect(secondLineParentRect, CFsLayoutManager::EFsLmListSingleDycRowTextPane, secondLineParentRect, secondLineTextVariety);
  1286             CFsLayoutManager::LayoutMetricsText(secondLineParentRect,
  1258             CFsLayoutManager::LayoutMetricsText(secondLineParentRect,
  1287                     secondLineTextMetrics, subjTextInfo, secondLineTextVariety);
  1259                     secondLineTextMetrics, subjTextInfo, secondLineTextVariety);
  1288             }
  1260             }
  1289         else
  1261         else