2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
18 #ifndef __AKNLISTS_H__
19 #define __AKNLISTS_H__
30 class TAknTextLineLayout;
31 class MAknsSkinInstance;
32 class MAknsControlContext;
34 /** THIS FILE INCLUDES:
35 * 1) All listbox layouts specified in Avkon LAF specification
36 * a) General list pane descendants
37 * b) Pop up window list pane descendants
39 * 2) Utilities that help building listbox layouts based on LAF specification
40 * 3) Other helper classes that handle listbox behavior
46 // Helper template definitions.
47 // (these are before concrete listbox classes because they're needed for inheritance)
52 * This adds correct horizontal and vertival lines to the listbox and handles empty listbox!
54 * This class is only useful if you're writing your own list layout.
55 * Please use the predefined layouts instead, for example CAknSingleStyleListBox.
58 class AknListBoxLinesTemplate : public T
61 /** AknListBoxLinesTemplate
63 * Read AVKON_LISTBOX_LINES resources.
65 * The following predefined lines are available:
66 * R_LIST_PANE_LINES_A_COLUMN
67 * R_LIST_PANE_LINES_AB_COLUMN
68 * R_LIST_PANE_LINES_AB_COLUMN_X
69 * R_LIST_PANE_LINES_AB_COLUMN_XX
70 * R_LIST_PANE_LINES_BC_COLUMN
71 * R_LIST_PANE_LINES_BC_COLUMN_X
72 * R_LIST_PANE_LINES_BC_COLUMN_XX
75 IMPORT_C AknListBoxLinesTemplate(TInt aResourceId);
78 * Determines position of the lines
80 IMPORT_C void SizeChanged();
85 IMPORT_C void Draw(const TRect& aRect) const;
86 /** CountComponentControls()
88 * Choose controls to use as child controls
90 IMPORT_C TInt CountComponentControls() const;
91 /** CountComponentControls()
93 * Choose controls to use as child controls
95 IMPORT_C CCoeControl* ComponentControl(TInt aIndex) const;
98 TInt iSpare0; // was iResourceId;
99 TAknLayoutRect iVertLine1, iVertLine2; // not used
100 TAknLayoutRect iHoriLine; // not used
106 * Empty layout for popup lists
110 class AknPopupListEmpty : public T
113 * Draws empty list when needed. See AknDraw::DrawEmptyList().
115 IMPORT_C virtual void Draw(const TRect &aRect) const;
120 * Avkon version of eikon's column listbox.
121 * Content for list items are tab-separated strings.
124 * CEikListBox::ConstructFromResourceL()
125 * CEikListBox::ConstructL()
126 * CEikTextListBox::SetItemArray()
127 * CEikColumnListBoxData::SetIconArray()
129 * Related flags for ConstructL() (avkon.hrh)
130 * EAknListBoxSelectionList
131 * EAknListBoxMenuList
132 * EAknListBoxMarkableList
133 * EAknListBoxMultiselectionList
134 * EAknListBoxViewerFlags
136 * Related flags for dialogs (avkon.hrh)
137 * EAknDialogSelectionList
139 * EAknDialogMultiselectionList
141 * @since Series 60 0.9
144 class CAknColumnListBox : public CEikColumnListBox
148 * Creates new @c CAknColumnListBoxView object and returns pointer to it.
149 * @return Pointer to the list box view which displays the list items which
150 * are currently visible in a list box.
152 IMPORT_C virtual CListBoxView* MakeViewClassInstanceL();
155 * Creates @c CAknFilteredTextListBoxModel object.
157 IMPORT_C virtual void CreateModelL();
160 * Listbox rectangle calculation. Rounds down the height of the rectangle
161 * (if necessary) so that only a whole number of items can be displayed
162 * inside the list box.
163 * @param aRect The size of the listbox.
164 * @return The number of pixels reduced.
166 IMPORT_C virtual TInt AdjustRectHeightToWholeNumberOfItems(TRect& aRect) const;
170 * Handles pointer events
172 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
177 IMPORT_C void* ExtensionInterface( TUid aInterface );
178 private: // listbox use only
179 IMPORT_C virtual void CEikListBox_Reserved();
184 // These define what features are needed --> you can remove shortcuts from ALL lists by changing these..
185 // Templates available: AknListBoxLinesTemplate<> AknListBoxShortCutTemplate<>
186 typedef AknListBoxLinesTemplate<CAknColumnListBox > CEikColumnListBoxTypedef;
187 typedef AknListBoxLinesTemplate<CEikFormattedCellListBox > CEikFormattedCellListBoxTypedef;
188 typedef AknListBoxLinesTemplate<CEikSettingsListBox > CEikSettingsListBoxTypedef;
189 typedef CAknGrid CAknSelectionGridTypedef;
191 // Templates available: AknListBoxShortCutTemplate<> AknListBoxLinesTemplate<>
192 #define AKNCOLUMNLISTBOXNAME(x) AknListBoxLinesTemplate<CAknColumnListBox >(x)
193 #define AKNDOUBLELISTBOXNAME(x) AknListBoxLinesTemplate<CEikFormattedCellListBox >(x)
194 #define AKNSETTINGLISTBOXNAME(x) AknListBoxLinesTemplate<CEikSettingsListBox >(x)
196 // Templates available: AknListBoxLinesTemplate<>, AknListBoxShortCutTemplate<>
197 #define AKNCOLUMNLISTBOX AknListBoxLinesTemplate<CAknColumnListBox >
198 #define AKNFORMATTEDLISTBOX AknListBoxLinesTemplate<CEikFormattedCellListBox >
199 #define AKNSETTINGSLISTBOX AknListBoxLinesTemplate<CEikSettingsListBox >
200 #define AKNGRID CAknGrid
210 // Derived listboxes (Use these in applications!)
211 // These are only for full screen lists -- the Rect() of the list must be ClientRect()
219 * list item string format: "\tTextLabel\t0\t1"
220 * where 0 and 1 are indexes to icon array
223 class CAknSingleStyleListBox : public CEikColumnListBoxTypedef
226 IMPORT_C CAknSingleStyleListBox();
229 * Determines layout of the listbox
231 IMPORT_C void SizeChanged();
234 * Determines size of the listbox for use in dialogs.
236 IMPORT_C TSize MinimumSize();
239 * Handles pointer events
241 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
247 * list_single_number_pane
249 * list item string format: "2\tTextLabel\t0\t1"
250 * where 0 and 1 are indexes to icon array
253 class CAknSingleNumberStyleListBox : public CEikColumnListBoxTypedef
256 IMPORT_C CAknSingleNumberStyleListBox();
259 * Determines layout of the listbox
261 IMPORT_C void SizeChanged();
264 * Determines size of the listbox for use in dialogs.
266 IMPORT_C TSize MinimumSize();
269 * Handles pointer events
271 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
277 * list_single_heading_pane
279 * list item string format: "Heading\tTextLabel\t0\t1"
280 * where 0 and 1 are indexes to icon array
284 class CAknSingleHeadingStyleListBox : public CEikColumnListBoxTypedef
287 IMPORT_C CAknSingleHeadingStyleListBox();
290 * Determines layout of the listbox
292 IMPORT_C void SizeChanged();
295 * Determines size of the listbox for use in dialogs.
297 IMPORT_C TSize MinimumSize();
300 * Handles pointer events
302 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
305 /** CreateItemDrawerL()
307 * Chooses which itemdrawer to use.
309 IMPORT_C virtual void CreateItemDrawerL();
311 /** MakeViewClassInstanceL()
313 * Chooses which listbox view class to use
315 IMPORT_C virtual CListBoxView* MakeViewClassInstanceL();
322 * list_single_graphic_pane
324 * list item string format: "0\tTextLabel\t1\t2"
325 * where 0,1,2 are index to the icon array
328 class CAknSingleGraphicStyleListBox : public CEikColumnListBoxTypedef
331 IMPORT_C CAknSingleGraphicStyleListBox();
334 * Determines layout of the listbox
336 IMPORT_C void SizeChanged();
339 * Determines size of the listbox for use in dialogs.
341 IMPORT_C TSize MinimumSize();
344 * Handles pointer events
346 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
352 * list_single_Graphic_heading_pane
354 * list item string format: "0\tHeading\tTextLabel\t1\t2"
355 * where 0,1,2 are index to the icon array
358 class CAknSingleGraphicHeadingStyleListBox : public CEikColumnListBoxTypedef
361 IMPORT_C CAknSingleGraphicHeadingStyleListBox();
364 * Determines layout of the listbox
366 IMPORT_C void SizeChanged();
369 * Determines size of the listbox for use in dialogs.
371 IMPORT_C TSize MinimumSize();
374 * Handles pointer events
376 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
378 IMPORT_C virtual void CreateItemDrawerL();
379 /** MakeViewClassInstanceL()
381 * Chooses which listbox view class to use
383 IMPORT_C virtual CListBoxView* MakeViewClassInstanceL();
389 * list_single_number_heading_pane
391 * list item string format: "1\tHeading\tTextLabel\t2\t3"
392 * where 2 and 3 are indexes to icon array
395 class CAknSingleNumberHeadingStyleListBox : public CEikColumnListBoxTypedef
398 IMPORT_C CAknSingleNumberHeadingStyleListBox();
401 * Determines layout of the listbox
403 IMPORT_C void SizeChanged();
406 * Determines size of the listbox for use in dialogs.
408 IMPORT_C TSize MinimumSize();
411 * Handles pointer events
413 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
415 IMPORT_C virtual void CreateItemDrawerL();
416 /** MakeViewClassInstanceL()
418 * Chooses which listbox view class to use
420 IMPORT_C virtual CListBoxView* MakeViewClassInstanceL();
426 * list_single_large_pane
428 * list item string format: "1\tTextLabel\t0\t0"
429 * where 0 is an index to icon array
432 class CAknSingleLargeStyleListBox : public CEikColumnListBoxTypedef
435 IMPORT_C CAknSingleLargeStyleListBox();
438 * Determines layout of the listbox
440 IMPORT_C void SizeChanged();
443 * Determines size of the listbox for use in dialogs.
445 IMPORT_C TSize MinimumSize();
448 * Handles pointer events
450 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
456 * list_double_pane and list_big_single_pane
458 * list item string format: " \tFirstLabel\tSecondLabel\t0\t0"
459 * where 0 is an index to icon array
462 class CAknDoubleStyleListBox : public CEikFormattedCellListBoxTypedef
465 IMPORT_C CAknDoubleStyleListBox();
468 * Determines layout of the listbox
470 IMPORT_C void SizeChanged();
473 * Determines size of the listbox for use in dialogs.
475 IMPORT_C TSize MinimumSize();
478 * Handles pointer events
480 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
488 * list item string format: " \tFirstLongLabel\t\t0"
489 * where 0 is an index to icon array
492 class CAknDoubleStyle2ListBox : public CAknDoubleStyleListBox
497 * Determines layout of the listbox
499 IMPORT_C void SizeChanged();
500 /** CreateItemDrawerL()
502 * Chooses which itemdrawer to use.
504 IMPORT_C void CreateItemDrawerL();
507 * Handles pointer events
509 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
515 * list_double_number_pane and list_big_single_number_pane
517 * list item string format: "1\tFirstLabel\t\t0\t0"
518 * list item string format: "1\tFirstLabel\tSecondLabel\t0\t0"
519 * where 0 is an index to icon array
523 class CAknDoubleNumberStyleListBox : public CEikFormattedCellListBoxTypedef
526 IMPORT_C CAknDoubleNumberStyleListBox();
529 * Determines layout of the listbox
531 IMPORT_C void SizeChanged();
534 * Determines size of the listbox for use in dialogs.
536 IMPORT_C TSize MinimumSize();
539 * Handles pointer events
541 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
547 * list_double_time_pane
550 class CAknDoubleTimeStyleListBox : public CEikFormattedCellListBoxTypedef
553 IMPORT_C CAknDoubleTimeStyleListBox();
556 * Determines layout of the listbox
558 IMPORT_C void SizeChanged();
561 * Determines size of the listbox for use in dialogs.
563 IMPORT_C TSize MinimumSize();
566 * Handles pointer events
568 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
574 * list_double_large_pane
576 * list item string format: "1\tFirstLabel\tSecondLabel\t0\t0"
578 * where 0 is an index of small (13x13) icon in icon array
579 * and 1 is an index of a thumbnail image
581 * Good thumbnail image sizes for this list are:
582 * 30x40, 36x44, 40x30, 40x48, 44x36.
585 class CAknDoubleLargeStyleListBox : public CEikFormattedCellListBoxTypedef
588 IMPORT_C CAknDoubleLargeStyleListBox();
591 * Determines layout of the listbox
593 IMPORT_C void SizeChanged();
596 * Determines size of the listbox for use in dialogs.
598 IMPORT_C TSize MinimumSize();
599 /** CreateItemDrawerL()
601 * Chooses which itemdrawer to use.
603 IMPORT_C virtual void CreateItemDrawerL();
606 * Handles pointer events
608 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
615 * list_double_graphic_pane
617 * list item string format: "0\tFirstLabel\tSecondLabel\t0"
618 * where 0 is index to icon array
622 class CAknDoubleGraphicStyleListBox : public CEikFormattedCellListBoxTypedef
625 IMPORT_C CAknDoubleGraphicStyleListBox();
628 * Determines layout of the listbox
630 IMPORT_C void SizeChanged();
633 * Determines size of the listbox for use in dialogs.
635 IMPORT_C TSize MinimumSize();
638 * Handles pointer events
640 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
647 * list_double2_graphic_pane
649 * list item string format: "0\tFirstLabel\tSecondLabel\t0"
650 * where 0 is index to icon array
654 class CAknDouble2GraphicStyleListBox : public CEikFormattedCellListBoxTypedef
657 IMPORT_C CAknDouble2GraphicStyleListBox();
660 * Determines layout of the listbox
662 IMPORT_C void SizeChanged();
665 * Determines size of the listbox for use in dialogs.
667 IMPORT_C TSize MinimumSize();
669 /** CreateItemDrawerL()
671 * Chooses which itemdrawer to use.
673 IMPORT_C void CreateItemDrawerL();
676 * Handles pointer events
678 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
685 * list_double2_large_graphic_pane
687 * list item string format: "1\tFirstLabel\tSecondLabel\t0"
689 * where 0 is an index of small (13x13) icon in icon array
690 * and 1 is an index of a thumbnail image
694 class CAknDouble2LargeStyleListBox : public CEikFormattedCellListBoxTypedef
697 IMPORT_C CAknDouble2LargeStyleListBox();
700 * Determines layout of the listbox
702 IMPORT_C void SizeChanged();
705 * Determines size of the listbox for use in dialogs.
707 IMPORT_C TSize MinimumSize();
708 /** CreateItemDrawerL()
710 * Chooses which itemdrawer to use.
712 IMPORT_C virtual void CreateItemDrawerL();
715 * Handles pointer events
717 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
724 * list_double2_graphic_large_graphic_pane
726 * This is similar but not identical to
727 * java list CAknDouble2GraphicLargeStyleListBox
729 * list item string format: "0\t1\tFirstLabel\tSecondLabel\t2\t3"
731 * where 0 (mandatory), 2 and 3 (optional) are an index of small icon
732 * in icon array and 1 (mandatory) is an index of a thumbnail image
735 * @since Series 60 2.8
738 class CAknDouble2GraphicLargeGraphicStyleListBox : public CEikFormattedCellListBoxTypedef
741 IMPORT_C CAknDouble2GraphicLargeGraphicStyleListBox();
744 * Determines layout of the listbox
746 IMPORT_C void SizeChanged();
749 * Determines size of the listbox for use in dialogs.
751 IMPORT_C TSize MinimumSize();
752 /** CreateItemDrawerL()
754 * Chooses which itemdrawer to use.
756 IMPORT_C virtual void CreateItemDrawerL();
759 * Handles pointer events
761 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
768 * list_double2_graphic_pane
770 * list item string format: "1\tFirstLabel\tSecondLabel\t0"
771 * where 0 is an index to icon array
775 class CAknFormDoubleGraphicStyleListBox : public CAknDoubleGraphicStyleListBox
780 * Determines layout of the listbox
782 IMPORT_C void SizeChanged();
785 * Handles pointer events
787 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
791 typedef CAknFormDoubleGraphicStyleListBox CAknSingleBigHeadingGraphicListBox;
796 * list item string format: " \tFirstLabel\tSecondLabel\t0"
797 * where 0 is an index to icon array
800 class CAknFormDoubleStyleListBox : public CAknDoubleStyleListBox
805 * Determines layout of the listbox
807 IMPORT_C void SizeChanged();
810 * Handles pointer events
812 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
816 typedef CAknFormDoubleStyleListBox CAknSingleBigHeadingListBox;
820 * list_setting_pane and list_big_single_setting_pane
822 * list item string format: "\tFirstLabel\t\tValueText"
823 * list item string format: "\tFirstLabel\t0\t"
824 * list item string format: "\tFirstLabel\t\tValueText\t*"
825 * list item string format: "\tFirstLabel\t\t\t\tSecondLabel"
826 * where 0 is an index to icon array
829 class CAknSettingStyleListBox : public CEikSettingsListBoxTypedef
832 IMPORT_C CAknSettingStyleListBox();
835 * Determines layout of the listbox
837 IMPORT_C void SizeChanged();
840 * Determines size of the listbox for use in dialogs.
842 IMPORT_C TSize MinimumSize();
845 * Handles pointer events
847 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
853 * list_setting_number_pane and list_big_single_setting_number_pane
855 * list item string format: "1\tFirstLabel\t\tValueText"
856 * list item string format: "2\tFirstLabel\t0\t"
857 * list item string format: "3\tFirstLabel\t\tValueText\t*"
858 * list item string format: "4\tFirstLabel\t\t\t\tSecondLabel"
859 * where 0 is an index to icon array
860 * and 1..4 is list item number shown on screen
862 class CAknSettingNumberStyleListBox : public CEikSettingsListBoxTypedef
865 IMPORT_C CAknSettingNumberStyleListBox();
868 * Determines layout of the listbox
870 IMPORT_C void SizeChanged();
873 * Determines size of the listbox for use in dialogs.
875 IMPORT_C TSize MinimumSize();
878 * Handles pointer events
880 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
887 // Use the popup styles with CAknPopupList and CAknListQueryDialog
891 * list_single_popup_menu_pane
893 * list item string format: "FirstLabel\t0"
895 * where 0 is an index to icon array
898 class CAknSinglePopupMenuStyleListBox : public AknPopupListEmpty<CEikFormattedCellListBox>
903 * Determines layout of the listbox
905 IMPORT_C void SizeChanged();
908 * Determines size of the listbox for use in dialogs.
910 IMPORT_C TSize MinimumSize();
912 /** CreateItemDrawerL()
914 * Chooses which itemdrawer to use.
916 IMPORT_C virtual void CreateItemDrawerL();
919 * Handles pointer events
921 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
927 * list_single_graphic_popup_menu_pane
929 * list item string format: "0\tLabel"
931 * where 0 is an index to icon array
934 class CAknSingleGraphicPopupMenuStyleListBox : public AknPopupListEmpty<CEikFormattedCellListBox>
939 * Determines layout of the listbox
941 IMPORT_C void SizeChanged();
944 * Determines size of the listbox for use in dialogs.
946 IMPORT_C TSize MinimumSize();
948 /** CreateItemDrawerL()
950 * Chooses which itemdrawer to use.
952 IMPORT_C virtual void CreateItemDrawerL();
955 * Handles pointer events
957 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
963 * list_single_graphic_bt_popup_menu_pane
965 * list item string format: "0\tLabel"
967 * where 0 is an index to icon array
971 class CAknSingleGraphicBtPopupMenuStyleListBox : public CAknSingleGraphicPopupMenuStyleListBox
976 * Determines layout of the listbox
978 IMPORT_C virtual void SizeChanged();
981 * Handles pointer events
983 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
987 * list_single_heading_popup_menu_pane
989 * list item string format: "Heading\tLabel"
993 class CAknSingleHeadingPopupMenuStyleListBox : public AknPopupListEmpty<CEikFormattedCellListBox>
996 IMPORT_C CAknSingleHeadingPopupMenuStyleListBox();
999 * Determines layout of the listbox
1001 IMPORT_C void SizeChanged();
1004 * Determines size of the listbox for use in dialogs.
1006 IMPORT_C TSize MinimumSize();
1009 * Handles pointer events
1011 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
1013 /** CreateItemDrawerL()
1015 * Chooses which itemdrawer to use.
1017 IMPORT_C virtual void CreateItemDrawerL();
1019 void SizeChangedL();
1024 * list_single_graphic_heading_popup_menu_pane
1026 * list item string format: "0\tHeading\tLabel"
1028 * where 0 is an index to icon array
1032 class CAknSingleGraphicHeadingPopupMenuStyleListBox : public AknPopupListEmpty<CEikFormattedCellListBox>
1036 IMPORT_C CAknSingleGraphicHeadingPopupMenuStyleListBox();
1039 * Determines layout of the listbox
1041 IMPORT_C void SizeChanged();
1044 * Determines size of the listbox for use in dialogs.
1046 IMPORT_C TSize MinimumSize();
1049 * Handles pointer events
1051 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
1053 /** CreateItemDrawerL()
1055 * Chooses which itemdrawer to use.
1057 IMPORT_C virtual void CreateItemDrawerL();
1059 void SizeChangedL();
1063 * list_double_popup_menu_pane
1065 * list item string format: "FirstLabel\tSecondLabel"
1069 class CAknDoublePopupMenuStyleListBox : public AknPopupListEmpty<CEikFormattedCellListBox>
1074 * Determines layout of the listbox
1076 IMPORT_C void SizeChanged();
1079 * Determines size of the listbox for use in dialogs.
1081 IMPORT_C TSize MinimumSize();
1084 * Handles pointer events
1086 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
1088 /** CreateItemDrawerL()
1090 * Chooses which itemdrawer to use.
1092 IMPORT_C virtual void CreateItemDrawerL();
1094 void SizeChangedL();
1098 * list_single_popup_submenu_pane
1104 class CAknSinglePopupSubmenuStyleListBox : public AknPopupListEmpty<CEikFormattedCellListBox>
1109 * Determines layout of the listbox
1111 IMPORT_C void SizeChanged();
1114 * Determines size of the listbox for use in dialogs.
1116 IMPORT_C TSize MinimumSize();
1119 * Handles pointer events
1121 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
1123 void SizeChangedL();
1128 * list_double_large_graphic_popup_menu_pane
1130 * list item string format: "0\tFirstLabel\tSecondLabel"
1132 * where 0 is an index to icon array
1136 class CAknDoubleLargeGraphicPopupMenuStyleListBox : public AknPopupListEmpty<CEikFormattedCellListBox>
1141 * Determines layout of the listbox
1143 IMPORT_C void SizeChanged();
1146 * Determines size of the listbox for use in dialogs.
1148 IMPORT_C TSize MinimumSize();
1151 * Handles pointer events
1153 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
1155 /** CreateItemDrawerL()
1157 * Chooses which itemdrawer to use.
1159 IMPORT_C virtual void CreateItemDrawerL();
1161 void SizeChangedL();
1166 * list_double2_popup_menu_pane
1168 * list item string format: "FirstLabel\tSecondLabel"
1172 class CAknDouble2PopupMenuStyleListBox : public AknPopupListEmpty<CEikFormattedCellListBox>
1177 * Determines layout of the listbox
1179 IMPORT_C void SizeChanged();
1182 * Determines size of the listbox for use in dialogs.
1184 IMPORT_C TSize MinimumSize();
1187 * Handles pointer events
1189 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
1191 /** CreateItemDrawerL()
1193 * Chooses which itemdrawer to use.
1195 IMPORT_C virtual void CreateItemDrawerL();
1197 void SizeChangedL();
1202 * list_single_2graphic_pane_cp2
1204 * list item string format: "0\t1\tTextLabel\t2\t3"
1206 * where 0,1,2,3 are index to the icon array
1209 class CAknSingle2GraphicPopupMenuStyleListBox : public AknPopupListEmpty<CEikFormattedCellListBox>
1212 IMPORT_C CAknSingle2GraphicPopupMenuStyleListBox();
1215 * Determines layout of the listbox
1217 IMPORT_C void SizeChanged();
1220 * Determines size of the listbox for use in dialogs.
1222 IMPORT_C TSize MinimumSize();
1224 /** CreateItemDrawerL()
1226 * Chooses which itemdrawer to use.
1228 IMPORT_C virtual void CreateItemDrawerL();
1231 * Handles pointer events
1233 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
1235 void SizeChangedL();
1241 * list_double_graphic_pane
1243 * list item string format: "0\tFirstLabel\tSecondLabel\t1\t2"
1244 * where 0 is index to icon array
1247 class CAknDoubleGraphicPopupMenuStyleListBox : public AknPopupListEmpty<CEikFormattedCellListBox>
1250 IMPORT_C CAknDoubleGraphicPopupMenuStyleListBox();
1253 * Determines layout of the listbox
1255 IMPORT_C void SizeChanged();
1258 * Determines size of the listbox for use in dialogs.
1260 IMPORT_C TSize MinimumSize();
1262 /** CreateItemDrawerL()
1264 * Chooses which itemdrawer to use.
1266 IMPORT_C virtual void CreateItemDrawerL();
1269 * Handles pointer events
1271 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
1273 void SizeChangedL();
1276 // --- end of popup styles
1281 * Setting Page component uses this
1283 * list item string format: "1\tShortLabel"
1284 * list item string format: "\t\tLongLabel"
1287 class CAknSetStyleListBox : public AknPopupListEmpty<CEikFormattedCellListBox>
1290 IMPORT_C void ConstructWithWindowL(const CCoeControl *aParent, TInt aFlags);
1293 * Determines layout of the listbox
1295 IMPORT_C void SizeChanged();
1298 * Determines size of the listbox for use in dialogs.
1300 IMPORT_C TSize MinimumSize();
1301 IMPORT_C void Draw(const TRect& aRect) const;
1302 IMPORT_C TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
1306 * Handles pointer events
1308 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
1311 /** CreateItemDrawerL()
1313 * Chooses which itemdrawer to use.
1315 IMPORT_C virtual void CreateItemDrawerL();
1316 /** MakeViewClassInstanceL()
1318 * Chooses which listbox view class to use
1320 IMPORT_C CListBoxView *MakeViewClassInstanceL();
1322 void SizeChangedL();
1325 /** list_form_graphic_pane
1326 * Form popup field should use this
1328 * list item string format: "1\tShortLabel"
1329 * list item string format: "\t\tLongLabel"
1332 class CAknFormGraphicStyleListBox : public AknPopupListEmpty<CEikFormattedCellListBox>
1335 IMPORT_C void ConstructWithWindowL(const CCoeControl *aParent, TInt aFlags);
1338 * Determines layout of the listbox
1340 IMPORT_C void SizeChanged();
1343 * Determines size of the grid for use in dialogs.
1345 IMPORT_C TSize MinimumSize();
1346 /** CreateItemDrawerL()
1348 * Chooses which itemdrawer to use.
1350 IMPORT_C virtual void CreateItemDrawerL();
1351 /** Listbox rectangle calculation.
1353 IMPORT_C virtual TInt AdjustRectHeightToWholeNumberOfItems(TRect &aRect) const;
1356 * Handles pointerevents of popupfield's list
1357 * @param aPointerEvent pointerevent to be handled
1359 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
1361 void SizeChangedL();
1364 class CAknFormGraphicWideStyleListBox : public CAknFormGraphicStyleListBox
1367 IMPORT_C void SizeChanged();
1368 IMPORT_C TSize MinimumSize();
1370 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
1372 void SizeChangedL();
1377 * Application Shell uses this (note that part of layout needs to be done
1378 * inside application -- the listbox will not be in correct position on the
1379 * screen by just using this -- see listapp)
1381 * list item string format: "1\tLabel"
1382 * list item string format: "1\tLabel\t1"
1388 * list item string format: "1"
1389 * list item string format: "1\t1"
1390 * list item string format: "1\t1\t1"
1391 * list item string format: "1\t\t1"
1394 class CAknPinbStyleGrid : public CAknSelectionGridTypedef
1399 * Determines layout of the grid
1401 IMPORT_C void SizeChanged();
1404 * Determines size of the grid for use in dialogs.
1406 IMPORT_C TSize MinimumSize();
1410 * Handles pointer events
1412 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
1415 void SizeChangedL();
1423 class CAknQdialStyleGrid : public CAknSelectionGridTypedef
1428 * Determines layout of the grid
1430 IMPORT_C virtual void SizeChanged();
1433 * Determines size of the grid for use in dialogs.
1435 IMPORT_C TSize MinimumSize();
1439 * Handles pointer events
1441 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
1444 void SizeChangedL();
1448 * grid_cale_month_pane
1451 class CAknCaleMonthStyleGrid : public CAknSelectionGridTypedef
1456 * Determines layout of the listbox
1458 IMPORT_C void SizeChanged();
1461 * Determines size of the grid for use in dialogs.
1463 IMPORT_C TSize MinimumSize();
1466 * Handles pointer events
1468 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
1471 void SizeChangedL();
1478 // Here we have itemdrawer/view modifications needed by the lists
1482 // This class is to keep drawing routines that depend on avkon and which we cannot place to
1483 // eikstd or uikon because of that.
1486 * A view that provides empty lists for use with find pane
1487 * @since Series 60 0.9
1489 class CAknColumnListBoxView : public CColumnListBoxView
1494 * Enables find in empty list. Basically same as @c SetFindEmptyListState()
1495 * when it is set @c ETrue.
1497 IMPORT_C void EnableFindEmptyList();
1500 * Sets find in empty list visible or hides it.
1501 * @param aUsedWithFind Setter to set find visible or to hide it.
1503 IMPORT_C void SetFindEmptyListState(TBool aUsedWithFind);
1506 * Draws empty list with or without find depending if it has been enabled.
1507 * @param aClientRect The client rectangle.
1509 IMPORT_C void DrawEmptyList(const TRect &aClientRect) const;
1512 * Calls @c CColumnListBoxView::CalcBottomItemIndex() and removes filtering
1513 * from find box if new list items are added. Called by listbox control when
1514 * either the size of the listbox or the number of items in its model has
1517 IMPORT_C virtual void CalcBottomItemIndex();
1518 TBool GetFindEmptyListState();
1519 private: // overridden from CListBoxView
1520 IMPORT_C virtual TAny* Reserved_1();
1522 TBool iEmptyListWithFind;
1526 * empty list for settings item editing
1529 class CAknSetStyleListBoxView : public CFormattedCellListBoxView
1532 IMPORT_C void DrawEmptyList(const TRect &aClientRect) const ;
1533 private: // overridden from CListBoxView
1534 IMPORT_C virtual TAny* Reserved_1();
1539 * Horizontal lines and empty list support for views
1542 class CSingleHeadingStyleView : public CAknColumnListBoxView
1545 IMPORT_C void Draw(const TRect* ) const;
1546 IMPORT_C void DrawEmptyList(const TRect& aClientRect) const;
1547 private: // overridden from CListBoxView
1548 IMPORT_C virtual TAny* Reserved_1();
1552 * Horizontal lines support for item drawer.
1554 class CSingleHeadingStyleItemDrawer : public CColumnListBoxItemDrawer
1557 IMPORT_C CSingleHeadingStyleItemDrawer(MTextListBoxModel* aTextListBoxModel, const CFont* aFont, CColumnListBoxData* aColumnData);
1558 IMPORT_C ~CSingleHeadingStyleItemDrawer();
1560 IMPORT_C virtual void DrawItem(TInt aItemIndex, TPoint aItemRectPos, TBool aItemIsSelected, TBool aItemIsCurrent, TBool aViewIsEmphasized, TBool aViewIsDimmed) const;
1563 IMPORT_C void SetTopItemIndex(TInt aTop);
1571 * Thumbnail image positioning for double large styles.
1573 class CDoubleLargeStyleItemDrawer : public CFormattedCellListBoxItemDrawer
1576 IMPORT_C CDoubleLargeStyleItemDrawer(MTextListBoxModel* aTextListBoxModel, const CFont* aFont, CFormattedCellListBoxData* aFormattedCellData, CEikListBox *aListBox);
1577 IMPORT_C void DrawItem(TInt aItemIndex, TPoint aItemRectPos, TBool aItemIsSelected, TBool aItemIsCurrent, TBool aViewIsEmphasized, TBool aViewIsDimmed) const;
1579 IMPORT_C void CFormattedCellListBoxItemDrawer_Reserved();
1581 CEikListBox *iListBox_tmp;
1586 * Word wrapping for double2 styles
1588 class CWordWrappedFormattedCellItemDrawer : public CFormattedCellListBoxItemDrawer
1591 IMPORT_C CWordWrappedFormattedCellItemDrawer(MTextListBoxModel* aTextListBoxModel, const CFont* aFont, CFormattedCellListBoxData* aFormattedCellData, CEikListBox *aListBox, TInt aSubCell, TInt aSubCell2);
1592 IMPORT_C void DrawItem(TInt aItemIndex, TPoint aItemRectPos, TBool aItemIsSelected, TBool aItemIsCurrent, TBool aViewIsEmphasized, TBool aViewIsDimmed) const;
1593 IMPORT_C void DrawItemText(TInt aItemIndex,
1594 const TRect &aItemTextRect,
1595 TBool aItemIsCurrent,
1597 TBool aItemIsSelected) const;
1599 IMPORT_C void CFormattedCellListBoxItemDrawer_Reserved();
1601 TInt iSubCell, iSubCell2;
1606 // here starts section for building new listboxes.
1610 // This is helper class that makes the conversion between European LAF and
1611 // different listbox itemdrawer implementations.
1613 // Notice, this CEikListBox is a good friend with this class.
1617 /** AknListBoxLayouts
1618 * Building listbox layouts from European Avkon LAF.
1620 * The LAF specification has 3 kinds of tables:
1624 * The graphics tables map to SetupColumnGfxCell() and SetupFormGfxCell()
1625 * The text tables map to SetupColumnTextCell() and SetupFormGfxCell()
1626 * The pane coordinates map to SetupListboxPos().
1628 * This class is mostly useless if you don't have LAF specification available!
1630 * You probably want to use predefined layouts; See CAknSingleStyleListBox.
1632 * NOTE: This class is old design. You should consider looking at aknutils.h: AknLayoutUtils
1633 * whenever you want to build things from the LAF specification.
1636 class AknListBoxLayouts
1640 * Setup borders etc.
1642 IMPORT_C static void SetupStandardListBox(CEikListBox& aListBox);
1644 * Setup grid position
1647 static void SetupGridPos(CAknGrid& aGrid,
1648 const TAknWindowLineLayout &aLayout);
1650 * Setup grid position
1652 IMPORT_C static void SetupGridPos(CAknGrid& aGrid,
1660 * Setup list position
1662 IMPORT_C static void SetupListboxPos(CEikListBox& aListBox,
1671 * non-exported new internal version
1673 static void SetupListboxPosL( CEikListBox& aListBox,
1674 const TAknWindowLineLayout& aLayout ); // layout of first item
1677 * Setup text foreground and background colors to default
1679 IMPORT_C static void SetupStandardColumnListbox(CColumnListBoxItemDrawer* aItemDrawer);
1681 * Setup text foreground and background colors to default
1683 IMPORT_C static void SetupStandardFormListbox(CFormattedCellListBoxItemDrawer* aItemDrawer);
1685 * Setup text foreground and background colors to default
1687 IMPORT_C static void SetupStandardGrid(CAknGrid& aGrid);
1690 * Setup a single graphics cell of list item
1692 IMPORT_C static void SetupColumnGfxCell(CEikListBox& aListBox,
1693 CColumnListBoxItemDrawer* aItemDrawer,
1705 * Setup a single text cell of list item
1707 IMPORT_C static void SetupColumnTextCell(CEikListBox& aListBox,
1708 CColumnListBoxItemDrawer* aItemDrawer,
1716 CGraphicsContext::TTextAlign aAlign,
1720 * Setup a single text cell of list item
1722 IMPORT_C static void SetupColumnTextCell(CEikListBox& aListBox,
1723 CColumnListBoxItemDrawer* aItemDrawer,
1725 const TAknTextLineLayout &aLayout,
1727 TInt endx); // use with aknlayoutcompiler
1730 * Setup a single graphics cell of list item
1732 IMPORT_C static void SetupFormGfxCell(CEikListBox& aListBox,
1733 CFormattedCellListBoxItemDrawer* aItemDrawer,
1746 * Setup a single graphics cell of list item
1748 * This version is needed for grid cells. (the FormGfxCell works in
1749 * most cases, but this is needed if you want exact positioning of
1750 * the erased area..)
1752 IMPORT_C static void SetupGridFormGfxCell(CAknGrid& aListBox,
1753 CFormattedCellListBoxItemDrawer* aItemDrawer,
1764 * Setup a single graphics cell of list item
1766 * This version is needed for grid cells. (the FormGfxCell works in
1767 * most cases, but this is needed if you want exact positioning of
1768 * the erased area..)
1772 IMPORT_C static void SetupGridFormGfxCell(CAknGrid& aGrid,
1773 CFormattedCellListBoxItemDrawer* aItemDrawer,
1775 const TAknWindowLineLayout& aLine,
1780 * Setup a single text cell of list item
1782 IMPORT_C static void SetupFormTextCell(CEikListBox& aListBox,
1783 CFormattedCellListBoxItemDrawer* aItemDrawer,
1791 CGraphicsContext::TTextAlign aAlign,
1795 * Setup a single text cell of list item
1797 * This is for removing flicker for settings
1800 IMPORT_C static void SetupFormAntiFlickerTextCell(CEikListBox& aListBox,
1801 CFormattedCellListBoxItemDrawer* aItemDrawer,
1809 CGraphicsContext::TTextAlign aAlign,
1814 * Setup a single text cell of list item
1816 IMPORT_C static void SetupFormTextCell(CEikListBox& aListBox,
1817 CFormattedCellListBoxItemDrawer* aItemDrawer,
1819 const TAknTextLineLayout &aLayout,
1821 const TPoint &p2); // use with layout compiler
1823 * Setup a single text cell of list item
1825 * This is for removing flicker for settings
1827 IMPORT_C static void SetupFormAntiFlickerTextCell(CEikListBox& aListBox,
1828 CFormattedCellListBoxItemDrawer* aItemDrawer,
1830 const TAknTextLineLayout &aLayout,
1832 const TPoint &p2); // use with layout compiler
1835 * Setup a graphic element for a column listbox using aknlayout.dll
1837 IMPORT_C static void SetupColumnGfxCell(CEikListBox& aListBox,
1838 CColumnListBoxItemDrawer* aItemDrawer,
1840 const TAknWindowLineLayout &aLayout,
1845 * Setup a single graphics cell of list item using aknlayout.dll
1847 IMPORT_C static void SetupFormGfxCell(CEikListBox& aListBox,
1848 CFormattedCellListBoxItemDrawer* aItemDrawer,
1850 const TAknWindowLineLayout &aLayout,
1856 * Setup a graphic element for a column listbox using aknlayout.dll
1858 IMPORT_C static void SetupListboxPos(CEikListBox& aListBox,
1859 const TAknWindowLineLayout &aLayout);
1862 * This function returns a correct offset to revise layout data.
1864 * Attention: The function is only effective for QHD lanscape model.
1865 * It always return 0 in QVGA, QVGA2, VGA and VAG3.
1866 * A panic will take place if it is used in other models.
1870 * @param aScreenRect Size of Screen.
1871 * @return Offset of listscroll_menu_pane's layout
1873 static TInt AdjustPopupLayoutData( const TRect& aScreenRect );
1877 * General utilities relating to listboxes
1879 * @since Series 60 0.9
1881 class AknListBoxUtils
1885 * This function is similar to @c HandleItemRemovalL(). This function has
1886 * to call when the items should be removed. If a leave occurs the framework
1887 * generates a Symbian Leave code.
1888 * @param aListBox A pointer to @c CEikListBox object.
1889 * @param aValueOfCurrentItemIndexBeforeRemoval A current item index value
1891 * @param aCurrentItemWasRemoved @c ETrue if removed @c EFalse if not.
1893 IMPORT_C static void HandleItemRemovalAndPositionHighlightL(CEikListBox *aListBox, TInt aValueOfCurrentItemIndexBeforeRemoval, TBool aCurrentItemWasRemoved);
1896 * This function should be called after one or more items have been removed.
1897 * If a leave occurs the framework generates a Symbian Leave code.
1898 * @param aListBox A pointer to @c CEikListBox object.
1899 * @param aValueOfCurrentItemIndexBeforeRemoval A current item index value
1901 * @param aIndexesToRemovedItems A thin templated base class for arrays of
1902 * fixed length objects.
1904 IMPORT_C static void HandleItemRemovalAndPositionHighlightL(CEikListBox *aListBox, TInt aValueOfCurrentItemIndexBeforeRemoval, CArrayFix<TInt> &aIndexesToRemovedItems);
1909 IMPORT_C static TBool ListBoxLinesShown(MAknsSkinInstance *aInstance, MAknsControlContext *aCc);