phonebookui/Phonebook2/UIControls/src/cpbk2contactviewcustomlistboxitemdrawer.cpp
equal
deleted
inserted
replaced
146 // Data needs the cell size to create/reconfigure highlight animations |
146 // Data needs the cell size to create/reconfigure highlight animations |
147 CPbk2ContactViewCustomListBoxData* data = ColumnData(); |
147 CPbk2ContactViewCustomListBoxData* data = ColumnData(); |
148 data->SetItemCellSize( iItemCellSize ); |
148 data->SetItemCellSize( iItemCellSize ); |
149 } |
149 } |
150 |
150 |
|
151 #ifndef RD_TOUCH2 |
|
152 void CPbk2ContactViewCustomListBoxItemDrawer::DrawCurrentItemRect(const TRect& aRect) const |
|
153 // |
|
154 // Draw the item background |
|
155 // |
|
156 { |
|
157 iGc->SetClippingRect(iViewRect); |
|
158 iGc->SetBrushStyle(CGraphicsContext::ENullBrush); |
|
159 iGc->SetPenColor(iHighlightedBackColor); // KDefaultLbxHighlightRectColor |
|
160 iGc->DrawRect(aRect); |
|
161 iGc->CancelClippingRect(); |
|
162 } |
|
163 #endif // !RD_TOUCH2 |
151 |
164 |
152 /** |
165 /** |
153 * Returns a pointer to the column data. Does not imply transfer of ownership. |
166 * Returns a pointer to the column data. Does not imply transfer of ownership. |
154 * |
167 * |
155 * @since ER5U |
168 * @since ER5U |
195 // SERIES60 ITEM MARKS! SAPLAF (the same code is in eikfrlb.cpp and eikclb.cpp) |
208 // SERIES60 ITEM MARKS! SAPLAF (the same code is in eikfrlb.cpp and eikclb.cpp) |
196 TPtrC repl; |
209 TPtrC repl; |
197 TInt pos = -1; |
210 TInt pos = -1; |
198 |
211 |
199 TBool removeicon = (!aItemIsSelected && !ItemMarkReverse()) || (aItemIsSelected && ItemMarkReverse()); |
212 TBool removeicon = (!aItemIsSelected && !ItemMarkReverse()) || (aItemIsSelected && ItemMarkReverse()); |
|
213 #ifdef PBK2_AVKON_TOUCH_MARKINGMODE_CHANGES |
200 |
214 |
201 if ( Flags() & CListItemDrawer::EMarkingModeEnabled ) |
215 if ( Flags() & CListItemDrawer::EMarkingModeEnabled ) |
202 { |
216 { |
203 removeicon = EFalse; |
217 removeicon = EFalse; |
204 } |
218 } |
|
219 #endif // PBK2_AVKON_TOUCH_MARKINGMODE_CHANGES |
205 if ( Flags() & EDrawMarkSelection && ItemMarkPosition() != -1 && removeicon) |
220 if ( Flags() & EDrawMarkSelection && ItemMarkPosition() != -1 && removeicon) |
206 { |
221 { |
207 repl.Set( ItemMarkReplacement() ); |
222 repl.Set( ItemMarkReplacement() ); |
208 pos = ItemMarkPosition(); |
223 pos = ItemMarkPosition(); |
209 } |
224 } |
292 } |
307 } |
293 |
308 |
294 |
309 |
295 TListItemProperties CPbk2ContactViewCustomListBoxItemDrawer::Properties(TInt aItemIndex) const |
310 TListItemProperties CPbk2ContactViewCustomListBoxItemDrawer::Properties(TInt aItemIndex) const |
296 { |
311 { |
297 if ( !iPropertyArray ) |
312 if (!iPropertyArray) return CTextListItemDrawer::Properties(aItemIndex); |
298 { |
|
299 TListItemProperties prop( |
|
300 CTextListItemDrawer::Properties( aItemIndex ) ); |
|
301 // Do not allow marking other than contact items |
|
302 if ( !ColumnData()->IsContactAtListboxIndex( aItemIndex ) ) |
|
303 { |
|
304 prop.SetHiddenSelection( ETrue ); |
|
305 } |
|
306 return prop; |
|
307 } |
|
308 |
|
309 CAknListBoxFilterItems *filter = STATIC_CAST(CAknFilteredTextListBoxModel*,iModel)->Filter(); |
313 CAknListBoxFilterItems *filter = STATIC_CAST(CAknFilteredTextListBoxModel*,iModel)->Filter(); |
310 if (filter) |
314 if (filter) |
311 { |
315 { |
312 aItemIndex = filter->FilteredItemIndex(aItemIndex); |
316 aItemIndex = filter->FilteredItemIndex(aItemIndex); |
313 } |
317 } |