|
1 /* |
|
2 * Copyright (c) 2006-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: Declares container control for application. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 #ifndef C_SEARCHSETTINGSCONTAINER_H |
|
24 #define C_SEARCHSETTINGSCONTAINER_H |
|
25 |
|
26 // INCLUDES |
|
27 #include <coecntrl.h> |
|
28 #include <aknlists.h> |
|
29 |
|
30 // CONSTANTS |
|
31 |
|
32 // UID of the application |
|
33 const TUid KUidAppMngr = { 0x101F8512 }; |
|
34 |
|
35 // CLASS DECLARATION |
|
36 |
|
37 /** |
|
38 * CSearchSettingsContainer container control class. |
|
39 * @lib SearchSettingsPlugin.lib |
|
40 * |
|
41 */ |
|
42 class CSearchSettingsContainer : public CCoeControl, public MEikListBoxObserver |
|
43 { |
|
44 |
|
45 public: // Constructors and destructor |
|
46 |
|
47 /** |
|
48 * Two-phased constructor. |
|
49 * @param aRect dimension to construct. |
|
50 */ |
|
51 static CSearchSettingsContainer* NewL( const TRect& aRect ); |
|
52 |
|
53 /** |
|
54 * Destructor. |
|
55 */ |
|
56 virtual ~CSearchSettingsContainer(); |
|
57 |
|
58 public: // New functions |
|
59 |
|
60 /** |
|
61 * Return pointer to the listbox |
|
62 * @return Returns the pointer of the CEikTextListBox. |
|
63 */ |
|
64 inline CEikTextListBox* ListBox() const { return iListbox; }; |
|
65 |
|
66 /** |
|
67 * Reset and create the contents of the listbox |
|
68 */ |
|
69 void UpdateListBoxContentL(); |
|
70 |
|
71 public: // Functions from base classes |
|
72 |
|
73 /** |
|
74 * From CCoeControl |
|
75 * @param aKeyEvent The key event. |
|
76 * @param aType The type of key event: EEventKeyUp or EEventKeyDown. |
|
77 * @return TKeyResponse : Indicates whether or not the key event |
|
78 * was used by this control. |
|
79 */ |
|
80 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType); |
|
81 |
|
82 /** |
|
83 * Handles the commands given with keys |
|
84 * @param aListbox is the listbox concerned. |
|
85 * @param aEventType is the corrent event that took place. |
|
86 */ |
|
87 void HandleListBoxEventL( CEikListBox* aListBox, |
|
88 TListBoxEvent aEventType ); |
|
89 /** |
|
90 * Handles the selection of the items in listbox. |
|
91 */ |
|
92 void HandleListBoxSelectionL(); |
|
93 |
|
94 private: |
|
95 |
|
96 /** |
|
97 * C++ constructor. |
|
98 */ |
|
99 CSearchSettingsContainer(); |
|
100 |
|
101 /** |
|
102 * Two-phased constructor. |
|
103 * @param aRect Frame rectangle for container. |
|
104 */ |
|
105 void ConstructL(const TRect& aRect); |
|
106 |
|
107 /** |
|
108 * Loads lock icon |
|
109 */ |
|
110 void LoadIconsL(); |
|
111 |
|
112 private: // Functions from base classes |
|
113 |
|
114 /** |
|
115 * get called when size of the container is changed. |
|
116 */ |
|
117 void SizeChanged(); |
|
118 |
|
119 /** |
|
120 * get called when the focus is changed |
|
121 * @param aDrawNow value passed to it by SetFocus(). |
|
122 */ |
|
123 void FocusChanged(TDrawNow aDrawNow); |
|
124 |
|
125 /** |
|
126 * returns the number of the CountComponentControls. |
|
127 * @return Number of the controls. |
|
128 */ |
|
129 TInt CountComponentControls() const; |
|
130 |
|
131 /** |
|
132 * returns the ComponentControl. |
|
133 * @param aIndex index the listbox. |
|
134 * @return Returns the listbox at the specified index. |
|
135 */ |
|
136 CCoeControl* ComponentControl(TInt aIndex) const; |
|
137 |
|
138 /** |
|
139 * Get the help context for this control. |
|
140 * @param aContext The control's help context |
|
141 */ |
|
142 void GetHelpContext(TCoeHelpContext& aContext) const; |
|
143 |
|
144 /** |
|
145 * Handles a change to the control's resources |
|
146 * @param aType : A message UID value. |
|
147 */ |
|
148 void HandleResourceChange(TInt aType); |
|
149 |
|
150 private: //data |
|
151 |
|
152 /** |
|
153 * Array items |
|
154 */ |
|
155 CDesCArray* iItems; |
|
156 |
|
157 /** |
|
158 * Array for OCSP values |
|
159 */ |
|
160 CDesCArray* iOcspCheckValueArray; |
|
161 CDesCArray* iAllowUntrustedValueArray; |
|
162 |
|
163 /** |
|
164 * Listbox |
|
165 */ |
|
166 CAknSettingStyleListBox* iListbox; |
|
167 |
|
168 /** |
|
169 * Array of the controls. |
|
170 */ |
|
171 CDesCArrayFlat iArray; |
|
172 |
|
173 }; |
|
174 |
|
175 #endif // C_SEARCHSETTINGSCONTAINER_H |
|
176 |
|
177 // End of File |