1 /* |
|
2 * Copyright (c) 2005-2006 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: header file of choice list window |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef C_FEPLAYOUTINPUTMODELCHOICE_H |
|
19 #define C_FEPLAYOUTINPUTMODELCHOICE_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <w32std.h> |
|
23 #include <e32base.h> |
|
24 #include <peninputcommonchoicelist.h> |
|
25 #include <AknFepGlobalEnums.h> |
|
26 |
|
27 /** class forward decalaration */ |
|
28 class CFepUiLayout; |
|
29 class CRepository; |
|
30 |
|
31 //CONSTANT |
|
32 const TInt KTouchInputModeCount = 4; |
|
33 |
|
34 /** |
|
35 * CPeninputLayoutInputmodelChoice class |
|
36 * |
|
37 * This class for touch input mode switch |
|
38 * |
|
39 * @lib peninputmodeswitchutils |
|
40 * @since S60 v5.0 |
|
41 */ |
|
42 class CPeninputLayoutInputmodelChoice : public CPeninputCommonChoiceList |
|
43 { |
|
44 |
|
45 public: |
|
46 |
|
47 /** |
|
48 * Symbian Constructor |
|
49 * |
|
50 * @since S60 v5.0 |
|
51 * @param aUiLayout Pointer to uilayout |
|
52 * @param aControlId Choice list id |
|
53 * @param aInputMode Pen input mode |
|
54 * @return Pointer to created CPeninputLayoutInputmodelChoice object |
|
55 */ |
|
56 IMPORT_C static CPeninputLayoutInputmodelChoice* NewL(CFepUiLayout* aUiLayout, TInt aControlId, |
|
57 TPluginInputMode aInputMode); |
|
58 |
|
59 /** |
|
60 * Destructor |
|
61 * |
|
62 * @since S60 v5.0 |
|
63 * @return None |
|
64 */ |
|
65 IMPORT_C virtual ~CPeninputLayoutInputmodelChoice(); |
|
66 |
|
67 |
|
68 /** |
|
69 * Pop up touch input switch list |
|
70 * |
|
71 * @since S60 v5.0 |
|
72 * @param aPoint Reference to pop up windows left and top point |
|
73 * @param aListUnderBtn list is under the button |
|
74 * @return none |
|
75 */ |
|
76 IMPORT_C void PopUpSwitchListL( const TRect& aRtControl ); |
|
77 |
|
78 /** |
|
79 * Set current editor is Secret |
|
80 * |
|
81 * @since S60 V4.0 |
|
82 * @param aLanguage Input language |
|
83 * @return none |
|
84 */ |
|
85 IMPORT_C void SetSecretEditor(TBool aSecure); |
|
86 |
|
87 /** |
|
88 * Get switch list rect |
|
89 * |
|
90 * @since S60 v5.0 |
|
91 * @return list rect |
|
92 */ |
|
93 IMPORT_C TRect SwitchListRect(); |
|
94 |
|
95 private: |
|
96 |
|
97 /** |
|
98 * Symbian second-phase constructor |
|
99 * |
|
100 * @since S60 v5.0 |
|
101 * @return None |
|
102 */ |
|
103 void CustomConstructL(); |
|
104 |
|
105 /** |
|
106 * Initialize internal control |
|
107 * |
|
108 * @since S60 v5.0 |
|
109 * @return none |
|
110 */ |
|
111 void DoInitializeControlL(); |
|
112 |
|
113 /** |
|
114 * C++ constructor. |
|
115 * |
|
116 * @since S60 v5.0 |
|
117 * @param aUiLayout Pointer to uilayout |
|
118 * @param aInputMode Pen input mode |
|
119 * @return None |
|
120 */ |
|
121 CPeninputLayoutInputmodelChoice(CFepUiLayout* aUiLayout, TInt aControlId, |
|
122 TPluginInputMode aInputMode); |
|
123 |
|
124 /** |
|
125 * Insert choice item to input mode switch list |
|
126 * |
|
127 * @since S60 v5.0 |
|
128 * @param aReader Reference to resource reader |
|
129 * @param aRsFile Reference to file resource |
|
130 * @return None |
|
131 */ |
|
132 void CreateChoiceItemL( TResourceReader &aReader, RResourceFile& aRsFile ); |
|
133 |
|
134 /** |
|
135 * Create choice item icon |
|
136 * |
|
137 * @since S60 v5.0 |
|
138 * @param aReader Reference to resource reader |
|
139 * @param aBmpFileName Reference to file name |
|
140 * @param aMajorSkinId Major skin id |
|
141 * @return ETrue for creating icon successfully; otherwise EFalse |
|
142 */ |
|
143 TBool CreateItemIconL(TResourceReader &aReader, CFbsBitmap** aImg, TPtrC& aBmpFileName, |
|
144 TInt32 aMajorSkinId); |
|
145 |
|
146 /** |
|
147 * Get main pane rect |
|
148 * |
|
149 * @since S60 v5.0 |
|
150 * @return Main pane rect |
|
151 */ |
|
152 TRect MainPaneRect(); |
|
153 |
|
154 /** |
|
155 * nsert list item |
|
156 * |
|
157 * @since S60 v5.0 |
|
158 * @param aIndex Item array index |
|
159 * @param aInputMode Pen input mode |
|
160 * @return none |
|
161 */ |
|
162 void InsertListItemL( const CFepLayoutChoiceList::SItem& item,TInt aInputMode ); |
|
163 |
|
164 /** |
|
165 * Application size Changed |
|
166 * |
|
167 * @since S60 v5.0 |
|
168 * @return none |
|
169 */ |
|
170 void SizeChanged(); |
|
171 |
|
172 |
|
173 /** |
|
174 * Get hide flag |
|
175 * |
|
176 * @since S60 V4.0 |
|
177 * @return ETrue if control is hiden, otherwise EFalse |
|
178 */ |
|
179 TBool Hiden(); |
|
180 |
|
181 /** |
|
182 * Reset choice list item |
|
183 * |
|
184 * @since S60 v5.0 |
|
185 * @return none |
|
186 */ |
|
187 void ResetListItemL(); |
|
188 private: // data |
|
189 |
|
190 CFepUiLayout* iUiLayout; |
|
191 /** |
|
192 * The background bitmap of popup window |
|
193 */ |
|
194 CFbsBitmap* iPopupWndBgImg; |
|
195 |
|
196 /** |
|
197 * The focus bitmap of popup window (not own) |
|
198 */ |
|
199 CFbsBitmap* iPopupWndFocusImg; |
|
200 |
|
201 /** |
|
202 * Popup window item size |
|
203 */ |
|
204 TSize iPopupItemSize; |
|
205 |
|
206 /** |
|
207 * This control is construced |
|
208 */ |
|
209 TBool iConstructed; |
|
210 |
|
211 /** |
|
212 * This control is construced |
|
213 */ |
|
214 TPluginInputMode iCurPluginInputMode; |
|
215 |
|
216 /** |
|
217 * Input mode item array |
|
218 */ |
|
219 //CFepLayoutChoiceList::SItem iInputModeItem[KTouchInputModeCount]; |
|
220 |
|
221 RArray<CFepLayoutChoiceList::SItem> iInputModeItems; |
|
222 /** |
|
223 * Editor secure flag |
|
224 */ |
|
225 TBool iSecretEditor; |
|
226 |
|
227 /** |
|
228 * Editor secure flag |
|
229 */ |
|
230 TRect iItemRect; |
|
231 |
|
232 |
|
233 /** |
|
234 * Text input language |
|
235 */ |
|
236 TLanguage iInputLanguage; |
|
237 |
|
238 /** |
|
239 * fep repository key |
|
240 */ |
|
241 CRepository* iAknFepRepository; |
|
242 |
|
243 }; |
|
244 |
|
245 //#include "peninputlayoutchoicelist.inl" |
|
246 #endif //C_FEPLAYOUTINPUTMODELCHOICE_H |
|
247 //End Of File |
|