79
|
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 |
#include "MceIds.h"
|
|
26 |
|
|
27 |
|
|
28 |
// ================= MEMBER FUNCTIONS =======================
|
|
29 |
|
|
30 |
// C++ constructor can NOT contain any code that
|
|
31 |
// might leave.
|
|
32 |
//
|
|
33 |
CMceMessageListBoxItemDrawer::CMceMessageListBoxItemDrawer(
|
|
34 |
MTextListBoxModel* aTextListBoxModel,
|
|
35 |
const CFont* aFont,
|
|
36 |
CFormattedCellListBoxData* aFormattedCellData,
|
|
37 |
CMceMessageListContainer& aMessageListContainer )
|
|
38 |
:
|
|
39 |
CFormattedCellListBoxItemDrawer( aTextListBoxModel,
|
|
40 |
aFont, aFormattedCellData ),
|
|
41 |
iMessageListContainer( aMessageListContainer )
|
|
42 |
{
|
|
43 |
}
|
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
// Destructor
|
|
48 |
CMceMessageListBoxItemDrawer::~CMceMessageListBoxItemDrawer()
|
|
49 |
{
|
|
50 |
}
|
|
51 |
|
|
52 |
|
|
53 |
// ---------------------------------------------------------
|
|
54 |
// CMceMessageListBoxItemDrawer::Properties
|
|
55 |
// ---------------------------------------------------------
|
|
56 |
//
|
|
57 |
TListItemProperties CMceMessageListBoxItemDrawer::Properties(TInt aItemIndex) const
|
|
58 |
{
|
|
59 |
TListItemProperties properties;
|
|
60 |
properties.SetColor( iTextColor );
|
|
61 |
//only for MyFolders set the Hidden Selection, no folder should be able to be selected
|
|
62 |
if ( iMessageListContainer.CurrentFolderId() == KMceDocumentsEntryId )
|
|
63 |
{
|
|
64 |
properties.SetHiddenSelection( iMessageListContainer.IsItemFolder( aItemIndex ) ||
|
|
65 |
iMessageListContainer.SyncMlOutboxOpened() );
|
|
66 |
}
|
|
67 |
return properties;
|
|
68 |
}
|
|
69 |
|
|
70 |
// End of File
|