|
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: common layout config |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CPENINPUTLAYOUTCONFIG_H |
|
20 #define C_CPENINPUTLAYOUTCONFIG_H |
|
21 |
|
22 |
|
23 // System includes |
|
24 #include <barsread.h> |
|
25 #include <peninputvkbctrllayout.h> |
|
26 |
|
27 // Forward decalaration |
|
28 class CPeninputClientLayoutInfo; |
|
29 class CPeninputVkbLayoutInfo; |
|
30 class CPeninputRangeBarInfo; |
|
31 class CPeninputShiftCapsInfo; |
|
32 class CPeninputCtrlPool; |
|
33 /** |
|
34 * Peninput commonlayout layout config |
|
35 * |
|
36 * @lib peninputcommonlayout.lib |
|
37 * @since S60 v3.2 |
|
38 */ |
|
39 class CPeninputLayoutConfig : public CBase |
|
40 { |
|
41 |
|
42 public: |
|
43 |
|
44 /** |
|
45 * Symbian constructor |
|
46 * |
|
47 * @since S60 v3.2 |
|
48 * @param aResUtils Resource Utils |
|
49 * @param aReader Resource reader |
|
50 * @return Pointer to created CPeninputLayoutConfig object |
|
51 */ |
|
52 IMPORT_C static CPeninputLayoutConfig* NewL( CAknFepCtrlVkbLayout& aVkblayout, |
|
53 TResourceReader& aReader ); |
|
54 |
|
55 /** |
|
56 * Destructor |
|
57 * |
|
58 * @since S60 v3.2 |
|
59 * @return None |
|
60 */ |
|
61 IMPORT_C virtual ~CPeninputLayoutConfig(); |
|
62 |
|
63 /** |
|
64 * Get language id |
|
65 * |
|
66 * @since S60 v3.2 |
|
67 * @return Language id |
|
68 */ |
|
69 inline TInt Language(); |
|
70 |
|
71 /** |
|
72 * Get language name |
|
73 * |
|
74 * @since S60 v3.2 |
|
75 * @return Language name |
|
76 */ |
|
77 inline HBufC* LanguageString(); |
|
78 |
|
79 /** |
|
80 * Get case sensitive flag |
|
81 * |
|
82 * @since S60 v3.2 |
|
83 * @return Case sensitive flag |
|
84 */ |
|
85 inline TBool CaseSensitive(); |
|
86 |
|
87 /** |
|
88 * Get guide line |
|
89 * |
|
90 * @since S60 v3.2 |
|
91 * @return The guide line style |
|
92 */ |
|
93 inline TInt GuideLine(); |
|
94 |
|
95 /** |
|
96 * The position percent of top guide line |
|
97 * |
|
98 * @since S60 v3.2 |
|
99 * @return The position percent of top guide line |
|
100 */ |
|
101 inline TInt PositionTopLine(); |
|
102 |
|
103 /** |
|
104 * The position percent of bottom guide line |
|
105 * |
|
106 * @since S60 v3.2 |
|
107 * @return The position percent of bottom guide line |
|
108 */ |
|
109 inline TInt PositionBottomLine(); |
|
110 |
|
111 /** |
|
112 * Get client layout info list |
|
113 * |
|
114 * @since S60 v3.2 |
|
115 * @return The reference of pointer array containing client layout list |
|
116 */ |
|
117 inline RPointerArray<CPeninputClientLayoutInfo>& ClientLayoutInfoList(); |
|
118 |
|
119 /** |
|
120 * Get vkb layout info list |
|
121 * |
|
122 * @since S60 v3.2 |
|
123 * @return The reference of pointer array containing vkb layout list |
|
124 */ |
|
125 inline RPointerArray<CPeninputVkbLayoutInfo>& VkbLayoutInfoList(); |
|
126 |
|
127 /** |
|
128 * Get shift&caps info |
|
129 * |
|
130 * @since S60 v3.2 |
|
131 * @return The reference of pointer array containing shift&caps info |
|
132 */ |
|
133 inline RPointerArray<CPeninputShiftCapsInfo>& ShiftCapsInfoList(); |
|
134 |
|
135 /** |
|
136 * Get client layout info |
|
137 * |
|
138 * @since S60 v3.2 |
|
139 * @param aLayoutId Client layout id |
|
140 * @return The pointer to CPeninputClientLayoutInfo object |
|
141 */ |
|
142 IMPORT_C CPeninputClientLayoutInfo* FindClientLayoutInfo( |
|
143 TInt aLayoutId ); |
|
144 |
|
145 /** |
|
146 * Get vkb layout info |
|
147 * |
|
148 * @since S60 v3.2 |
|
149 * @param aLayoutId Vkb layout id |
|
150 * @return The pointer to CPeninputVkbLayoutInfo object |
|
151 */ |
|
152 IMPORT_C CPeninputVkbLayoutInfo* FindVkbLayoutInfo( TInt aLayoutId ); |
|
153 |
|
154 /** |
|
155 * Get shift&caps info |
|
156 * |
|
157 * @since S60 v3.2 |
|
158 * @param aRangeId Range id |
|
159 * @return The pointer to CPeninputShiftCapsInfo object |
|
160 */ |
|
161 IMPORT_C CPeninputShiftCapsInfo* FindShiftCapsInfo( TInt aRangeId ); |
|
162 |
|
163 /** |
|
164 * Get vkb layout id |
|
165 * |
|
166 * @since S60 v3.2 |
|
167 * @param aRangeId Range id |
|
168 * @param aShiftCapsSingleId Shift&caps single id |
|
169 * @return The vkb layout id |
|
170 */ |
|
171 IMPORT_C TInt ShiftCapsSingleVkbLayoutId( TInt aRangeId, |
|
172 TInt aShiftCapsSingleId ); |
|
173 |
|
174 /** |
|
175 * Get vkb layout id |
|
176 * |
|
177 * @since S60 v3.2 |
|
178 * @param aRangeId Range id |
|
179 * @param aCase The case |
|
180 * @return The vkb layout id |
|
181 */ |
|
182 IMPORT_C TInt ShiftCapsSingleVkbLayoutByCase( TInt aRangeId, |
|
183 TInt aCase ); |
|
184 /** |
|
185 * Get range bar info |
|
186 * |
|
187 * @since S60 v3.2 |
|
188 * @return The pointer to CPeninputRangeBarInfo object |
|
189 */ |
|
190 inline CPeninputRangeBarInfo* RangeBarInfo(); |
|
191 |
|
192 /** |
|
193 * Get range bar resource id |
|
194 * |
|
195 * @since S60 v3.2 |
|
196 * @return The resource id |
|
197 */ |
|
198 inline TInt RangebarResId(); |
|
199 |
|
200 protected: |
|
201 |
|
202 /** |
|
203 * Constructor |
|
204 * |
|
205 * @since S60 v3.2 |
|
206 * @return None |
|
207 */ |
|
208 CPeninputLayoutConfig(); |
|
209 |
|
210 /** |
|
211 * Second phase constructor |
|
212 * |
|
213 * @since S60 v3.2 |
|
214 * @param aResUtils Resource Utils |
|
215 * @param aReader Resource reader |
|
216 * @return None |
|
217 */ |
|
218 void ConstructL( CAknFepCtrlVkbLayout& aVkblayout, TResourceReader& aReader ); |
|
219 |
|
220 private: // Data |
|
221 |
|
222 /** |
|
223 * Language id |
|
224 */ |
|
225 TInt iLanguage; |
|
226 |
|
227 /** |
|
228 * Language string |
|
229 * Own |
|
230 */ |
|
231 HBufC* iLanguageString; |
|
232 |
|
233 /** |
|
234 * Case sensitive flag |
|
235 */ |
|
236 TBool iCaseSensitive; |
|
237 |
|
238 /** |
|
239 * Guide line style |
|
240 */ |
|
241 TInt iGuideLine; |
|
242 |
|
243 /** |
|
244 * The position percent of top guide line |
|
245 */ |
|
246 TInt iPositionTopLine; |
|
247 |
|
248 /** |
|
249 * The position percent of bottom guide line |
|
250 */ |
|
251 TInt iPositionBottomLine; |
|
252 |
|
253 /** |
|
254 * Client layout info list |
|
255 */ |
|
256 RPointerArray<CPeninputClientLayoutInfo> iClientLayoutInfoList; |
|
257 |
|
258 /** |
|
259 * Vkb layout info list |
|
260 */ |
|
261 RPointerArray<CPeninputVkbLayoutInfo> iVkbLayoutInfoList; |
|
262 |
|
263 /** |
|
264 * Range bar info |
|
265 * Own |
|
266 */ |
|
267 CPeninputRangeBarInfo* iRangeBarInfo; |
|
268 |
|
269 /** |
|
270 * Shift&caps info list |
|
271 */ |
|
272 RPointerArray<CPeninputShiftCapsInfo> iShiftCapsInfoList; |
|
273 |
|
274 /** |
|
275 * Resource Id for range bar |
|
276 */ |
|
277 TInt iRangeBarResId; |
|
278 }; |
|
279 |
|
280 #include "peninputlayoutconfig.inl" |
|
281 |
|
282 #endif // C_CPENINPUTLAYOUTCONFIG_H |