1120 aInnerRect, |
1137 aInnerRect, |
1121 KAknsIIDQsnFrListPressed, |
1138 KAknsIIDQsnFrListPressed, |
1122 KAknsIIDQsnFrListCenterPressed ); |
1139 KAknsIIDQsnFrListCenterPressed ); |
1123 } |
1140 } |
1124 |
1141 |
|
1142 |
|
1143 // ----------------------------------------------------------------------------- |
|
1144 // CColumnListBoxDataExtension::LoadMarkingIconsL |
|
1145 // ----------------------------------------------------------------------------- |
|
1146 // |
|
1147 void CColumnListBoxDataExtension::LoadMarkingIconsL() |
|
1148 { |
|
1149 if ( !iMarkingIconArray ) |
|
1150 { |
|
1151 iMarkingIconArray = new ( ELeave ) CAknIconArray( 2 ); |
|
1152 } |
|
1153 else |
|
1154 { |
|
1155 iMarkingIconArray->ResetAndDestroy(); |
|
1156 } |
|
1157 |
|
1158 MAknsSkinInstance* skin = AknsUtils::SkinInstance(); |
|
1159 const TDesC& avkonIconFile = AknIconUtils::AvkonIconFileName(); |
|
1160 |
|
1161 CGulIcon* icon = AknsUtils::CreateGulIconL( skin, |
|
1162 KAknsIIDQgnPropCheckboxOn, |
|
1163 avkonIconFile, |
|
1164 EMbmAvkonQgn_prop_checkbox_on, |
|
1165 EMbmAvkonQgn_prop_checkbox_on_mask ); |
|
1166 |
|
1167 CleanupStack::PushL( icon ); |
|
1168 iMarkingIconArray->AppendL( icon ); |
|
1169 CleanupStack::Pop( icon ); |
|
1170 |
|
1171 icon = AknsUtils::CreateGulIconL( skin, |
|
1172 KAknsIIDQgnPropCheckboxOff, |
|
1173 avkonIconFile, |
|
1174 EMbmAvkonQgn_prop_checkbox_off, |
|
1175 EMbmAvkonQgn_prop_checkbox_off_mask ); |
|
1176 |
|
1177 CleanupStack::PushL( icon ); |
|
1178 iMarkingIconArray->AppendL( icon ); |
|
1179 CleanupStack::Pop( icon ); |
|
1180 } |
|
1181 |
|
1182 |
1125 EXPORT_C CCoeControl *CColumnListBoxData::Control() const |
1183 EXPORT_C CCoeControl *CColumnListBoxData::Control() const |
1126 { |
1184 { |
|
1185 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
1127 return iExtension->iControl; |
1186 return iExtension->iControl; |
1128 } |
1187 } |
1129 |
1188 |
1130 EXPORT_C void CColumnListBoxData::SetControl(CCoeControl *aControl) |
1189 EXPORT_C void CColumnListBoxData::SetControl(CCoeControl *aControl) |
1131 { |
1190 { |
|
1191 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
1132 iExtension->SetControl( aControl ); |
1192 iExtension->SetControl( aControl ); |
1133 } |
1193 } |
1134 |
1194 |
1135 |
1195 |
1136 EXPORT_C MAknsControlContext* CColumnListBoxData::SkinBackgroundContext() const |
1196 EXPORT_C MAknsControlContext* CColumnListBoxData::SkinBackgroundContext() const |
1137 { |
1197 { |
|
1198 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
1138 if (iExtension->iSkinEnabled) |
1199 if (iExtension->iSkinEnabled) |
1139 { |
1200 { |
1140 return iExtension->iSkinControlContext; |
1201 return iExtension->iSkinControlContext; |
1141 } |
1202 } |
1142 |
1203 |
1143 return NULL; |
1204 return NULL; |
1144 } |
1205 } |
1145 |
1206 |
1146 void CColumnListBoxData::SetSkinBackgroundContext(CAknsListBoxBackgroundControlContext *aContext) |
1207 void CColumnListBoxData::SetSkinBackgroundContext(CAknsListBoxBackgroundControlContext *aContext) |
1147 { |
1208 { |
|
1209 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
1148 delete iExtension->iSkinControlContext; |
1210 delete iExtension->iSkinControlContext; |
1149 iExtension->iSkinControlContext = aContext; |
1211 iExtension->iSkinControlContext = aContext; |
1150 } |
1212 } |
1151 |
1213 |
1152 void CColumnListBoxData::CreatePictographInterfaceL() |
1214 void CColumnListBoxData::CreatePictographInterfaceL() |
1153 { |
1215 { |
|
1216 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
1154 if ( !iExtension->iPictoInterface ) |
1217 if ( !iExtension->iPictoInterface ) |
1155 { |
1218 { |
1156 iExtension->iPictoInterface = CAknPictographInterface::NewL( |
1219 iExtension->iPictoInterface = CAknPictographInterface::NewL( |
1157 *iExtension->iControl, *iExtension ); |
1220 *iExtension->iControl, *iExtension ); |
1158 } |
1221 } |
1159 } |
1222 } |
1160 |
1223 |
1161 EXPORT_C void CColumnListBoxData::SetSkinHighlightFrame(const TAknsItemID *aFrameId, const TAknsItemID *aFrameCenterId) |
1224 EXPORT_C void CColumnListBoxData::SetSkinHighlightFrame(const TAknsItemID *aFrameId, const TAknsItemID *aFrameCenterId) |
1162 { |
1225 { |
|
1226 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
1163 _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); |
1227 _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); |
1164 iExtension->iSkinHighlightFrameId = aFrameId; |
1228 iExtension->iSkinHighlightFrameId = aFrameId; |
1165 iExtension->iSkinHighlightFrameCenterId = aFrameCenterId; |
1229 iExtension->iSkinHighlightFrameCenterId = aFrameCenterId; |
1166 } |
1230 } |
1167 |
1231 |
1168 EXPORT_C void CColumnListBoxData::SetSkinEnabledL(TBool aEnabled) |
1232 EXPORT_C void CColumnListBoxData::SetSkinEnabledL(TBool aEnabled) |
1169 { |
1233 { |
|
1234 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
1170 CListBoxData::SetSkinEnabledL(aEnabled); |
1235 CListBoxData::SetSkinEnabledL(aEnabled); |
1171 iExtension->iSkinEnabled = aEnabled; |
1236 iExtension->iSkinEnabled = aEnabled; |
1172 } |
1237 } |
1173 |
1238 |
1174 EXPORT_C void CColumnListBoxData::SetSkinStyle(const TAknsItemID *aId, const TRect &aTileRect) |
1239 EXPORT_C void CColumnListBoxData::SetSkinStyle(const TAknsItemID *aId, const TRect &aTileRect) |
1175 { |
1240 { |
|
1241 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
1176 if (iExtension->iSkinControlContext) |
1242 if (iExtension->iSkinControlContext) |
1177 { |
1243 { |
1178 iExtension->iSkinControlContext->SetTiledBitmap(*aId); |
1244 iExtension->iSkinControlContext->SetTiledBitmap(*aId); |
1179 iExtension->iSkinControlContext->SetTiledRect(aTileRect); |
1245 iExtension->iSkinControlContext->SetTiledRect(aTileRect); |
1180 } |
1246 } |
1181 } |
1247 } |
1182 |
1248 |
1183 EXPORT_C void CColumnListBoxData::SetListEndSkinStyle(const TAknsItemID *aId, const TRect &aTileRect) |
1249 EXPORT_C void CColumnListBoxData::SetListEndSkinStyle(const TAknsItemID *aId, const TRect &aTileRect) |
1184 { |
1250 { |
|
1251 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
1185 if (iExtension->iSkinControlContext) |
1252 if (iExtension->iSkinControlContext) |
1186 { |
1253 { |
1187 iExtension->iSkinControlContext->SetBottomBitmap(*aId); |
1254 iExtension->iSkinControlContext->SetBottomBitmap(*aId); |
1188 iExtension->iSkinControlContext->SetBottomRect(aTileRect); |
1255 iExtension->iSkinControlContext->SetBottomRect(aTileRect); |
1189 } |
1256 } |
1190 } |
1257 } |
1191 |
1258 |
1192 void CColumnListBoxData::CreateMarqueeControlL() |
1259 void CColumnListBoxData::CreateMarqueeControlL() |
1193 { |
1260 { |
|
1261 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
1194 _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); |
1262 _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); |
1195 if ( !iExtension->iMarquee ) |
1263 if ( !iExtension->iMarquee ) |
1196 { |
1264 { |
1197 iExtension->iMarquee = CAknMarqueeControl::NewL(); |
1265 iExtension->iMarquee = CAknMarqueeControl::NewL(); |
1198 } |
1266 } |
1221 } |
1290 } |
1222 } |
1291 } |
1223 |
1292 |
1224 TInt CColumnListBoxData::CurrentMarqueeItemIndex() |
1293 TInt CColumnListBoxData::CurrentMarqueeItemIndex() |
1225 { |
1294 { |
|
1295 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
1226 return iExtension->iCurrentItem; |
1296 return iExtension->iCurrentItem; |
1227 } |
1297 } |
1228 |
1298 |
1229 void CColumnListBoxData::SetCurrentMarqueeItemIndex(TInt aIndex) |
1299 void CColumnListBoxData::SetCurrentMarqueeItemIndex(TInt aIndex) |
1230 { |
1300 { |
|
1301 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
1231 iExtension->iCurrentItem = aIndex; |
1302 iExtension->iCurrentItem = aIndex; |
1232 } |
1303 } |
1233 |
1304 |
1234 // |
1305 // |
1235 // Enables or disables marquee. |
1306 // Enables or disables marquee. |
1236 // |
1307 // |
1237 EXPORT_C void CColumnListBoxData::EnableMarqueeL(TBool aEnable) |
1308 EXPORT_C void CColumnListBoxData::EnableMarqueeL(TBool aEnable) |
1238 { |
1309 { |
|
1310 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
1239 _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); |
1311 _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); |
1240 // CreateMarqueeControlL does nothing if marquee already exists, |
1312 // CreateMarqueeControlL does nothing if marquee already exists, |
1241 // so let's just call it just in case. |
1313 // so let's just call it just in case. |
1242 CreateMarqueeControlL(); |
1314 CreateMarqueeControlL(); |
1243 iExtension->iMarquee->EnableMarquee(aEnable); |
1315 iExtension->iMarquee->EnableMarquee(aEnable); |
1244 iExtension->i2ndLineMarquee->EnableMarquee(aEnable); |
1316 iExtension->i2ndLineMarquee->EnableMarquee(aEnable); |
1245 } |
1317 } |
1246 |
1318 |
1247 EXPORT_C void CColumnListBoxData::SetSeparatorLinePosition(TAknSeparatorLinePosition aPosition) |
1319 EXPORT_C void CColumnListBoxData::SetSeparatorLinePosition(TAknSeparatorLinePosition aPosition) |
1248 { |
1320 { |
1249 if (iExtension) |
1321 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
1250 iExtension->iSeparatorLinePosition = aPosition; |
1322 iExtension->iSeparatorLinePosition = aPosition; |
1251 } |
1323 } |
1252 EXPORT_C TAknSeparatorLinePosition CColumnListBoxData::SeparatorLinePosition() const |
1324 EXPORT_C TAknSeparatorLinePosition CColumnListBoxData::SeparatorLinePosition() const |
1253 { |
1325 { |
1254 if (iExtension) |
1326 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
1255 return iExtension->iSeparatorLinePosition; |
1327 return iExtension->iSeparatorLinePosition; |
1256 else |
|
1257 return ENoLine; |
|
1258 } |
1328 } |
1259 EXPORT_C CAknLayoutData *CColumnListBoxData::LayoutData() const |
1329 EXPORT_C CAknLayoutData *CColumnListBoxData::LayoutData() const |
1260 { |
1330 { |
1261 return NULL; |
1331 return NULL; |
1262 } |
1332 } |
1465 EXPORT_C void CColumnListBoxData::SetColumnBaselinePosL(TInt aColumn,TInt aPos) |
1536 EXPORT_C void CColumnListBoxData::SetColumnBaselinePosL(TInt aColumn,TInt aPos) |
1466 // |
1537 // |
1467 // Set a columns baseline position |
1538 // Set a columns baseline position |
1468 // |
1539 // |
1469 { |
1540 { |
|
1541 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
1470 _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); |
1542 _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); |
1471 TInt index; |
1543 TInt index; |
1472 FindColumnIndexOrAddL(index,aColumn); |
1544 FindColumnIndexOrAddL(index,aColumn); |
1473 At(index).iBaseline=aPos; |
1545 At(index).iBaseline=aPos; |
1474 |
1546 |
1475 // can not be nicely supported by new drawing system |
1547 // can not be nicely supported by new drawing system |
1476 // --> revert to Symbian style drawing |
1548 // --> revert to Symbian style drawing |
1477 if ( iExtension && iExtension->iUseLayoutData ) |
1549 if ( iExtension->iUseLayoutData ) |
1478 { |
1550 { |
1479 iExtension->iUseLayoutData = EFalse; |
1551 iExtension->iUseLayoutData = EFalse; |
1480 #ifdef RD_UI_TRANSITION_EFFECTS_LIST |
1552 #ifdef RD_UI_TRANSITION_EFFECTS_LIST |
1481 CListBoxView* view = static_cast<CEikListBox*>( iExtension->iControl )->View(); |
1553 CListBoxView* view = static_cast<CEikListBox*>( iExtension->iControl )->View(); |
1482 MAknListBoxTfxInternal* transApi = |
1554 MAknListBoxTfxInternal* transApi = |
1507 EXPORT_C void CColumnListBoxData::SetColumnMarginsL(TInt aColumn,TMargins aMargins) |
1579 EXPORT_C void CColumnListBoxData::SetColumnMarginsL(TInt aColumn,TMargins aMargins) |
1508 // |
1580 // |
1509 // Set a columns vertical cap |
1581 // Set a columns vertical cap |
1510 // |
1582 // |
1511 { |
1583 { |
|
1584 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
1512 _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); |
1585 _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); |
1513 TInt index; |
1586 TInt index; |
1514 FindColumnIndexOrAddL(index,aColumn); |
1587 FindColumnIndexOrAddL(index,aColumn); |
1515 At(index).iMargins=aMargins; |
1588 At(index).iMargins=aMargins; |
1516 |
1589 |
1517 // can not be nicely supported by new drawing system |
1590 // can not be nicely supported by new drawing system |
1518 // --> revert to Symbian style drawing |
1591 // --> revert to Symbian style drawing |
1519 if ( iExtension && iExtension->iUseLayoutData ) |
1592 if ( iExtension->iUseLayoutData ) |
1520 { |
1593 { |
1521 iExtension->iUseLayoutData = EFalse; |
1594 iExtension->iUseLayoutData = EFalse; |
1522 #ifdef RD_UI_TRANSITION_EFFECTS_LIST |
1595 #ifdef RD_UI_TRANSITION_EFFECTS_LIST |
1523 CListBoxView* view = static_cast<CEikListBox*>( iExtension->iControl )->View(); |
1596 CListBoxView* view = static_cast<CEikListBox*>( iExtension->iControl )->View(); |
1524 MAknListBoxTfxInternal* transApi = |
1597 MAknListBoxTfxInternal* transApi = |
1726 EXPORT_C CArrayPtr<CGulIcon>* CColumnListBoxData::IconArray() const |
1800 EXPORT_C CArrayPtr<CGulIcon>* CColumnListBoxData::IconArray() const |
1727 // |
1801 // |
1728 // Return the list of icons |
1802 // Return the list of icons |
1729 // |
1803 // |
1730 { |
1804 { |
1731 if (iExtension) |
1805 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
1732 return iExtension->iIconArray; |
1806 return iExtension->iIconArray; |
1733 else |
|
1734 return 0; |
|
1735 } |
1807 } |
1736 |
1808 |
1737 EXPORT_C void CColumnListBoxData::SetIconArray(CArrayPtr<CGulIcon>* aArray) |
1809 EXPORT_C void CColumnListBoxData::SetIconArray(CArrayPtr<CGulIcon>* aArray) |
1738 // |
1810 // |
1739 // Passes ownership of the icon list aArray (assumes any previous list has been deleted by the caller) |
1811 // Passes ownership of the icon list aArray (assumes any previous list has been deleted by the caller) |
1740 // |
1812 // |
1741 { |
1813 { |
|
1814 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
1742 _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); |
1815 _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); |
1743 if (iExtension) |
1816 iExtension->iIconArray=aArray; |
1744 iExtension->iIconArray=aArray; |
|
1745 else |
|
1746 { |
|
1747 aArray->ResetAndDestroy(); |
|
1748 delete aArray; |
|
1749 } |
|
1750 } |
1817 } |
1751 |
1818 |
1752 EXPORT_C CFont* CColumnListBoxData::Font(const TListItemProperties& /*aItemProperties*/, TInt aColumn) const |
1819 EXPORT_C CFont* CColumnListBoxData::Font(const TListItemProperties& /*aItemProperties*/, TInt aColumn) const |
1753 { |
1820 { |
1754 _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); |
1821 _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); |
2015 { |
2099 { |
2016 AknListUtils::DrawSeparator( aGc, aRect, aColors.iText, skin ); |
2100 AknListUtils::DrawSeparator( aGc, aRect, aColors.iText, skin ); |
2017 } |
2101 } |
2018 DrawHighLight( aGc, aRect, aHighlight, skin ); |
2102 DrawHighLight( aGc, aRect, aHighlight, skin ); |
2019 |
2103 |
|
2104 if ( markingMode && !aItemProperties.IsSelectionHidden() ) |
|
2105 { |
|
2106 TAknLayoutRect layoutRect; |
|
2107 layoutRect.LayoutRect( aRect, |
|
2108 AknLayoutScalable_Avkon::list_single_graphic_pane_g1( 0 ) ); |
|
2109 |
|
2110 aGc.SetPenColor( aColors.iText ); |
|
2111 aGc.SetPenStyle( CGraphicsContext::ESolidPen ); |
|
2112 |
|
2113 CGulIcon* icon = (*iExtension->iMarkingIconArray)[1]; // unchecked |
|
2114 |
|
2115 if ( listbox->View()->ItemIsSelected( iExtension->iCurrentRow ) ) |
|
2116 { |
|
2117 icon = (*iExtension->iMarkingIconArray)[0]; |
|
2118 } |
|
2119 |
|
2120 CFbsBitmap* bitmap = icon->Bitmap(); |
|
2121 |
|
2122 if ( bitmap ) |
|
2123 { |
|
2124 TSize size( bitmap->SizeInPixels() ); // set size if not already |
|
2125 TSize targetSize( layoutRect.Rect().Size() ); |
|
2126 |
|
2127 if ( size.iWidth != targetSize.iWidth && size.iHeight != targetSize.iHeight ) |
|
2128 { |
|
2129 AknIconUtils::SetSize( bitmap, targetSize, |
|
2130 EAspectRatioPreservedAndUnusedSpaceRemoved ); |
|
2131 } |
|
2132 |
|
2133 aGc.BitBltMasked( layoutRect.Rect().iTl, bitmap, TRect( layoutRect.Rect().Size() ), icon->Mask(), EFalse ); |
|
2134 } |
|
2135 |
|
2136 } |
|
2137 |
2020 // The column draw loop |
2138 // The column draw loop |
2021 column = 0; |
2139 column = 0; |
2022 TInt subCellIndex = 0; |
2140 TInt subCellIndex = 0; |
2023 |
|
2024 if ( !iExtension ) { return; } |
|
2025 |
2141 |
2026 #ifdef RD_UI_TRANSITION_EFFECTS_LIST |
2142 #ifdef RD_UI_TRANSITION_EFFECTS_LIST |
2027 if ( transApi ) |
2143 if ( transApi ) |
2028 { |
2144 { |
2029 transApi->StartDrawing( MAknListBoxTfxInternal::EListItem ); |
2145 transApi->StartDrawing( MAknListBoxTfxInternal::EListItem ); |
2340 aGc.DiscardFont(); |
2457 aGc.DiscardFont(); |
2341 } |
2458 } |
2342 return; |
2459 return; |
2343 } |
2460 } |
2344 |
2461 |
|
2462 CEikListBox* listbox = static_cast<CEikListBox*>( iExtension->iControl ); |
|
2463 TBool markingMode = EFalse; |
|
2464 TRect itemRect( aRect ); |
|
2465 |
|
2466 if ( listbox->View() && listbox->View()->ItemDrawer() ) |
|
2467 { |
|
2468 if ( listbox->View()->ItemDrawer()->Flags() |
|
2469 & CListItemDrawer::EMarkingModeEnabled && |
|
2470 iExtension->iMarkingIconArray && |
|
2471 iExtension->iMarkingIconArray->Count() == 2 ) |
|
2472 { |
|
2473 markingMode = ETrue; |
|
2474 itemRect.iTl.iX += |
|
2475 AknLayoutScalable_Avkon::list_single_graphic_pane_t1( 0 ).LayoutLine().il; |
|
2476 } |
|
2477 } |
|
2478 |
2345 TInt extraVerticalSpace=(aRect.Height()-font->HeightInPixels()); |
2479 TInt extraVerticalSpace=(aRect.Height()-font->HeightInPixels()); |
2346 TInt baseLineOffset=extraVerticalSpace/2+font->AscentInPixels(); |
2480 TInt baseLineOffset=extraVerticalSpace/2+font->AscentInPixels(); |
2347 TRect textRect( aRect ); |
2481 TRect textRect( itemRect ); |
2348 TRect textMRect; // textrect with margins. |
2482 TRect textMRect; // textrect with margins. |
2349 textRect.iBr.iX=aRect.iTl.iX; |
2483 textRect.iBr.iX = itemRect.iTl.iX; |
2350 TInt column=0; |
2484 TInt column=0; |
2351 TPtrC text; |
2485 TPtrC text; |
2352 |
2486 |
2353 TRgb aTextColor = aHighlight ? aColors.iHighlightedText : aColors.iText; |
2487 TRgb aTextColor = aHighlight ? aColors.iHighlightedText : aColors.iText; |
2354 |
2488 |
2355 // Turned the drawing to multipass algorithm, because optionalcolumns drawing will |
2489 // Turned the drawing to multipass algorithm, because optionalcolumns drawing will |
2356 // be too difficult to do without - and this is cleaner solution. |
2490 // be too difficult to do without - and this is cleaner solution. |
2357 |
2491 |
2358 // pass 1, figures out x-coordinates for columns. |
2492 // pass 1, figures out x-coordinates for columns. |
2359 TInt x = aRect.iTl.iX; |
2493 TInt x = itemRect.iTl.iX; |
2360 TBool mirror = AknLayoutUtils::LayoutMirrored(); |
2494 TBool mirror = AknLayoutUtils::LayoutMirrored(); |
2361 if (mirror) |
2495 if (mirror) |
2362 { |
2496 { |
2363 x = aRect.iBr.iX; |
2497 x = itemRect.iBr.iX; |
2364 } |
2498 } |
2365 TInt maxx = x; |
2499 TInt maxx = x; |
2366 while(column <= lastColumn) |
2500 while(column <= lastColumn) |
2367 { |
2501 { |
2368 // order of instructions is important here, do not change. |
2502 // order of instructions is important here, do not change. |
2492 CListBoxView* view = static_cast<CEikListBox*>( iExtension->iControl )->View(); |
2617 CListBoxView* view = static_cast<CEikListBox*>( iExtension->iControl )->View(); |
2493 aGc.SetClippingRect( view->ViewRect() ); |
2618 aGc.SetClippingRect( view->ViewRect() ); |
2494 } |
2619 } |
2495 #endif // RD_UI_TRANSITION_EFFECTS_LIST |
2620 #endif // RD_UI_TRANSITION_EFFECTS_LIST |
2496 |
2621 |
|
2622 if ( markingMode && !aItemProperties.IsSelectionHidden() ) |
|
2623 { |
|
2624 TAknLayoutRect layoutRect; |
|
2625 layoutRect.LayoutRect( |
|
2626 aRect, |
|
2627 AknLayoutScalable_Avkon::list_single_graphic_pane_g1( 0 ) ); |
|
2628 |
|
2629 aGc.SetPenColor( aColors.iText ); |
|
2630 aGc.SetPenStyle( CGraphicsContext::ESolidPen ); |
|
2631 |
|
2632 CGulIcon* icon = (*iExtension->iMarkingIconArray)[1]; // unchecked |
|
2633 |
|
2634 if ( listbox->View()->ItemIsSelected( iExtension->iCurrentRow ) ) |
|
2635 { |
|
2636 icon = (*iExtension->iMarkingIconArray)[0]; |
|
2637 } |
|
2638 |
|
2639 CFbsBitmap* bitmap = icon->Bitmap(); |
|
2640 |
|
2641 if ( bitmap ) |
|
2642 { |
|
2643 TSize size( bitmap->SizeInPixels() ); // set size if not already |
|
2644 TSize targetSize( layoutRect.Rect().Size() ); |
|
2645 |
|
2646 if ( size.iWidth != targetSize.iWidth && |
|
2647 size.iHeight != targetSize.iHeight ) |
|
2648 { |
|
2649 AknIconUtils::SetSize( |
|
2650 bitmap, |
|
2651 targetSize, |
|
2652 EAspectRatioPreservedAndUnusedSpaceRemoved ); |
|
2653 } |
|
2654 |
|
2655 aGc.BitBltMasked( layoutRect.Rect().iTl, |
|
2656 bitmap, |
|
2657 TRect( layoutRect.Rect().Size() ), |
|
2658 icon->Mask(), |
|
2659 EFalse ); |
|
2660 } |
|
2661 } |
|
2662 |
2497 // The column draw loop |
2663 // The column draw loop |
2498 column = 0; |
2664 column = 0; |
2499 FOREVER |
2665 FOREVER |
2500 { |
2666 { |
2501 if (column > lastColumn) break; |
2667 if (column > lastColumn) break; |
2878 |
3043 |
2879 EXPORT_C void CColumnListBoxData::SetColumnFontForRowL(TInt aRow, |
3044 EXPORT_C void CColumnListBoxData::SetColumnFontForRowL(TInt aRow, |
2880 TInt aColumn, |
3045 TInt aColumn, |
2881 const CFont* aFont) |
3046 const CFont* aFont) |
2882 { |
3047 { |
|
3048 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
2883 _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); |
3049 _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); |
2884 if (!iExtension) return; |
|
2885 TInt index = 0; |
3050 TInt index = 0; |
2886 iExtension->FindRowAndColumnIndexOrAddL(index,aRow,aColumn); |
3051 iExtension->FindRowAndColumnIndexOrAddL(index,aRow,aColumn); |
2887 iExtension->At(index).iFont=aFont; |
3052 iExtension->At(index).iFont=aFont; |
2888 } |
3053 } |
2889 |
3054 |
2890 EXPORT_C const CFont* |
3055 EXPORT_C const CFont* |
2891 CColumnListBoxData::RowAndColumnFont(TInt aRow,TInt aColumn) const |
3056 CColumnListBoxData::RowAndColumnFont(TInt aRow,TInt aColumn) const |
2892 { |
3057 { |
2893 if (!iExtension) return 0; |
3058 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
2894 TInt index = 0; |
3059 TInt index = 0; |
2895 if (iExtension->FindRowAndColumnIndex(index,aRow,aColumn)!=0) |
3060 if (iExtension->FindRowAndColumnIndex(index,aRow,aColumn)!=0) |
2896 return 0; |
3061 return 0; |
2897 return(iExtension->At(index).iFont); |
3062 return(iExtension->At(index).iFont); |
2898 } |
3063 } |
2899 |
3064 |
2900 void CColumnListBoxData::SetCurrentItemIndex(TInt aIndex) |
3065 void CColumnListBoxData::SetCurrentItemIndex(TInt aIndex) |
2901 { |
3066 { |
|
3067 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
2902 _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); |
3068 _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); |
2903 if( iExtension->iCurrentRow != aIndex ) |
3069 if( iExtension->iCurrentRow != aIndex ) |
2904 { |
3070 { |
2905 iExtension->iAnimFlags.Set( CColumnListBoxDataExtension::EFlagUpdateBg ); |
3071 iExtension->iAnimFlags.Set( CColumnListBoxDataExtension::EFlagUpdateBg ); |
2906 } |
3072 } |
3046 // ----------------------------------------------------------------------------- |
3213 // ----------------------------------------------------------------------------- |
3047 // |
3214 // |
3048 EXPORT_C void CColumnListBoxData::SetHighlightAnimBackgroundDrawer( |
3215 EXPORT_C void CColumnListBoxData::SetHighlightAnimBackgroundDrawer( |
3049 MColumnListBoxAnimBackgroundDrawer* aDrawer ) |
3216 MColumnListBoxAnimBackgroundDrawer* aDrawer ) |
3050 { |
3217 { |
|
3218 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
3051 _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); |
3219 _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); |
3052 if( iExtension ) |
3220 iExtension->iHighlightBgDrawer = aDrawer; |
3053 { |
|
3054 iExtension->iHighlightBgDrawer = aDrawer; |
|
3055 } |
|
3056 } |
3221 } |
3057 |
3222 |
3058 // ----------------------------------------------------------------------------- |
3223 // ----------------------------------------------------------------------------- |
3059 // CColumnListBoxData::SetItemCellSize |
3224 // CColumnListBoxData::SetItemCellSize |
3060 // ----------------------------------------------------------------------------- |
3225 // ----------------------------------------------------------------------------- |
3061 // |
3226 // |
3062 EXPORT_C void CColumnListBoxData::SetItemCellSize( const TSize& aSizeInPixels ) |
3227 EXPORT_C void CColumnListBoxData::SetItemCellSize( const TSize& aSizeInPixels ) |
3063 { |
3228 { |
|
3229 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
3064 _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); |
3230 _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); |
3065 if( iExtension ) |
3231 |
3066 { |
3232 if( iExtension->iAnimSize != aSizeInPixels ) |
3067 if( iExtension->iAnimSize != aSizeInPixels ) |
3233 { |
3068 { |
3234 iExtension->Play(); |
3069 iExtension->Play(); |
3235 } |
3070 } |
3236 iExtension->iAnimSize = aSizeInPixels; |
3071 iExtension->iAnimSize = aSizeInPixels; |
|
3072 } |
|
3073 } |
3237 } |
3074 |
3238 |
3075 // ----------------------------------------------------------------------------- |
3239 // ----------------------------------------------------------------------------- |
3076 // CColumnListBoxData::HasHighlightAnim |
3240 // CColumnListBoxData::HasHighlightAnim |
3077 // ----------------------------------------------------------------------------- |
3241 // ----------------------------------------------------------------------------- |
3078 // |
3242 // |
3079 EXPORT_C TBool CColumnListBoxData::HasHighlightAnim() const |
3243 EXPORT_C TBool CColumnListBoxData::HasHighlightAnim() const |
3080 { |
3244 { |
3081 if( !iExtension ) |
3245 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
3082 return EFalse; |
|
3083 if( !iExtension->iAnimation ) |
3246 if( !iExtension->iAnimation ) |
3084 return EFalse; |
3247 return EFalse; |
3085 return ETrue; |
3248 return ETrue; |
3086 } |
3249 } |
3087 |
3250 |
3105 // CColumnListBoxData::FocusGained |
3266 // CColumnListBoxData::FocusGained |
3106 // ----------------------------------------------------------------------------- |
3267 // ----------------------------------------------------------------------------- |
3107 // |
3268 // |
3108 void CColumnListBoxData::FocusGained() |
3269 void CColumnListBoxData::FocusGained() |
3109 { |
3270 { |
|
3271 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
3110 iExtension->FocusGained(); |
3272 iExtension->FocusGained(); |
3111 } |
3273 } |
3112 |
3274 |
3113 // ----------------------------------------------------------------------------- |
3275 // ----------------------------------------------------------------------------- |
3114 // CColumnListBoxData::FocusLost |
3276 // CColumnListBoxData::FocusLost |
3115 // ----------------------------------------------------------------------------- |
3277 // ----------------------------------------------------------------------------- |
3116 // |
3278 // |
3117 void CColumnListBoxData::FocusLost() |
3279 void CColumnListBoxData::FocusLost() |
3118 { |
3280 { |
|
3281 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
3119 iExtension->FocusLost(); |
3282 iExtension->FocusLost(); |
3120 } |
3283 } |
3121 |
3284 |
3122 void CColumnListBoxData::HandleResourceChange( TInt aType ) |
3285 void CColumnListBoxData::HandleResourceChange( TInt aType ) |
3123 { |
3286 { |
|
3287 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
3124 _AKNTRACE( "[%s][%s] aType = %d", "CColumnListBoxData", __FUNCTION__, aType ); |
3288 _AKNTRACE( "[%s][%s] aType = %d", "CColumnListBoxData", __FUNCTION__, aType ); |
3125 // Animation is skin dependent, whenever skin changes animation changes |
3289 // Animation is skin dependent, whenever skin changes animation changes |
3126 // too. |
3290 // too. |
3127 if( KAknsMessageSkinChange == aType ) |
3291 if( KAknsMessageSkinChange == aType ) |
3128 { |
3292 { |
3129 iExtension->SkinChanged(); |
3293 TRAP_IGNORE( iExtension->SkinChangedL() ); |
3130 } |
3294 } |
3131 else if(aType == KEikDynamicLayoutVariantSwitch) |
3295 else if(aType == KEikDynamicLayoutVariantSwitch) |
3132 { |
3296 { |
3133 // What is under highlight may have changed -> we need to update |
3297 // What is under highlight may have changed -> we need to update |
3134 // highlight background to animation. |
3298 // highlight background to animation. |
3176 } |
3340 } |
3177 } |
3341 } |
3178 |
3342 |
3179 void CColumnListBoxData::SetESSTextColor(TRgb aTextColor) |
3343 void CColumnListBoxData::SetESSTextColor(TRgb aTextColor) |
3180 { |
3344 { |
3181 if (iExtension) |
3345 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
3182 iExtension->iTextColor = aTextColor; |
3346 iExtension->iTextColor = aTextColor; |
3183 } |
3347 } |
3184 |
3348 |
3185 void CColumnListBoxData::SetESSHighlightedTextColor(TRgb aHighlightedTextColor) |
3349 void CColumnListBoxData::SetESSHighlightedTextColor(TRgb aHighlightedTextColor) |
3186 { |
3350 { |
3187 if (iExtension) |
3351 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
3188 iExtension->iHighlightedTextColor = aHighlightedTextColor; |
3352 iExtension->iHighlightedTextColor = aHighlightedTextColor; |
3189 } |
3353 } |
3190 |
3354 |
3191 EXPORT_C void CColumnListBoxData::SetColumnUnderlined( TBitFlags32 aUnderlinedColumns ) |
3355 EXPORT_C void CColumnListBoxData::SetColumnUnderlined( TBitFlags32 aUnderlinedColumns ) |
3192 { |
3356 { |
3193 if ( iExtension ) |
3357 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
3194 { |
3358 iExtension->iUnderlineFlagSet = ETrue; |
3195 iExtension->iUnderlineFlagSet = ETrue; |
3359 iExtension->iUnderlineFlags = aUnderlinedColumns; |
3196 iExtension->iUnderlineFlags = aUnderlinedColumns; |
|
3197 } |
|
3198 } |
3360 } |
3199 |
3361 |
3200 void CColumnListBoxData::SetUnderlineStyle( TListItemProperties aProperties, |
3362 void CColumnListBoxData::SetUnderlineStyle( TListItemProperties aProperties, |
3201 CWindowGc& aGc, |
3363 CWindowGc& aGc, |
3202 TInt aColumn ) const |
3364 TInt aColumn ) const |
3203 { |
3365 { |
3204 if ( !iExtension ) |
3366 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
3205 { |
|
3206 return; |
|
3207 } |
|
3208 |
|
3209 if ( !iExtension->iUnderlineFlagSet ) |
3367 if ( !iExtension->iUnderlineFlagSet ) |
3210 { |
3368 { |
3211 // underlining is already either on or off and |
3369 // underlining is already either on or off and |
3212 // hardcoded off turning will ensure old style |
3370 // hardcoded off turning will ensure old style |
3213 // behaviour |
3371 // behaviour |
3264 // ----------------------------------------------------------------------------- |
3418 // ----------------------------------------------------------------------------- |
3265 // |
3419 // |
3266 EXPORT_C void CColumnListBoxData::SetGraphicSubCellL(TInt aSubCell, |
3420 EXPORT_C void CColumnListBoxData::SetGraphicSubCellL(TInt aSubCell, |
3267 const TAknWindowLineLayout &aGraphicLayout) |
3421 const TAknWindowLineLayout &aGraphicLayout) |
3268 { |
3422 { |
|
3423 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
3269 _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); |
3424 _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); |
3270 if (!iExtension) return; |
|
3271 TInt index = 0; |
3425 TInt index = 0; |
3272 iExtension->FindSLSubCellIndexOrAddL(index,aSubCell); |
3426 iExtension->FindSLSubCellIndexOrAddL(index,aSubCell); |
3273 iExtension->AtSL(index).iTextLayout=NULL; |
3427 iExtension->AtSL(index).iTextLayout=NULL; |
3274 iExtension->AtSL(index).iGraphicLayout=aGraphicLayout; |
3428 iExtension->AtSL(index).iGraphicLayout=aGraphicLayout; |
3275 iExtension->AtSL(index).iSubCellType=CColumnListBoxDataExtension::EEikSLGraphic; |
3429 iExtension->AtSL(index).iSubCellType=CColumnListBoxDataExtension::EEikSLGraphic; |
3313 // ----------------------------------------------------------------------------- |
3467 // ----------------------------------------------------------------------------- |
3314 // |
3468 // |
3315 EXPORT_C void CColumnListBoxData::SetTextSubCellL(TInt aSubCell, |
3469 EXPORT_C void CColumnListBoxData::SetTextSubCellL(TInt aSubCell, |
3316 const TAknTextLineLayout &aTextLayout) |
3470 const TAknTextLineLayout &aTextLayout) |
3317 { |
3471 { |
|
3472 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
3318 _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); |
3473 _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); |
3319 if (!iExtension) return; |
|
3320 TInt index = 0; |
3474 TInt index = 0; |
3321 iExtension->FindSLSubCellIndexOrAddL(index,aSubCell); |
3475 iExtension->FindSLSubCellIndexOrAddL(index,aSubCell); |
3322 iExtension->AtSL(index).iTextLayout=aTextLayout; |
3476 iExtension->AtSL(index).iTextLayout=aTextLayout; |
3323 iExtension->AtSL(index).iGraphicLayout=NULL; |
3477 iExtension->AtSL(index).iGraphicLayout=NULL; |
3324 iExtension->AtSL(index).iSubCellType=CColumnListBoxDataExtension::EEikSLText; |
3478 iExtension->AtSL(index).iSubCellType=CColumnListBoxDataExtension::EEikSLText; |
3363 // |
3517 // |
3364 EXPORT_C void CColumnListBoxData::SetConditionalSubCellL(TInt aSubCell, |
3518 EXPORT_C void CColumnListBoxData::SetConditionalSubCellL(TInt aSubCell, |
3365 const TAknTextLineLayout &aTextLayout, |
3519 const TAknTextLineLayout &aTextLayout, |
3366 TInt aAffectedSubCell) |
3520 TInt aAffectedSubCell) |
3367 { |
3521 { |
|
3522 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
3368 _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); |
3523 _AKNTRACE( "[%s][%s][%d].", "CColumnListBoxData", __FUNCTION__, __LINE__ ); |
3369 // iConditionValue of affected subcell (=text subcell, which has different layouts) |
3524 // iConditionValue of affected subcell (=text subcell, which has different layouts) |
3370 // contains index of graphical subcell, which existence should be checked first. |
3525 // contains index of graphical subcell, which existence should be checked first. |
3371 // This graphical subcell has in iConditionValue index of graphical subcell, |
3526 // This graphical subcell has in iConditionValue index of graphical subcell, |
3372 // which existence should be checked second etc. Each graphical subcell can |
3527 // which existence should be checked second etc. Each graphical subcell can |
3373 // affect only to 1 text subcell (or none). |
3528 // affect only to 1 text subcell (or none). |
3374 |
3529 |
3375 // for compabitility - needed at least for text wrapping |
3530 // for compabitility - needed at least for text wrapping |
3376 SetOptionalColumnL( aSubCell, ETrue ); |
3531 SetOptionalColumnL( aSubCell, ETrue ); |
3377 if (!iExtension) return; |
|
3378 |
3532 |
3379 TInt i = 0x01; |
3533 TInt i = 0x01; |
3380 i = i << aSubCell; |
3534 i = i << aSubCell; |
3381 iExtension->iConditionalCells = iExtension->iConditionalCells | i; |
3535 iExtension->iConditionalCells = iExtension->iConditionalCells | i; |
3382 |
3536 |
3499 // CColumnListBoxData::UsesScalableLayoutData |
3653 // CColumnListBoxData::UsesScalableLayoutData |
3500 // ----------------------------------------------------------------------------- |
3654 // ----------------------------------------------------------------------------- |
3501 // |
3655 // |
3502 TBool CColumnListBoxData::UsesScalableLayoutData() const |
3656 TBool CColumnListBoxData::UsesScalableLayoutData() const |
3503 { |
3657 { |
3504 if (iExtension) |
3658 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
3505 return iExtension->iUseLayoutData; |
3659 return iExtension->iUseLayoutData; |
3506 |
|
3507 return EFalse; |
|
3508 } |
3660 } |
3509 |
3661 |
3510 // ----------------------------------------------------------------------------- |
3662 // ----------------------------------------------------------------------------- |
3511 // CColumnListBoxData::EnableStretching |
3663 // CColumnListBoxData::EnableStretching |
3512 // ----------------------------------------------------------------------------- |
3664 // ----------------------------------------------------------------------------- |
3513 // |
3665 // |
3514 void CColumnListBoxData::EnableStretching( const TBool aEnabled ) |
3666 void CColumnListBoxData::EnableStretching( const TBool aEnabled ) |
3515 { |
3667 { |
3516 if ( !iExtension ) |
3668 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
3517 { |
|
3518 return; |
|
3519 } |
|
3520 |
|
3521 iExtension->iStretchingEnabled = aEnabled; |
3669 iExtension->iStretchingEnabled = aEnabled; |
3522 } |
3670 } |
3523 |
3671 |
3524 #ifdef RD_LIST_STRETCH |
3672 #ifdef RD_LIST_STRETCH |
3525 // ----------------------------------------------------------------------------- |
3673 // ----------------------------------------------------------------------------- |
3526 // CColumnListBoxData::StretchingEnabled |
3674 // CColumnListBoxData::StretchingEnabled |
3527 // ----------------------------------------------------------------------------- |
3675 // ----------------------------------------------------------------------------- |
3528 // |
3676 // |
3529 EXPORT_C TBool CColumnListBoxData::StretchingEnabled() const |
3677 EXPORT_C TBool CColumnListBoxData::StretchingEnabled() const |
3530 { |
3678 { |
3531 if ( !iExtension ) |
3679 __ASSERT_DEBUG( iExtension, Panic( EEikPanicNullPointer ) ); |
3532 { |
|
3533 return EFalse; |
|
3534 } |
|
3535 |
|
3536 return iExtension->iStretchingEnabled; |
3680 return iExtension->iStretchingEnabled; |
3537 } |
3681 } |
3538 |
3682 |
3539 #else |
3683 #else |
3540 // ----------------------------------------------------------------------------- |
3684 // ----------------------------------------------------------------------------- |