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 |
|
164 |
151 |
165 /** |
152 /** |
166 * Returns a pointer to the column data. Does not imply transfer of ownership. |
153 * Returns a pointer to the column data. Does not imply transfer of ownership. |
167 * |
154 * |
168 * @since ER5U |
155 * @since ER5U |
208 // SERIES60 ITEM MARKS! SAPLAF (the same code is in eikfrlb.cpp and eikclb.cpp) |
195 // SERIES60 ITEM MARKS! SAPLAF (the same code is in eikfrlb.cpp and eikclb.cpp) |
209 TPtrC repl; |
196 TPtrC repl; |
210 TInt pos = -1; |
197 TInt pos = -1; |
211 |
198 |
212 TBool removeicon = (!aItemIsSelected && !ItemMarkReverse()) || (aItemIsSelected && ItemMarkReverse()); |
199 TBool removeicon = (!aItemIsSelected && !ItemMarkReverse()) || (aItemIsSelected && ItemMarkReverse()); |
213 #ifdef PBK2_AVKON_TOUCH_MARKINGMODE_CHANGES |
|
214 |
200 |
215 if ( Flags() & CListItemDrawer::EMarkingModeEnabled ) |
201 if ( Flags() & CListItemDrawer::EMarkingModeEnabled ) |
216 { |
202 { |
217 removeicon = EFalse; |
203 removeicon = EFalse; |
218 } |
204 } |
219 #endif // PBK2_AVKON_TOUCH_MARKINGMODE_CHANGES |
|
220 if ( Flags() & EDrawMarkSelection && ItemMarkPosition() != -1 && removeicon) |
205 if ( Flags() & EDrawMarkSelection && ItemMarkPosition() != -1 && removeicon) |
221 { |
206 { |
222 repl.Set( ItemMarkReplacement() ); |
207 repl.Set( ItemMarkReplacement() ); |
223 pos = ItemMarkPosition(); |
208 pos = ItemMarkPosition(); |
224 } |
209 } |
307 } |
292 } |
308 |
293 |
309 |
294 |
310 TListItemProperties CPbk2ContactViewCustomListBoxItemDrawer::Properties(TInt aItemIndex) const |
295 TListItemProperties CPbk2ContactViewCustomListBoxItemDrawer::Properties(TInt aItemIndex) const |
311 { |
296 { |
312 if (!iPropertyArray) return CTextListItemDrawer::Properties(aItemIndex); |
297 if ( !iPropertyArray ) |
|
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 |
313 CAknListBoxFilterItems *filter = STATIC_CAST(CAknFilteredTextListBoxModel*,iModel)->Filter(); |
309 CAknListBoxFilterItems *filter = STATIC_CAST(CAknFilteredTextListBoxModel*,iModel)->Filter(); |
314 if (filter) |
310 if (filter) |
315 { |
311 { |
316 aItemIndex = filter->FilteredItemIndex(aItemIndex); |
312 aItemIndex = filter->FilteredItemIndex(aItemIndex); |
317 } |
313 } |