|
1 /* |
|
2 * Copyright (c) 2002 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: |
|
15 * Needed because we have to override function Properties so that |
|
16 * folders cannot be selected. |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 |
|
22 // INCLUDE FILES |
|
23 #include "MceMessageListContainer.h" |
|
24 #include "MceMessageListboxItemDrawer.h" |
|
25 |
|
26 |
|
27 // ================= MEMBER FUNCTIONS ======================= |
|
28 |
|
29 // C++ constructor can NOT contain any code that |
|
30 // might leave. |
|
31 // |
|
32 CMceMessageListBoxItemDrawer::CMceMessageListBoxItemDrawer( |
|
33 MTextListBoxModel* aTextListBoxModel, |
|
34 const CFont* aFont, |
|
35 CFormattedCellListBoxData* aFormattedCellData, |
|
36 CMceMessageListContainer& aMessageListContainer ) |
|
37 : |
|
38 CFormattedCellListBoxItemDrawer( aTextListBoxModel, |
|
39 aFont, aFormattedCellData ), |
|
40 iMessageListContainer( aMessageListContainer ) |
|
41 { |
|
42 } |
|
43 |
|
44 |
|
45 |
|
46 // Destructor |
|
47 CMceMessageListBoxItemDrawer::~CMceMessageListBoxItemDrawer() |
|
48 { |
|
49 } |
|
50 |
|
51 |
|
52 // --------------------------------------------------------- |
|
53 // CMceMessageListBoxItemDrawer::Properties |
|
54 // --------------------------------------------------------- |
|
55 // |
|
56 TListItemProperties CMceMessageListBoxItemDrawer::Properties(TInt aItemIndex) const |
|
57 { |
|
58 TListItemProperties properties; |
|
59 properties.SetColor( iTextColor ); |
|
60 properties.SetHiddenSelection( iMessageListContainer.IsOutboxOpened() || |
|
61 iMessageListContainer.IsItemFolder( aItemIndex ) || |
|
62 iMessageListContainer.SyncMlOutboxOpened() ); |
|
63 return properties; |
|
64 } |
|
65 |
|
66 // End of File |