50 delete iListItems; |
52 delete iListItems; |
51 } |
53 } |
52 |
54 |
53 CMceMainViewListContainer* CMceMainViewListContainer::NewL( |
55 CMceMainViewListContainer* CMceMainViewListContainer::NewL( |
54 const TRect& aRect, |
56 const TRect& aRect, |
55 CMsvSessionPtr aSession, |
|
56 CMceBitmapResolver& aBitmapResolver, |
|
57 //TODO: |
57 //TODO: |
58 TMsvId /*aFolderId*/, |
58 TMsvId /*aFolderId*/, |
59 //TODO |
59 //TODO |
60 TMceListType /*aListType*/ ) |
60 TMceListType /*aListType*/ ) |
61 { |
61 { |
62 CMceMainViewListContainer* self = new (ELeave) |
62 CMceMainViewListContainer* self = new (ELeave) |
63 CMceMainViewListContainer(); |
63 CMceMainViewListContainer(); |
64 CleanupStack::PushL(self); |
64 CleanupStack::PushL(self); |
65 self->ConstructL( aRect, aSession, aBitmapResolver ); |
65 self->ConstructL( aRect ); |
66 CleanupStack::Pop(); // self |
66 CleanupStack::Pop(); // self |
67 return self; |
67 return self; |
68 } |
68 } |
69 |
69 |
|
70 // ---------------------------------------------------- |
|
71 // CMceMainViewListContainer::CreateListItemsL |
|
72 // ---------------------------------------------------- |
|
73 void CMceMainViewListContainer::CreateListItemsL( |
|
74 CMsvSessionPtr aSession, |
|
75 CMceBitmapResolver& aBitmapResolver ) |
|
76 { |
|
77 if ( iListBox && !iListItems ) |
|
78 { |
|
79 iListItems = CMceMainViewListItemArray::NewL( |
|
80 aSession, KMsvRootIndexEntryId, |
|
81 EMceListTypeMainView, aBitmapResolver ); |
|
82 iListBox->Model()->SetItemTextArray( iListItems ); |
|
83 iListBox->Model()->SetOwnershipType( ELbmDoesNotOwnItemArray ); |
|
84 } |
|
85 } |
70 |
86 |
71 |
87 |
72 // ---------------------------------------------------- |
88 // ---------------------------------------------------- |
73 // CMceMainViewListContainer::GetHelpContext |
89 // CMceMainViewListContainer::GetHelpContext |
74 // returns helpcontext as aContext |
90 // returns helpcontext as aContext |
79 aContext.iMajor = KMceApplicationUid; |
95 aContext.iMajor = KMceApplicationUid; |
80 aContext.iContext = KMCE_HLP_MESSAGING; |
96 aContext.iContext = KMCE_HLP_MESSAGING; |
81 } |
97 } |
82 |
98 |
83 void CMceMainViewListContainer::ConstructL( |
99 void CMceMainViewListContainer::ConstructL( |
84 const TRect& aRect, |
100 const TRect& aRect ) |
85 CMsvSessionPtr aSession, |
|
86 CMceBitmapResolver& aBitmapResolver ) |
|
87 { |
101 { |
88 CreateWindowL(); |
102 CreateWindowL(); |
89 SetRect( aRect ); |
103 SetRect( aRect ); |
90 |
104 |
91 iListBox = new (ELeave) CAknDoubleLargeStyleListBox ; |
105 iListBox = new (ELeave) CAknDoubleLargeStyleListBox ; |
92 // CEikTextListBox* listBox = new (ELeave) CAknSingleLargeStyleListBox; |
106 // CEikTextListBox* listBox = new (ELeave) CAknSingleLargeStyleListBox; |
93 iListBox->ConstructL( this, EAknListBoxSelectionList ); |
107 iListBox->ConstructL( this, EAknListBoxSelectionList ); |
94 |
108 |
95 iListItems = CMceMainViewListItemArray::NewL( |
|
96 aSession, KMsvRootIndexEntryId, EMceListTypeMainView, aBitmapResolver ); |
|
97 |
|
98 iListBox->Model()->SetItemTextArray( iListItems ); |
|
99 iListBox->Model()->SetOwnershipType( ELbmDoesNotOwnItemArray ); |
|
100 |
109 |
101 //iSelectedEntries = new (ELeave) CMsvEntrySelection; |
110 //iSelectedEntries = new (ELeave) CMsvEntrySelection; |
102 } |
111 } |
103 |
112 |
104 // ---------------------------------------------------- |
113 // ---------------------------------------------------- |