1 /* |
|
2 * Copyright (c) 2002-2005 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: drop-down list control |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CFEPCTRLDROPDOWNLIST_H |
|
20 #define C_CFEPCTRLDROPDOWNLIST_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32std.h> |
|
24 #include <w32std.h> |
|
25 #include <barsread.h> |
|
26 #include <peninputdropdownlistcontext.h> |
|
27 #include <peninputlayoutbasecontrol.h> |
|
28 #include <AknsUtils.h> |
|
29 |
|
30 |
|
31 /** class forward decalaration */ |
|
32 class CCandidate; |
|
33 class CPages; |
|
34 class CBitmapDb; |
|
35 class CListManager; |
|
36 class MEventObserver; |
|
37 class CBubbleCtrl; |
|
38 class TAknTextLineLayout; |
|
39 |
|
40 /** The max length for fixed text */ |
|
41 const TInt KMaxFixedTextNumber = 32; |
|
42 const TInt KDropDownListCtrlType = EUserCtrlBase | ECtrlBaseCtrl; |
|
43 |
|
44 /** |
|
45 * The interface dealing with outer event from any control except the list |
|
46 * |
|
47 * The interface dealing with outer event from any control except the list |
|
48 * |
|
49 * @lib FepCtrlDropdownList.lib |
|
50 * @since S60 v3.2 |
|
51 */ |
|
52 class MListEventHandler |
|
53 { |
|
54 |
|
55 public: |
|
56 |
|
57 /** |
|
58 * The method will be called when there is event from any control except from the list |
|
59 * |
|
60 * @since S60 v3.2 |
|
61 * @param aEventType The event type |
|
62 * @param aCtrl The control who sends out the event |
|
63 * @param aEventData The data relative with the event |
|
64 */ |
|
65 virtual void HandleListOuterEvent(TInt aEventType, CFepUiBaseCtrl* aCtrl, |
|
66 const TDesC& aEventData); |
|
67 |
|
68 }; |
|
69 |
|
70 /** |
|
71 * The drop-down list control |
|
72 * |
|
73 * The drop-down list control |
|
74 * |
|
75 * @lib FepCtrlDropdownList.lib |
|
76 * @since S60 v3.2 |
|
77 */ |
|
78 class CFepCtrlDropdownList : public CFepUiBaseCtrl, |
|
79 public MFepCtrlDropdownListContext, |
|
80 public MEventObserver |
|
81 { |
|
82 |
|
83 public: // internal type definition |
|
84 /** |
|
85 * The type of list, expandable or no-expandable |
|
86 * |
|
87 * The type of list, expandable or no-expandable |
|
88 * |
|
89 * @lib FepCtrlDropdownList.lib |
|
90 * @since S60 v3.2 |
|
91 */ |
|
92 enum TListType |
|
93 { |
|
94 EListExpandable, |
|
95 EListExpandableWithBubble, |
|
96 EListNoExpandable, |
|
97 EListNoExpandableWithBubble, |
|
98 EListExpandableWithoutIcon, |
|
99 EListExpandableRollWithIcon, |
|
100 EListExpandableRollWithIconWithBubble, |
|
101 EListExpandableMultiRowWithoutIcon |
|
102 }; |
|
103 |
|
104 enum TCandTruncateType |
|
105 { |
|
106 // beginning part of candidate are hide |
|
107 ECandTruncateFromBeginning, |
|
108 // end part of candidate are shown as ellipsis |
|
109 ECandTruncateAsEllipsis, |
|
110 // end part of candidate are hide |
|
111 ECandTruncateFromEnd |
|
112 }; |
|
113 |
|
114 enum TExpandType |
|
115 { |
|
116 ECandExpandUpward, |
|
117 ECandExpandDownward |
|
118 }; |
|
119 |
|
120 // horizontal direction of candidate list: shrink and expanded |
|
121 enum THDirection |
|
122 { |
|
123 ECandFromLToR, |
|
124 ECandFromRToL |
|
125 }; |
|
126 |
|
127 public: //Method |
|
128 |
|
129 /** |
|
130 * Destructor |
|
131 * |
|
132 * @since S60 v3.2 |
|
133 * @return None. |
|
134 */ |
|
135 IMPORT_C virtual ~CFepCtrlDropdownList(); |
|
136 |
|
137 /** |
|
138 * Create one CFepCtrlDropdownList object |
|
139 * |
|
140 * @since S60 v3.2 |
|
141 * @param aTopLeftPoint The top left point of the drop down list |
|
142 * @param aUiLayout The layout plugin |
|
143 * @param aControlId This control ID |
|
144 * @param aReader The reader from which the bitmaps ID can be read |
|
145 * @param aCellWidth The width of one basic cell |
|
146 * @param aCellHeight The height of one basic cell |
|
147 * @param aNaviWidth The width of navidation |
|
148 * @param aColNum The number of columns in one row |
|
149 * @param aRowNum The number of rows |
|
150 * @param aFont The font used to draw the text |
|
151 * @param aHandler The handle which will deal with outer event to this control |
|
152 * @param aAlignment The alighment used to draw text |
|
153 * @param aTextMargin if alignment is not ECenter, the margin is used |
|
154 * @param aBorderColor The color of border |
|
155 * @param aBgColor The color of background |
|
156 * @param aNavigationBgColor The background color of navigation area |
|
157 * @param aTextColor The color of text |
|
158 * @param aSpecialTextColor The color of special text |
|
159 * @param aHighLightTextColor The color of highlight text |
|
160 * @param aHighLightBgColor The background color of high light |
|
161 * @param aButtonDownBgColor The background color when button pressing |
|
162 * @return The CFepCtrlDropdownList object. |
|
163 */ |
|
164 IMPORT_C static CFepCtrlDropdownList* NewL(const TPoint& aTopLeftPoint, |
|
165 CFepUiLayout* aUiLayout, |
|
166 TInt aControlId, |
|
167 TResourceReader& aReader, |
|
168 const TInt aCellWidth, |
|
169 const TInt aCellHeight, |
|
170 const TInt aNaviWidth, |
|
171 const TInt aColNum, |
|
172 const TInt aRowNum, |
|
173 const CFont* aFont = NULL, |
|
174 MListEventHandler* aHandler = NULL, |
|
175 const CGraphicsContext::TTextAlign aAlignment = CGraphicsContext::ECenter, |
|
176 const TInt aTextMargin = 3, |
|
177 const TRgb aBorderColor = KRgbBlack, |
|
178 const TRgb aBgColor = TRgb(0xeeeeee), |
|
179 const TRgb aNavigationBgColor = TRgb(0xeeeeee), |
|
180 const TRgb aTextColor = KRgbBlack, |
|
181 const TRgb aSpecialTextColor = KRgbBlack, |
|
182 const TRgb aHighLightTextColor = KRgbBlack, |
|
183 const TRgb aHighLightBgColor = TRgb(0xcccccc), |
|
184 const TRgb aButtonDownBgColor = KRgbGray); |
|
185 IMPORT_C static CFepCtrlDropdownList* NewL(CFepUiLayout* aUiLayout, |
|
186 TInt aControlId, |
|
187 TInt aResId, |
|
188 TPoint aTopLeftPoint, |
|
189 TSize aCellSize, |
|
190 TInt aColNum, |
|
191 TInt aRowNum); |
|
192 |
|
193 IMPORT_C static CFepCtrlDropdownList* NewL(CFepUiLayout* aUiLayout, |
|
194 TInt aControlId, |
|
195 TInt aResId, |
|
196 TPoint aTopLeftPoint, |
|
197 const CFont* aFont, |
|
198 TSize aCellSize, |
|
199 TInt aNaviWidth, |
|
200 TInt aColNum, |
|
201 TInt aRowNum, |
|
202 TInt aSpinBtnHeight, |
|
203 TInt aHorizontalCellMargin = 0, |
|
204 TInt aVerticalCellMargin = 0, |
|
205 THDirection aDirection = ECandFromLToR, |
|
206 TBool aPageShown = ETrue); |
|
207 |
|
208 /** |
|
209 * Create one CFepCtrlDropdownList object, need to pop up yourself |
|
210 * |
|
211 * @since S60 v3.2 |
|
212 * @param aTopLeftPoint The top left point of the drop down list |
|
213 * @param aUiLayout The layout plugin |
|
214 * @param aControlId This control ID |
|
215 * @param aReader The reader from which the bitmaps ID can be read |
|
216 * @param aCellWidth The width of one basic cell |
|
217 * @param aCellHeight The height of one basic cell |
|
218 * @param aNaviWidth The width of navidation |
|
219 * @param aColNum The number of columns in one row |
|
220 * @param aRowNum The number of rows |
|
221 * @param aFont The font used to draw the text |
|
222 * @param aHandler The handle which will deal with outer event to this control |
|
223 * @param aAlignment The alighment used to draw text |
|
224 * @param aTextMargin if alignment is not ECenter, the margin is used |
|
225 * @param aBorderColor The color of border |
|
226 * @param aBgColor The color of background |
|
227 * @param aNavigationBgColor The background color of navigation area |
|
228 * @param aTextColor The color of text |
|
229 * @param aSpecialTextColor The color of special text |
|
230 * @param aHighLightTextColor The color of highlight text |
|
231 * @param aHighLightBgColor The background color of high light |
|
232 * @param aButtonDownBgColor The background color when button pressing |
|
233 * @return The CFepCtrlDropdownList object. |
|
234 */ |
|
235 IMPORT_C static CFepCtrlDropdownList* NewLC(const TPoint& aTopLeftPoint, |
|
236 CFepUiLayout* aUiLayout, |
|
237 TInt aControlId, |
|
238 TResourceReader& aReader, |
|
239 const TInt aCellWidth, |
|
240 const TInt aCellHeight, |
|
241 const TInt aNaviWidth, |
|
242 const TInt aColNum, |
|
243 const TInt aRowNum, |
|
244 const CFont* aFont = NULL, |
|
245 MListEventHandler* aHandler = NULL, |
|
246 const CGraphicsContext::TTextAlign aAlignment = CGraphicsContext::ECenter, |
|
247 const TInt aTextMargin = 3, |
|
248 const TRgb aBorderColor = KRgbBlack, |
|
249 const TRgb aBgColor = TRgb(0xeeeeee), |
|
250 const TRgb aNavigationBgColor = TRgb(0xeeeeee), |
|
251 const TRgb aTextColor = KRgbBlack, |
|
252 const TRgb aSpecialTextColor = KRgbBlack, |
|
253 const TRgb aHighLightTextColor = KRgbBlack, |
|
254 const TRgb aHighLightBgColor = TRgb(0xcccccc), |
|
255 const TRgb aButtonDownBgColor = KRgbGray); |
|
256 |
|
257 /** |
|
258 * Size change function |
|
259 * |
|
260 * @since S60 v3.2 |
|
261 * @param aCellWidth The width of one basic cell |
|
262 * @param aCellHeight The height of one basic cell |
|
263 * @param aNaviWidth The width of navidation |
|
264 * @param aTopLeftPoint The top left point of the drop down list |
|
265 * @param aColNum The number of columns in one row |
|
266 * @param aRowNum The number of rows |
|
267 * @return None. |
|
268 */ |
|
269 IMPORT_C void SizeChanged(const TInt aCellWidth, const TInt aCellHeight, |
|
270 const TInt aNaviWidth, const TPoint aTopLeftPoint = TPoint(0,0), |
|
271 const TInt aColNum = 0, const TInt aRowNum = 0); |
|
272 |
|
273 /** |
|
274 * Set top left point of the list |
|
275 * |
|
276 * @since S60 v3.2 |
|
277 * @param aTopLeftPoint The top left point of the drop down list |
|
278 * @return None. |
|
279 */ |
|
280 IMPORT_C void SetTopLeftPoint(const TPoint aTopLeftPoint); |
|
281 |
|
282 /** |
|
283 * Set the width of one basic cell |
|
284 * |
|
285 * @since S60 v3.2 |
|
286 * @param aCellWidth The width of one basic cell |
|
287 * @return None. |
|
288 */ |
|
289 IMPORT_C void SetCellWidth(const TInt aCellWidth); |
|
290 |
|
291 /** |
|
292 * Set the height of one basic cell |
|
293 * |
|
294 * @since S60 v3.2 |
|
295 * @param aCellHeight The height of one basic cell |
|
296 * @return None. |
|
297 */ |
|
298 IMPORT_C void SetCellHeight(const TInt aCellHeight); |
|
299 |
|
300 /** |
|
301 * Set width of navigation |
|
302 * |
|
303 * @since S60 v3.2 |
|
304 * @param aNaviWidth The width of navidation |
|
305 * @return None. |
|
306 */ |
|
307 IMPORT_C void SetNaviWidth(const TInt aNaviWidth); |
|
308 IMPORT_C void SetSpinBtnHeight(const TInt aHeight); |
|
309 IMPORT_C void SetCellMargin(const TInt aHorizontalMargin, const TInt aVerticalMargin); |
|
310 |
|
311 /** |
|
312 * Set column numbers |
|
313 * |
|
314 * @since S60 v3.2 |
|
315 * @param aColNum The number of columns in one row |
|
316 * @return None. |
|
317 */ |
|
318 IMPORT_C void SetColNum(const TInt aColNum); |
|
319 |
|
320 /** |
|
321 * Set or unset highlight for cells. |
|
322 * |
|
323 * @since S60 v3.2 |
|
324 * @param aCellIndex Which cell would be set |
|
325 * @param aHighlight The flag of highlight, set highlight if ETrue, otherwise cancel highlight |
|
326 * @return None. |
|
327 */ |
|
328 IMPORT_C void SetHighlightCell(const TInt aCellIndex, TBool aHighlight = ETrue, |
|
329 const TBool aIsDraw = ETrue ); |
|
330 |
|
331 |
|
332 /** |
|
333 * Set row numbers |
|
334 * |
|
335 * @since S60 v3.2 |
|
336 * @param aRowNum The number of rows |
|
337 * @return None. |
|
338 */ |
|
339 IMPORT_C void SetRowNum(const TInt aRowNum); |
|
340 |
|
341 /** |
|
342 * Set border color |
|
343 * |
|
344 * @since S60 v3.2 |
|
345 * @param aBorderColor The border color |
|
346 * @param aReDraw Redraw if ETrue, otherwise not redraw |
|
347 * @return None. |
|
348 */ |
|
349 IMPORT_C void SetBorderColor(TRgb aBorderColor, TBool aReDraw = EFalse); |
|
350 |
|
351 /** |
|
352 * Set background color for the whole area |
|
353 * |
|
354 * @since S60 v3.2 |
|
355 * @param aBgColor The background color |
|
356 * @param aReDraw Redraw if ETrue, otherwise not redraw |
|
357 * @return None. |
|
358 */ |
|
359 IMPORT_C void SetBgColor(TRgb aBgColor, TBool aReDraw = EFalse); |
|
360 |
|
361 /** |
|
362 * Set background for navigation area |
|
363 * |
|
364 * @since S60 v3.2 |
|
365 * @param aNavigationBgColor The background color of navigation area |
|
366 * @param aReDraw Redraw if ETrue, otherwise not redraw |
|
367 * @return None. |
|
368 */ |
|
369 IMPORT_C void SetNavigationBgColor(TRgb aNavigationBgColor, TBool aReDraw = EFalse); |
|
370 |
|
371 /** |
|
372 * Set text color |
|
373 * |
|
374 * @since S60 v3.2 |
|
375 * @param aTextColor The color used to draw text |
|
376 * @param aReDraw Redraw if ETrue, otherwise not redraw |
|
377 * @return None. |
|
378 */ |
|
379 IMPORT_C void SetTextColor(TRgb aTextColor, TBool aReDraw = EFalse); |
|
380 |
|
381 /** |
|
382 * Set color for special text |
|
383 * |
|
384 * @since S60 v3.2 |
|
385 * @param aSpecialTextColor The color used to draw special text |
|
386 * @param aReDraw Redraw if ETrue, otherwise not redraw |
|
387 * @return None. |
|
388 */ |
|
389 IMPORT_C void SetSpecialTextColor(TRgb aSpecialTextColor, TBool aReDraw = EFalse); |
|
390 |
|
391 /** |
|
392 * Set color for high light text |
|
393 * |
|
394 * @since S60 v3.2 |
|
395 * @param aHighLightTextColor The color used to draw high light text |
|
396 * @param aReDraw Redraw if ETrue, otherwise not redraw |
|
397 * @return None. |
|
398 */ |
|
399 IMPORT_C void SetHighLightTextColor(TRgb aHighLightTextColor, TBool aReDraw = EFalse); |
|
400 |
|
401 /** |
|
402 * Set background color for highlight |
|
403 * |
|
404 * @since S60 v3.2 |
|
405 * @param aHighLightBgColor The background color of high light area |
|
406 * @param aReDraw Redraw if ETrue, otherwise not redraw |
|
407 * @return None. |
|
408 */ |
|
409 IMPORT_C void SetHighLightBgColor(TRgb aHighLightBgColor, TBool aReDraw = EFalse); |
|
410 |
|
411 /** |
|
412 * The method will be called when there is event from any control except from the list |
|
413 * |
|
414 * @since S60 v3.2 |
|
415 * @param aFont The font used to draw text |
|
416 * @param aReDraw Redraw if ETrue, otherwise not redraw |
|
417 * @return None. |
|
418 */ |
|
419 IMPORT_C void SetFont(const CFont* aFont, TBool aReDraw = EFalse); |
|
420 |
|
421 /** |
|
422 * Set text alignment |
|
423 * |
|
424 * @since S60 v3.2 |
|
425 * @param aAlignment The alignment used to draw text |
|
426 * @param aReDraw Redraw if ETrue, otherwise not redraw |
|
427 * @return None. |
|
428 */ |
|
429 IMPORT_C void SetTextAlighment(const CGraphicsContext::TTextAlign aAlignment, |
|
430 TBool aReDraw = EFalse); |
|
431 |
|
432 /** |
|
433 * Set text margin if alignment is not ECenter |
|
434 * |
|
435 * @since S60 v3.2 |
|
436 * @param aTextMargin the margin used to draw text |
|
437 * @param aReDraw Redraw if ETrue, otherwise not redraw |
|
438 * @return None. |
|
439 */ |
|
440 IMPORT_C void SetTextMargin(const TInt aTextMargin, TBool aReDraw = EFalse); |
|
441 |
|
442 /** |
|
443 * set secondary list |
|
444 * |
|
445 * @since S60 v3.2 |
|
446 * @param aIndex the cell index need to set new color |
|
447 * @param aBgColor The background color |
|
448 * @param aReDraw Redraw if ETrue, otherwise not redraw |
|
449 * @return None. |
|
450 */ |
|
451 IMPORT_C void SetSecondaryList(RArray<TInt>& aIndexList, TBool aReDraw = EFalse); |
|
452 |
|
453 /** |
|
454 * Set event handler when there is out event coming |
|
455 * |
|
456 * @since S60 v3.2 |
|
457 * @param aHandler The event handler, which has implemented the interface of MListEventHandler |
|
458 * @return None. |
|
459 */ |
|
460 IMPORT_C void SetListEventHandler(MListEventHandler* aHandler); |
|
461 |
|
462 /** |
|
463 * Set event id when candidate is selected |
|
464 * |
|
465 * @since S60 v3.2 |
|
466 * @param aEventId The event id when candidate is selected |
|
467 * @return The CListMultiRowWithIcon pointer. |
|
468 */ |
|
469 IMPORT_C void SetEventIdForCandidateSelected(TInt aEventId); |
|
470 |
|
471 /** |
|
472 * Set event id when need to get next page candidate |
|
473 * |
|
474 * @since S60 v3.2 |
|
475 * @param aEventId The event id need next page candidate |
|
476 * @return None |
|
477 */ |
|
478 IMPORT_C void SetEventIdForNextPageCandidate(TInt aEventId); |
|
479 |
|
480 /** |
|
481 * Set event id when need to get previous page candidate |
|
482 * |
|
483 * @since S60 v3.2 |
|
484 * @param aEventId The event id need previous page candidate |
|
485 * @return None |
|
486 */ |
|
487 IMPORT_C void SetEventIdForPreviousPageCandidate(TInt aEventId); |
|
488 |
|
489 /** |
|
490 * Set event id when need to judge if candidate exist |
|
491 * |
|
492 * @since S60 v3.2 |
|
493 * @param aEventId The event id judge if candidate exist |
|
494 * @return None |
|
495 */ |
|
496 IMPORT_C void SetEventIdForCandidateExisted(TInt aEventId); |
|
497 |
|
498 /** |
|
499 * Set candidates for the list |
|
500 * |
|
501 * @since S60 v3.2 |
|
502 * @param aCandidates the candidates array |
|
503 * @param aListType The list type used when redraw |
|
504 * @param aFixedText The fixed text(only used in English) |
|
505 * @return None. |
|
506 */ |
|
507 IMPORT_C void SetCandidatesL(const RPointerArray<HBufC>& aCandidates, |
|
508 const TListType aListType = EListExpandable, |
|
509 const TDesC& aFixedText = KNullDesC16); |
|
510 |
|
511 IMPORT_C void SetCandTruncateType( |
|
512 const TCandTruncateType aTruncateType = ECandTruncateFromEnd); |
|
513 |
|
514 /** |
|
515 * Add candidates for the list |
|
516 * |
|
517 * @since S60 v3.2 |
|
518 * @param aCandidates the candidates array |
|
519 * @param aListType The list type used when redraw |
|
520 * @return None. |
|
521 */ |
|
522 IMPORT_C void AddCandidatesL(const RPointerArray<HBufC>& aCandidates, |
|
523 const TListType aListType = EListExpandable); |
|
524 |
|
525 /** |
|
526 * Reset and clear all candidates in the list and redraw the list |
|
527 * |
|
528 * @since S60 v3.2 |
|
529 * @param aListType The list type used when redraw |
|
530 * @return None. |
|
531 */ |
|
532 IMPORT_C void ResetAndClear(const TListType aListType = EListNoExpandable); |
|
533 |
|
534 |
|
535 /** |
|
536 * Fold the expanding list |
|
537 * |
|
538 * @since S60 v3.2 |
|
539 * @return None. |
|
540 */ |
|
541 IMPORT_C void FoldList(); |
|
542 |
|
543 // from base class CFepUiBaseCtrl |
|
544 |
|
545 /** |
|
546 * Draw the list |
|
547 * |
|
548 * @since S60 v3.2 |
|
549 * @return None |
|
550 */ |
|
551 IMPORT_C void Draw(); |
|
552 |
|
553 /** |
|
554 * Active the control |
|
555 * |
|
556 * @since S60 v3.2 |
|
557 * @return None |
|
558 */ |
|
559 IMPORT_C void SetActive(TBool aActiveFlag); |
|
560 |
|
561 /** |
|
562 * Get rect of the drop down list |
|
563 * |
|
564 * @since S60 v3.2 |
|
565 * @return The rect of the drop down list |
|
566 */ |
|
567 IMPORT_C const TRect& Rect(); |
|
568 |
|
569 /** |
|
570 * Handle pointer down event |
|
571 * |
|
572 * @since S60 v3.2 |
|
573 * @param aPoint The point position relative the layout |
|
574 */ |
|
575 IMPORT_C CFepUiBaseCtrl* HandlePointerDownEventL(const TPoint& aPoint); |
|
576 |
|
577 /** |
|
578 * Handle pointer move event |
|
579 * |
|
580 * @since S60 v3.2 |
|
581 * @param aPoint The point position relative the layout |
|
582 */ |
|
583 IMPORT_C CFepUiBaseCtrl* HandlePointerMoveEventL(const TPoint& aPoint); |
|
584 |
|
585 /** |
|
586 * Handle pointer up event |
|
587 * |
|
588 * @since S60 v3.2 |
|
589 * @param aPoint The point position relative the layout |
|
590 */ |
|
591 IMPORT_C CFepUiBaseCtrl* HandlePointerUpEventL(const TPoint& aPoint); |
|
592 |
|
593 /** |
|
594 * Handle pointer leave event |
|
595 * |
|
596 * @since S60 v3.2 |
|
597 * @param aPoint The point position relative the layout |
|
598 */ |
|
599 IMPORT_C void HandlePointerLeave(const TPoint& aPoint); |
|
600 |
|
601 // from interface MEventObserver |
|
602 |
|
603 /** |
|
604 * Handle event |
|
605 * @since Series 60 3.1 |
|
606 * @param aEventType The event type |
|
607 * @param aCtrl The control who sends the event |
|
608 * @param aEventData The event data |
|
609 * @return None |
|
610 */ |
|
611 IMPORT_C void HandleControlEvent(TInt aEventType, CFepUiBaseCtrl* aCtrl, |
|
612 const TDesC& aEventData); |
|
613 |
|
614 // from base class CFepUiBaseCtrl |
|
615 |
|
616 /** |
|
617 * Move the drop down list |
|
618 * @since Series 60 3.1 |
|
619 * @param aOffset The offset point |
|
620 * @return None |
|
621 */ |
|
622 IMPORT_C void Move(const TPoint& aOffset); |
|
623 |
|
624 /** |
|
625 * Hide the control |
|
626 * @since Series 60 3.1 |
|
627 * @return None |
|
628 */ |
|
629 IMPORT_C void OnDeActivate(); |
|
630 |
|
631 /** |
|
632 * Hide or show dropdown list. |
|
633 * |
|
634 * @param aFlag ETrue if want to hide the control. |
|
635 */ |
|
636 IMPORT_C void Hide( TBool aFlag ); |
|
637 |
|
638 // from interface MContext |
|
639 |
|
640 /** |
|
641 * Get the candidate count |
|
642 * |
|
643 * @since S60 v3.2 |
|
644 * @return the candidate count. |
|
645 */ |
|
646 IMPORT_C TInt CandidateCount() const; |
|
647 |
|
648 /** |
|
649 * Enable multi color or not |
|
650 * |
|
651 * @since S60 v3.2 |
|
652 * @param aEnable Enable mutil color if ETrue, otherwise disable |
|
653 * @param aReDraw Redraw if ETrue, otherwise not redraw |
|
654 * @return None. |
|
655 */ |
|
656 IMPORT_C void EnableSecondary(TBool aEnable, TBool aReDraw = EFalse); |
|
657 |
|
658 /** |
|
659 * Get the flag of enable or disable multi color |
|
660 * |
|
661 * @since S60 v3.2 |
|
662 * @return ETrue if enable, or EFalse. |
|
663 */ |
|
664 IMPORT_C TBool IsEnableSecondary() const; |
|
665 |
|
666 /** |
|
667 * This function creates drop down list from resource, before calling |
|
668 * this function, caller should set resource id of drop down list first |
|
669 * |
|
670 * @since S60 v3.2 |
|
671 * @return None |
|
672 */ |
|
673 IMPORT_C void ConstructFromResourceL(); |
|
674 |
|
675 /** |
|
676 * Get secondary list |
|
677 * |
|
678 * @since S60 v3.2 |
|
679 * @return color array. |
|
680 */ |
|
681 const RArray<TInt>& GetSecondaryList() const; |
|
682 |
|
683 /** |
|
684 * Draw mask for the appointed rect |
|
685 * @since Series 60 3.1 |
|
686 * @param aRect The rect which will be redrawn |
|
687 * @return None |
|
688 */ |
|
689 void DrawMask(TRect aRect); |
|
690 |
|
691 /** |
|
692 * Active bitmap context |
|
693 * @since Series 60 3.1 |
|
694 * @return None |
|
695 */ |
|
696 void ActivateBitmapContext(); |
|
697 |
|
698 /** |
|
699 * Get the graphics context |
|
700 * @since Series 60 3.1 |
|
701 * @return The graphics context |
|
702 */ |
|
703 CFbsBitGc* Gc(); |
|
704 |
|
705 /** |
|
706 * Get the first candidate visible |
|
707 * |
|
708 * @since S60 v3.2 |
|
709 * @return The first candidate index. |
|
710 */ |
|
711 TInt GetFirstCandidateIndex(); |
|
712 |
|
713 /** |
|
714 * Get the first candidate visible |
|
715 * |
|
716 * @since S60 v3.2 |
|
717 * @return The last candidate index. |
|
718 */ |
|
719 TInt GetLastCandidateIndex(); |
|
720 |
|
721 /** |
|
722 * Set the first candidate visible |
|
723 * |
|
724 * @since S60 v3.2 |
|
725 * @return None. |
|
726 */ |
|
727 void SetFirstCandidateIndex(TInt aFirstIndex); |
|
728 |
|
729 /** |
|
730 * Set the first candidate visible |
|
731 * |
|
732 * @since S60 v3.2 |
|
733 * @return None. |
|
734 */ |
|
735 void SetLastCandidateIndex(TInt aLastIndex); |
|
736 |
|
737 /** |
|
738 * Get the appointed candidate |
|
739 * @since Series 60 3.1 |
|
740 * @param aIndex The index which will be check out |
|
741 * @return The appointed candidate |
|
742 */ |
|
743 CCandidate* GetCandidate(TInt aIndex); |
|
744 |
|
745 /** |
|
746 * Get top left point |
|
747 * @since Series 60 3.1 |
|
748 * @return The top left point |
|
749 */ |
|
750 TPoint GetTopLeftPoint(); |
|
751 |
|
752 /** |
|
753 * Get cell width |
|
754 * @since Series 60 3.1 |
|
755 * @return The cell width |
|
756 */ |
|
757 TInt GetCellWidth(); |
|
758 |
|
759 /** |
|
760 * Get cell height |
|
761 * @since Series 60 3.1 |
|
762 * @return The cell height |
|
763 */ |
|
764 TInt GetCellHeight(); |
|
765 |
|
766 /** |
|
767 * Get navigation width |
|
768 * @since Series 60 3.1 |
|
769 * @return The navigation width |
|
770 */ |
|
771 TInt GetNaviWidth(); |
|
772 |
|
773 TInt GetSpinBtnHeight(); |
|
774 TInt GetCellHorizontalMargin(); |
|
775 TInt GetCellVerticalMargin(); |
|
776 TInt ListType(); |
|
777 TInt OneRowStartCandIdx(); |
|
778 void SetOneRowStartCandIdx(TInt aOriginalCandIdx); |
|
779 TInt GetOriginalFirstCandIdx(); |
|
780 void SetOriginalFirstCandIdx(TInt aOriginalFirstCandIdx); |
|
781 TInt CandTruncateType(); |
|
782 CList* ActiveList(); |
|
783 void SetUpdateListReDrawFlag(TBool aReDraw); |
|
784 TBool GetUpdateListRedrawFlag(); |
|
785 IMPORT_C void SetFuzzyBoundry(TInt aFuzzyBoundry); |
|
786 TInt FuzzyBoundry(); |
|
787 TInt CandExpandType(); |
|
788 IMPORT_C void SetCandExpandType(const TExpandType aType = ECandExpandDownward); |
|
789 TInt CandHDirection(); |
|
790 inline void SetHDirection(const THDirection aDirection = ECandFromLToR); |
|
791 |
|
792 // when drop down list is expandable, decide pageup/pagedown shown or not |
|
793 TBool PageCtrlShown(); |
|
794 inline void SetPageCtrlShown(TBool aShown = ETrue); |
|
795 |
|
796 /** |
|
797 * Get columns number |
|
798 * @since Series 60 3.1 |
|
799 * @return The top left point |
|
800 */ |
|
801 TInt GetColNum(); |
|
802 |
|
803 /** |
|
804 * Get rows number |
|
805 * @since Series 60 3.1 |
|
806 * @return The top left point |
|
807 */ |
|
808 TInt GetRowNum(); |
|
809 |
|
810 /** |
|
811 * Get the font used to draw text |
|
812 * @since Series 60 3.1 |
|
813 * @return The font used to draw text |
|
814 */ |
|
815 const CFont* GetFont(); |
|
816 |
|
817 /** |
|
818 * Get alignment used to draw the text |
|
819 * @since Series 60 3.1 |
|
820 * @return The alignment used to draw the text |
|
821 */ |
|
822 CGraphicsContext::TTextAlign GetAlignment(); |
|
823 |
|
824 /** |
|
825 * Get text margin used to draw the text |
|
826 * @since S60 v3.2 |
|
827 * @return The margin used to draw the text |
|
828 */ |
|
829 TInt GetTextMargin(); |
|
830 |
|
831 /** |
|
832 * Get background color |
|
833 * @since Series 60 3.1 |
|
834 * @return The background color |
|
835 */ |
|
836 TRgb GetBgColor(); |
|
837 |
|
838 /** |
|
839 * Get button down color |
|
840 * @since Series 60 3.1 |
|
841 * @return The background color |
|
842 */ |
|
843 TRgb GetButtonDownBgColor(); |
|
844 |
|
845 /** |
|
846 * Get border color |
|
847 * @since Series 60 3.1 |
|
848 * @return The border color |
|
849 */ |
|
850 TRgb GetBorderColor(); |
|
851 |
|
852 /** |
|
853 * Get text color |
|
854 * @since Series 60 3.1 |
|
855 * @return The text color |
|
856 */ |
|
857 TRgb GetTextColor(); |
|
858 |
|
859 /** |
|
860 * Get background color for highlight area |
|
861 * @since Series 60 3.1 |
|
862 * @return The background color for highlight area |
|
863 */ |
|
864 TRgb GetHighLightBgColor(); |
|
865 |
|
866 /** |
|
867 * Get high light text color |
|
868 * @since Series 60 3.1 |
|
869 * @return The high light text color |
|
870 */ |
|
871 TRgb GetHighLightTextColor(); |
|
872 |
|
873 /** |
|
874 * Get special text color |
|
875 * @since Series 60 3.1 |
|
876 * @return The special text color |
|
877 */ |
|
878 TRgb GetSpecialTextColor(); |
|
879 |
|
880 /** |
|
881 * Get fixed text |
|
882 * @since Series 60 3.1 |
|
883 * @return The fixed text |
|
884 */ |
|
885 TDesC GetFixedText(); |
|
886 |
|
887 /** |
|
888 * Get highlight cell list |
|
889 * @since Series 60 3.1 |
|
890 * @return The highlight cell list |
|
891 */ |
|
892 const RArray<TInt>& GetHighlightList() const; |
|
893 |
|
894 /** |
|
895 * Get page manager |
|
896 * @since Series 60 3.1 |
|
897 * @return The page manager |
|
898 */ |
|
899 CPages* GetPages(); |
|
900 |
|
901 /** |
|
902 * Get bitmap manager |
|
903 * @since Series 60 3.1 |
|
904 * @return The bitmap manager |
|
905 */ |
|
906 CBitmapDb* GetBitmapDb(); |
|
907 |
|
908 /** |
|
909 * Report event when candidate is selected |
|
910 * @since Series 60 3.1 |
|
911 * @param aCandidate The candidate string |
|
912 * @param aSelectedIndex The index of the selected candidate |
|
913 * @return None |
|
914 */ |
|
915 void ReportCandidateSelectEventL(const TDesC& aCandidate, const TInt aSelectedIndex); |
|
916 |
|
917 /** |
|
918 * Invalidate some rect and redraw it |
|
919 * @since Series 60 3.1 |
|
920 * @param aRect The rect which will be redrawn |
|
921 * @param aUpdateAll Update all or not |
|
922 * @return None |
|
923 */ |
|
924 void Invalidate(const TRect& aRect,TBool aUpdateAll = EFalse); |
|
925 |
|
926 /** |
|
927 * Change active list |
|
928 * |
|
929 * @since S60 v3.2 |
|
930 * @param aList The new active list |
|
931 * @param aLastIndex The last visible candidate index |
|
932 * @return None. |
|
933 */ |
|
934 void ChangeActiveList(CList* aList, TInt aLastIndex = 0); |
|
935 |
|
936 /** |
|
937 * Get pen size |
|
938 * |
|
939 * @since S60 v3.2 |
|
940 * @return The pen size. |
|
941 */ |
|
942 const TSize GetPenSize(); |
|
943 |
|
944 /** |
|
945 * Set pointer capture |
|
946 * |
|
947 * @since S60 v3.2 |
|
948 * @param aFlag ETrue to capture pointer, otherwise EFalse |
|
949 * @return None. |
|
950 */ |
|
951 void SetCapture(TBool aFlag); |
|
952 |
|
953 /** |
|
954 * Notify get next candidate page |
|
955 * |
|
956 * @since S60 v3.2 |
|
957 * @return None. |
|
958 */ |
|
959 void NotifyGetNextPage(); |
|
960 |
|
961 /** |
|
962 * Notify get previous candidate page |
|
963 * |
|
964 * @since S60 v3.2 |
|
965 * @return None. |
|
966 */ |
|
967 void NotifyGetPreviousPage(); |
|
968 |
|
969 /** |
|
970 * Notify close candidate page |
|
971 * |
|
972 * @since S60 v3.2 |
|
973 * @return None. |
|
974 */ |
|
975 void NotifyClosePage(); |
|
976 |
|
977 /** |
|
978 * Set flag of if next candidate after last page eixsted |
|
979 * |
|
980 * @since S60 v3.2 |
|
981 * @param aFlag ETrue if candidate exist, otherwise EFalse |
|
982 * @return None |
|
983 */ |
|
984 IMPORT_C void SetFlagCandidateExist(TBool aFlag); |
|
985 |
|
986 /** |
|
987 * Judge if next candidate existed |
|
988 * |
|
989 * @since S60 v3.2 |
|
990 * @return ETrue if candidate exist, otherwise EFalse |
|
991 */ |
|
992 TBool NextCandidateExist(); |
|
993 |
|
994 /** |
|
995 * Auto change active list |
|
996 * |
|
997 * @since S60 v3.2 |
|
998 * @param aLastIndex The last visible candidate index |
|
999 * @return None. |
|
1000 */ |
|
1001 void AutoChangeActiveList( TInt aLastIndex = 0 ); |
|
1002 |
|
1003 /** |
|
1004 * Set dropdown list image ID |
|
1005 * |
|
1006 * @since S60 v3.2 |
|
1007 * @param TDropdownListDrawInfo image information |
|
1008 * @return None. |
|
1009 */ |
|
1010 IMPORT_C void SetDropdownListImgID(TDropdownListDrawInfo aDropdownListDrawInfo); |
|
1011 |
|
1012 /** |
|
1013 * Show preview bubble |
|
1014 * |
|
1015 * @since S60 v3.2 |
|
1016 * @param aFlag Show/Hide flag |
|
1017 * @return None. |
|
1018 */ |
|
1019 IMPORT_C void ShowBubble(TBool aFlag); |
|
1020 |
|
1021 /** |
|
1022 * Set bubble bitmap param |
|
1023 * |
|
1024 * @since S60 v3.2 |
|
1025 * @param aBmpId |
|
1026 * @param aMaskBmpId |
|
1027 * @param aBgSkinId |
|
1028 * @return None. |
|
1029 */ |
|
1030 IMPORT_C void SetBubbleBitmapParam(CFbsBitmap* aBmpId, |
|
1031 CFbsBitmap* aMaskBmpId , |
|
1032 TAknsItemID aBgSkinId ); |
|
1033 |
|
1034 /** |
|
1035 * Set bubble text font |
|
1036 * |
|
1037 * @since S60 v3.2 |
|
1038 * @param aFont Text font |
|
1039 * @return None. |
|
1040 */ |
|
1041 IMPORT_C void SetBubbleTextFont(const CFont* aFont); |
|
1042 |
|
1043 /** |
|
1044 * Set bubble text format |
|
1045 * |
|
1046 * @since S60 v3.2 |
|
1047 * @param aTextFormat Text format |
|
1048 * @return None. |
|
1049 */ |
|
1050 IMPORT_C void SetTextFormat(TAknTextLineLayout aTextFormat); |
|
1051 |
|
1052 /** |
|
1053 * Set bubble text format |
|
1054 * |
|
1055 * @since S60 v3.2 |
|
1056 * @param aLeftDiff |
|
1057 * @param aTopDiff |
|
1058 * @param aRightDiff |
|
1059 * @param aBottomDiff |
|
1060 * @return None. |
|
1061 */ |
|
1062 IMPORT_C void SetFrameDiff(TInt aLeftDiff, TInt aTopDiff, |
|
1063 TInt aRightDiff,TInt aBottomDiff); |
|
1064 |
|
1065 /** |
|
1066 * Set bubble size |
|
1067 * |
|
1068 * @since S60 v3.2 |
|
1069 * @param aSize |
|
1070 * @return None. |
|
1071 */ |
|
1072 IMPORT_C void SetBubbleSize(const TSize& aSize); |
|
1073 |
|
1074 /** |
|
1075 * show preview bubble |
|
1076 * |
|
1077 * @since S60 v3.2 |
|
1078 * @param aRect |
|
1079 * @param aText |
|
1080 * @return None. |
|
1081 */ |
|
1082 void DrawBubble(const TRect aRect, const TDesC& aText); |
|
1083 |
|
1084 /** |
|
1085 * Hide preview bubble |
|
1086 * |
|
1087 * @since S60 v3.2 |
|
1088 * @return None. |
|
1089 */ |
|
1090 void ClearBubble(); |
|
1091 |
|
1092 /** |
|
1093 * ReDraw preview bubble |
|
1094 * |
|
1095 * @since S60 v3.2 |
|
1096 * @return None. |
|
1097 */ |
|
1098 void ReDrawBubble(); |
|
1099 |
|
1100 CFepUiLayout* UiLayout(); |
|
1101 |
|
1102 /** |
|
1103 * Redraw dropdown list |
|
1104 * |
|
1105 * @since S60 v3.2 |
|
1106 * @param aRect Redraw rect. |
|
1107 * @return None. |
|
1108 */ |
|
1109 IMPORT_C void ReDrawRect(const TRect& aRect); |
|
1110 protected: |
|
1111 |
|
1112 /** |
|
1113 * Constructor |
|
1114 * |
|
1115 * @since S60 v3.2 |
|
1116 * @param aTopLeftPoint The top left point of the drop down list |
|
1117 * @param aUiLayout The layout plugin |
|
1118 * @param aControlId This control ID |
|
1119 * @param aReader The reader from which the bitmaps ID can be read |
|
1120 * @param aCellWidth The width of one basic cell |
|
1121 * @param aCellHeight The height of one basic cell |
|
1122 * @param aNaviWidth The width of navidation |
|
1123 * @param aColNum The number of columns in one row |
|
1124 * @param aRowNum The number of rows |
|
1125 * @param aFont The font used to draw the text |
|
1126 * @param aHandler The handle which will deal with outer event to this control |
|
1127 * @param aAlignment The alignment used to draw text |
|
1128 * @param aTextMargin if alignment is not ECenter, the margin is used |
|
1129 * @param aBorderColor The color of border |
|
1130 * @param aBgColor The color of background |
|
1131 * @param aNavigationBgColor The background color of navigation area |
|
1132 * @param aTextColor The color of text |
|
1133 * @param aSpecialTextColor The color of special text |
|
1134 * @param aHighLightTextColor The color of highlight text |
|
1135 * @param aHighLightBgColor The background color of high light |
|
1136 * @param aButtonDownBgColor The background color when button pressing |
|
1137 */ |
|
1138 CFepCtrlDropdownList(const TPoint& aTopLeftPoint, |
|
1139 CFepUiLayout* aUiLayout, |
|
1140 TInt aControlId, |
|
1141 const TInt aCellWidth, |
|
1142 const TInt aCellHeight, |
|
1143 const TInt aNaviWidth, |
|
1144 const TInt aColNum, |
|
1145 const TInt aRowNum, |
|
1146 const CFont* aFont, |
|
1147 MListEventHandler* aHandler, |
|
1148 const CGraphicsContext::TTextAlign aAlignment, |
|
1149 const TInt aTextMargin, |
|
1150 const TRgb aBorderColor, |
|
1151 const TRgb aBgColor, |
|
1152 const TRgb aNavigationBgColor, |
|
1153 const TRgb aTextColor, |
|
1154 const TRgb aSpecialTextColor, |
|
1155 const TRgb aHighLightTextColor, |
|
1156 const TRgb aHighLighttBgColor, |
|
1157 const TRgb aButtonDownBgColor); |
|
1158 |
|
1159 CFepCtrlDropdownList(CFepUiLayout* aUiLayout, |
|
1160 TInt aControlId, |
|
1161 TPoint aTopLeftPoint, |
|
1162 TSize aCellSize, |
|
1163 TInt aColNum, |
|
1164 TInt aRowNum); |
|
1165 |
|
1166 CFepCtrlDropdownList(CFepUiLayout* aUiLayout, |
|
1167 TInt aControlId, |
|
1168 TInt aResId, |
|
1169 TPoint aTopLeftPoint, |
|
1170 const CFont* aFont, |
|
1171 TSize aCellSize, |
|
1172 TInt aNaviWidth, |
|
1173 TInt aColNum, |
|
1174 TInt aRowNum, |
|
1175 TInt aSpinBtnHeight, |
|
1176 TInt aHorizontalCellMargin, |
|
1177 TInt aVerticalCellMargin, |
|
1178 THDirection aDirection, |
|
1179 TBool aPageShown); |
|
1180 |
|
1181 |
|
1182 |
|
1183 /** |
|
1184 * 2nd construct function |
|
1185 * @since Series 60 3.1 |
|
1186 * @param aTopLeftPoint The top left point |
|
1187 * @param aReader The reader from which the bitmaps ID can be read |
|
1188 * @return None |
|
1189 */ |
|
1190 void ConstructL(const TPoint& aTopLeftPoint, TResourceReader& aReader); |
|
1191 |
|
1192 void ConstructL(TPoint aTopLeftPoint, TInt aResId); |
|
1193 |
|
1194 private: |
|
1195 |
|
1196 /** |
|
1197 * The list manager |
|
1198 * Not own |
|
1199 */ |
|
1200 CListManager* iListManager; |
|
1201 |
|
1202 /** |
|
1203 * The bitmap database |
|
1204 * Own |
|
1205 */ |
|
1206 CBitmapDb* iBitmapDb; |
|
1207 |
|
1208 /** |
|
1209 * The pages manager |
|
1210 * Own |
|
1211 */ |
|
1212 CPages* iPages; |
|
1213 |
|
1214 /** |
|
1215 * The candidate list |
|
1216 * Own |
|
1217 */ |
|
1218 RPointerArray<CCandidate> iCandidatelist; |
|
1219 |
|
1220 /** |
|
1221 * The candidate color list |
|
1222 * Own |
|
1223 */ |
|
1224 RArray<TInt> iSecondaryList; |
|
1225 |
|
1226 /** |
|
1227 * The high light list |
|
1228 * Own |
|
1229 */ |
|
1230 RArray<TInt> iHighlightList; |
|
1231 |
|
1232 /** |
|
1233 * The flag of multi color enable or disable |
|
1234 */ |
|
1235 TBool iEnableSecondary; |
|
1236 |
|
1237 /** |
|
1238 * The first candidate index in the list |
|
1239 */ |
|
1240 TInt iFirstCandidateIndex; |
|
1241 |
|
1242 /** |
|
1243 * The last candidate index in the list |
|
1244 */ |
|
1245 TInt iLastCandidateIndex; |
|
1246 |
|
1247 /** |
|
1248 * The font used to draw the text |
|
1249 * Own |
|
1250 */ |
|
1251 const CFont* iFont; |
|
1252 |
|
1253 const CFont* iBubbleFont; |
|
1254 |
|
1255 /** |
|
1256 * Cell width |
|
1257 */ |
|
1258 TInt iCellWidth; |
|
1259 |
|
1260 /** |
|
1261 * Cell height |
|
1262 */ |
|
1263 TInt iCellHeight; |
|
1264 |
|
1265 /** |
|
1266 * navigation width |
|
1267 */ |
|
1268 TInt iNaviWidth; |
|
1269 |
|
1270 TInt iSpinBtnHeight; |
|
1271 TInt iCellHorizontalMargin; |
|
1272 TInt iCellVerticalMargin; |
|
1273 TInt iOriginalCandIdx; |
|
1274 TInt iOriginalFirstCandIdx; |
|
1275 TBool iUpdateListReDraw; |
|
1276 |
|
1277 /** |
|
1278 * alignment used to draw the text |
|
1279 */ |
|
1280 CGraphicsContext::TTextAlign iAlignment; |
|
1281 |
|
1282 /** |
|
1283 * the margin used to draw the text if alignment is not ECenter |
|
1284 */ |
|
1285 TInt iTextMargin; |
|
1286 |
|
1287 /** |
|
1288 * The columns number |
|
1289 */ |
|
1290 TInt iColNum; |
|
1291 |
|
1292 /** |
|
1293 * The rows number |
|
1294 */ |
|
1295 TInt iRowNum; |
|
1296 |
|
1297 /** |
|
1298 * The border color |
|
1299 */ |
|
1300 TRgb iBorderColor; |
|
1301 |
|
1302 /** |
|
1303 * The background color of the whole list |
|
1304 */ |
|
1305 TRgb iBgColor; |
|
1306 |
|
1307 /** |
|
1308 * The navigation background color |
|
1309 */ |
|
1310 TRgb iNavigationBgColor; |
|
1311 |
|
1312 /** |
|
1313 * The text color |
|
1314 */ |
|
1315 TRgb iTextColor; |
|
1316 |
|
1317 /** |
|
1318 * The special text color |
|
1319 */ |
|
1320 TRgb iSpecialTextColor; |
|
1321 |
|
1322 /** |
|
1323 * The highlight text color |
|
1324 */ |
|
1325 TRgb iHighLightTextColor; |
|
1326 |
|
1327 /** |
|
1328 * The background color of highlight area |
|
1329 */ |
|
1330 TRgb iHighLightBgColor; |
|
1331 |
|
1332 /** |
|
1333 * The background color when button down |
|
1334 */ |
|
1335 TRgb iButtonDownBgColor; |
|
1336 |
|
1337 /** |
|
1338 * The top left point the list |
|
1339 */ |
|
1340 TPoint iTopLeftPoint; |
|
1341 |
|
1342 /** |
|
1343 * The fixed text |
|
1344 */ |
|
1345 TBuf<KMaxFixedTextNumber> iFixedText; |
|
1346 |
|
1347 /** |
|
1348 * The event ID for candidate selected |
|
1349 */ |
|
1350 TInt iEventIdForCandidateSelected; |
|
1351 |
|
1352 /** |
|
1353 * The event ID for next page candidate |
|
1354 */ |
|
1355 TInt iEventIdForNextPageCandidate; |
|
1356 |
|
1357 /** |
|
1358 * The event ID for previous page candidate |
|
1359 */ |
|
1360 TInt iEventIdForPreviousPageCandidate; |
|
1361 |
|
1362 /** |
|
1363 * The event ID for judge if candidate existed |
|
1364 */ |
|
1365 TInt iEventIdForCandidateExisted; |
|
1366 |
|
1367 /** |
|
1368 * The event handler when out event coming |
|
1369 * Not own |
|
1370 */ |
|
1371 MListEventHandler* iListEventHandler; |
|
1372 |
|
1373 /** |
|
1374 * The first time construct flag of drop down list |
|
1375 */ |
|
1376 TBool iFirstTimeConstruct; |
|
1377 |
|
1378 /** |
|
1379 * The flag to indicate that candidate existed or not at given position |
|
1380 */ |
|
1381 TBool iCandidateExisted; |
|
1382 |
|
1383 /** |
|
1384 * The type of drop down list. |
|
1385 */ |
|
1386 TListType iListType; |
|
1387 |
|
1388 TCandTruncateType iCandTruncateType; |
|
1389 |
|
1390 TInt iFuzzyBoundry; |
|
1391 |
|
1392 TExpandType iCandExpandType; |
|
1393 |
|
1394 THDirection iCandHDirection; |
|
1395 |
|
1396 TBool iPageCtrlShown; |
|
1397 |
|
1398 CBubbleCtrl* iBubbleCtrl; |
|
1399 |
|
1400 TBool iIsShowBubble; |
|
1401 |
|
1402 TSize iBubbleSize; |
|
1403 |
|
1404 TInt iBubbleVerticalMargin; |
|
1405 }; |
|
1406 |
|
1407 #endif // C_CFEPCTRLDROPDOWNLIST_H |
|
1408 |
|
1409 inline void CFepCtrlDropdownList::SetHDirection(const THDirection aDirection) |
|
1410 { |
|
1411 iCandHDirection = aDirection; |
|
1412 } |
|
1413 |
|
1414 inline void CFepCtrlDropdownList::SetPageCtrlShown(TBool aShown) |
|
1415 { |
|
1416 iPageCtrlShown = aShown; |
|
1417 } |
|
1418 // End Of File |
|