1 /* |
|
2 * Copyright (c) 2007 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: Definition of the class CPbkxRclBaseDlg. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPBKXRCLBASEDLG_H |
|
20 #define CPBKXRCLBASEDLG_H |
|
21 |
|
22 #include <aknselectionlist.h> |
|
23 #include <AknsItemID.h> |
|
24 #include <AknsSkinInstance.h> |
|
25 |
|
26 class CAknsListBoxBackgroundControlContext; |
|
27 |
|
28 /** |
|
29 * Base class for CAknSelectionListDialog based views. |
|
30 */ |
|
31 class CPbkxRclBaseDlg : public CAknSelectionListDialog |
|
32 { |
|
33 public: // destructors |
|
34 |
|
35 virtual ~CPbkxRclBaseDlg(); |
|
36 |
|
37 protected: // methods from base classes |
|
38 |
|
39 /** |
|
40 * Handles resource change. |
|
41 * |
|
42 * @param aType Type of the change. |
|
43 */ |
|
44 virtual void HandleResourceChange( TInt aType ); |
|
45 |
|
46 /** |
|
47 * Checks if listbox type is acceptable. |
|
48 * |
|
49 * @param aControlType Type of the listbox. |
|
50 * @param aIsFormattedCellList ETrue if listbox is formatted cell listbox. |
|
51 * @return ETrue if listbox is acceptable type. |
|
52 */ |
|
53 virtual TBool IsAcceptableListBoxType( |
|
54 TInt aControlType, |
|
55 TBool &aIsFormattedCellList ) const; |
|
56 |
|
57 /** |
|
58 * Creates custom control of given type. |
|
59 * |
|
60 * @param aControlType Type of the control. |
|
61 * @return Information about created control. |
|
62 */ |
|
63 virtual SEikControlInfo CreateCustomControlL( TInt aControlType ); |
|
64 |
|
65 protected: // constructors |
|
66 |
|
67 /** |
|
68 * Constructor. |
|
69 * |
|
70 * @param aIndex Index which user selected from the list (probably not used?) |
|
71 * @param aArray Array of items. |
|
72 * @param aCommand Command observer for observing menu commands. |
|
73 * @param aColumnListBox ETrue if listbox type is column. |
|
74 */ |
|
75 CPbkxRclBaseDlg( |
|
76 TInt& aIndex, |
|
77 CDesCArray* aArray, |
|
78 MEikCommandObserver* aCommand, |
|
79 TBool aColumnListBox ); |
|
80 |
|
81 /** |
|
82 * Second-phase constructor. |
|
83 * |
|
84 * @param aResourceId Resource identifier. |
|
85 */ |
|
86 void ConstructL( TInt aResourceId ); |
|
87 |
|
88 protected: // new methods |
|
89 |
|
90 /** |
|
91 * Updates graphics used in the component. |
|
92 */ |
|
93 void UpdateGraphics(); |
|
94 |
|
95 /** |
|
96 * Updates colors used in the component. |
|
97 */ |
|
98 void UpdateColors(); |
|
99 |
|
100 private: // data |
|
101 |
|
102 // Skin ids. |
|
103 TAknsItemID iListItemId; |
|
104 TAknsItemID iListBottomId; |
|
105 TAknsItemID iHighlightId; |
|
106 TAknsItemID iHighlightCenterId; |
|
107 TAknsItemID iHighlightTextColorId; |
|
108 TAknsItemID iTextColorId; |
|
109 |
|
110 TBool iColumnListBox; |
|
111 }; |
|
112 |
|
113 #endif |
|
114 |
|