equal
deleted
inserted
replaced
50 |
50 |
51 /** |
51 /** |
52 * CWmListItemDrawer |
52 * CWmListItemDrawer |
53 */ |
53 */ |
54 NONSHARABLE_CLASS( CWmListItemDrawer ): public CFormattedCellListBoxItemDrawer |
54 NONSHARABLE_CLASS( CWmListItemDrawer ): public CFormattedCellListBoxItemDrawer |
55 { |
55 { |
56 public: |
56 public: |
57 /** Two-phased constructor. */ |
57 /** Two-phased constructor. */ |
58 static CWmListItemDrawer* NewL( |
58 static CWmListItemDrawer* NewL( |
59 CWmPlugin& aWmPlugin, |
59 CWmPlugin& aWmPlugin, |
60 MTextListBoxModel* aTextListBoxModel, |
60 MTextListBoxModel* aTextListBoxModel, |
61 const CFont* aFont, |
61 const CFont* aFont, |
62 CFormattedCellListBoxData* aFormattedCellData, |
62 CFormattedCellListBoxData* aFormattedCellData, |
63 CWmListBox* aListBox ); |
63 CWmListBox* aListBox ); |
121 /** |
121 /** |
122 * default logo (when widget does not have one) mask |
122 * default logo (when widget does not have one) mask |
123 */ |
123 */ |
124 CFbsBitmap* iDefaultLogoImageMask; |
124 CFbsBitmap* iDefaultLogoImageMask; |
125 |
125 |
126 }; |
126 }; |
127 |
127 |
128 |
128 |
129 // CLASS DECLARATIONS |
129 // CLASS DECLARATIONS |
130 /** |
130 /** |
131 * CWmListBox |
131 * CWmListBox |
132 */ |
132 */ |
133 NONSHARABLE_CLASS( CWmListBox ): public CEikFormattedCellListBox, |
133 NONSHARABLE_CLASS( CWmListBox ): public CEikFormattedCellListBox, |
134 public MWmWidgetDataObserver |
134 public MWmWidgetDataObserver |
135 { |
135 { |
136 public: |
136 public: |
137 |
137 |
138 /** |
138 /** |
139 * Two-phased constructor. |
139 * Two-phased constructor. |
140 */ |
140 */ |
141 static CWmListBox* NewL( |
141 static CWmListBox* NewL( |
142 CWmPlugin& aWmPlugin, |
142 CWmPlugin& aWmPlugin, |
143 const TRect& aRect, |
143 const TRect& aRect, |
144 const CCoeControl* aParent, |
144 const CCoeControl* aParent, |
145 TInt aFlags = 0 ); |
145 TInt aFlags = 0 ); |
146 |
146 |
147 /** Destructor. */ |
147 /** Destructor. */ |
171 /** |
171 /** |
172 * real index for listbox item if findbox is active |
172 * real index for listbox item if findbox is active |
173 * |
173 * |
174 * @return return index from original list for currently selected item |
174 * @return return index from original list for currently selected item |
175 */ |
175 */ |
176 TInt RealIndex( TInt aIndex ); |
176 TInt RealIndex( TInt aIndex, TBool aIgnoreSearchIndex = EFalse ); |
177 |
177 |
178 /** |
178 /** |
179 * number of items in the widget data array (also items on the list) |
179 * number of items in the widget data array (also items on the list) |
180 * |
180 * |
181 * @return count of widget data array |
181 * @return count of widget data array |
190 |
190 |
191 /** |
191 /** |
192 * gets an item by index |
192 * gets an item by index |
193 * |
193 * |
194 * @param aItemIndex index for item to return |
194 * @param aItemIndex index for item to return |
195 */ |
195 * @param aIgnoreSearchIndex if true will get widget from full list |
196 CWmWidgetData& WidgetData( TInt aItemIndex ); |
196 * even when search is open |
|
197 */ |
|
198 CWmWidgetData& WidgetData( TInt aItemIndex, |
|
199 TBool aIgnoreSearchIndex = EFalse ); |
197 |
200 |
198 /** |
201 /** |
199 * gets the constant widget data array |
202 * gets the constant widget data array |
200 */ |
203 */ |
201 inline const RWidgetDataValues& WidgetDataArray(); |
204 inline const RWidgetDataValues& WidgetDataArray(); |
222 * The method reorganises the list model and size. |
225 * The method reorganises the list model and size. |
223 * Drawing is still needed to update the appearance. |
226 * Drawing is still needed to update the appearance. |
224 * |
227 * |
225 * @param aItemIndex index to remove |
228 * @param aItemIndex index to remove |
226 * */ |
229 * */ |
227 void RemoveWidgetData( TInt aItemIndex/*, TBool aRedraw = ETrue*/ ); |
230 void RemoveWidgetData( TInt aItemIndex, TBool aIgnoreSearchIndex = EFalse ); |
228 |
231 |
229 /** |
232 /** |
230 * requests to redraw item in given index position |
233 * requests to redraw item in given index position |
231 * |
234 * |
232 * @param aItemIndex index to redraw |
235 * @param aItemIndex index to redraw |
278 /** |
281 /** |
279 * Adds order data to array |
282 * Adds order data to array |
280 */ |
283 */ |
281 void AddOrderDataL( CWmWidgetOrderData* aOrderData ); |
284 void AddOrderDataL( CWmWidgetOrderData* aOrderData ); |
282 |
285 |
283 /* |
286 /** |
284 * Returns orderdata object by index |
287 * Returns orderdata object by index |
285 */ |
288 */ |
286 CWmWidgetOrderData* OrderData( TInt aItemIndex ); |
289 CWmWidgetOrderData* OrderData( TInt aItemIndex ); |
287 |
290 |
|
291 /** |
|
292 * Returns true if findpane is in use |
|
293 */ |
|
294 TBool IsFindPaneIsVisible(); |
|
295 |
288 private: // from CEikTextListBox |
296 private: // from CEikTextListBox |
289 /** |
297 /** |
290 * Creates the item drawer. |
298 * Creates the item drawer. |
291 * |
299 * |
292 * @see CEikTextListBox::CreateItemDrawerL |
300 * @see CEikTextListBox::CreateItemDrawerL |
293 */ |
301 */ |
294 void CreateItemDrawerL(); |
302 void CreateItemDrawerL(); |
295 |
303 |
296 protected: // from base class CCoeControl |
304 protected: // from base class CCoeControl |
297 |
305 |
298 /** |
306 /** |
299 * Sets the control's extent, specifying a rectangle. |
307 * Sets the control's extent, specifying a rectangle. |
308 * Draws the control. |
316 * Draws the control. |
309 * |
317 * |
310 * @see CCoeControl::Draw |
318 * @see CCoeControl::Draw |
311 */ |
319 */ |
312 void Draw( const TRect& aRect ) const; |
320 void Draw( const TRect& aRect ) const; |
313 |
321 |
314 private: |
322 private: |
315 /** Constructor for performing 1st stage construction */ |
323 /** Constructor for performing 1st stage construction */ |
316 CWmListBox( CWmPlugin& aWmPlugin ); |
324 CWmListBox( CWmPlugin& aWmPlugin ); |
317 |
325 |
318 /** 2nd phase constructor */ |
326 /** 2nd phase constructor */ |
319 void ConstructL( |
327 void ConstructL( |
320 const TRect& aRect, |
328 const TRect& aRect, |
360 |
368 |
361 /** |
369 /** |
362 * state of list box find pane |
370 * state of list box find pane |
363 */ |
371 */ |
364 TBool iFindPaneIsVisible; |
372 TBool iFindPaneIsVisible; |
365 |
373 |
366 /** size of logo rect in list item */ |
374 /** size of logo rect in list item */ |
367 TSize iLogoSize; |
375 TSize iLogoSize; |
368 |
376 |
369 /** |
377 /** |
370 * array of widget order objects |
378 * array of widget order objects |
371 */ |
379 */ |
372 ROrderArray iOrderDataArray; |
380 ROrderArray iOrderDataArray; |
373 }; |
381 }; |
374 #include "wmlistbox.inl" |
382 #include "wmlistbox.inl" |
375 |
383 |
376 #endif ___WMLISTBOX_H__ |
384 #endif ___WMLISTBOX_H__ |
377 |
385 |
378 // End of File |
386 // End of File |