|
1 /* |
|
2 * Copyright (c) 2002-2004 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "AknLayout2Decode.h" |
|
20 #include <CdlEngine.h> |
|
21 |
|
22 LOCAL_C TAknMultiLineTextLayout FixedTextLineLayout( TAknTextLineLayoutImp& aImplLine ) |
|
23 { |
|
24 // Clear the top 16 bits for the 32 bit fontid |
|
25 TAknMultiLineTextLayout retLine = static_cast<TAknMultiLineTextLayout>(aImplLine); |
|
26 retLine.iFont &= 0x0000ffff; |
|
27 return retLine; |
|
28 } |
|
29 |
|
30 // These functions are supplied as a library linked into LayoutInst.dll. They are |
|
31 // called by the specialised access functions for each instance. It is more efficient, |
|
32 // in terms of ROM, to use these functions to call the decode functions in AknLayout2.dll |
|
33 // than it is to call another DLL from the specialised functions. |
|
34 |
|
35 TAknWindowLineLayout AknLayoutDecode::WindowLine0f(const SImplData* aImplData) |
|
36 { |
|
37 TAknWindowLineLayoutImp line; |
|
38 AknLayoutDecodeSupport::WindowLine(line, aImplData); |
|
39 return line; |
|
40 } |
|
41 |
|
42 TAknWindowLineLayout AknLayoutDecode::WindowLine1f(const SImplData* aImplData, TInt aIndex1) |
|
43 { |
|
44 TAknWindowLineLayoutImp line; |
|
45 AknLayoutDecodeSupport::WindowLine(line, aImplData, 1, aIndex1, 0, 0, 0); |
|
46 return line; |
|
47 } |
|
48 |
|
49 TAknWindowLineLayout AknLayoutDecode::WindowLine2f(const SImplData* aImplData, TInt aIndex1, TInt aIndex2) |
|
50 { |
|
51 TAknWindowLineLayoutImp line; |
|
52 AknLayoutDecodeSupport::WindowLine(line, aImplData, 2, aIndex1, aIndex2, 0, 0); |
|
53 return line; |
|
54 } |
|
55 |
|
56 TAknWindowLineLayout AknLayoutDecode::WindowLine3f(const SImplData* aImplData, TInt aIndex1, TInt aIndex2, TInt aIndex3) |
|
57 { |
|
58 TAknWindowLineLayoutImp line; |
|
59 AknLayoutDecodeSupport::WindowLine(line, aImplData, 3, aIndex1, aIndex2, aIndex3, 0); |
|
60 return line; |
|
61 } |
|
62 |
|
63 TAknWindowLineLayout AknLayoutDecode::WindowLine4f(const SImplData* aImplData, TInt aIndex1, TInt aIndex2, TInt aIndex3, TInt aIndex4) |
|
64 { |
|
65 TAknWindowLineLayoutImp line; |
|
66 AknLayoutDecodeSupport::WindowLine(line, aImplData, 4, aIndex1, aIndex2, aIndex3, aIndex4); |
|
67 return line; |
|
68 } |
|
69 |
|
70 TAknWindowLineLayout AknLayoutDecode::WindowLine0t(const SImplData* aImplData, const TRect& aParentRect) |
|
71 { |
|
72 TAknWindowLineLayoutImp line; |
|
73 AknLayoutDecodeSupport::WindowLine(line, aImplData, aParentRect, 0, 0, 0, 0, 0); |
|
74 return line; |
|
75 } |
|
76 |
|
77 TAknWindowLineLayout AknLayoutDecode::WindowLine1t(const SImplData* aImplData, const TRect& aParentRect, TInt aIndex1) |
|
78 { |
|
79 TAknWindowLineLayoutImp line; |
|
80 AknLayoutDecodeSupport::WindowLine(line, aImplData, aParentRect, 1, aIndex1, 0, 0, 0); |
|
81 return line; |
|
82 } |
|
83 |
|
84 TAknWindowLineLayout AknLayoutDecode::WindowLine2t(const SImplData* aImplData, const TRect& aParentRect, TInt aIndex1, TInt aIndex2) |
|
85 { |
|
86 TAknWindowLineLayoutImp line; |
|
87 AknLayoutDecodeSupport::WindowLine(line, aImplData, aParentRect, 2, aIndex1, aIndex2, 0, 0); |
|
88 return line; |
|
89 } |
|
90 |
|
91 TAknWindowLineLayout AknLayoutDecode::WindowLine3t(const SImplData* aImplData, const TRect& aParentRect, TInt aIndex1, TInt aIndex2, TInt aIndex3) |
|
92 { |
|
93 TAknWindowLineLayoutImp line; |
|
94 AknLayoutDecodeSupport::WindowLine(line, aImplData, aParentRect, 3, aIndex1, aIndex2, aIndex3, 0); |
|
95 return line; |
|
96 } |
|
97 |
|
98 TAknWindowLineLayout AknLayoutDecode::WindowLine4t(const SImplData* aImplData, const TRect& aParentRect, TInt aIndex1, TInt aIndex2, TInt aIndex3, TInt aIndex4) |
|
99 { |
|
100 TAknWindowLineLayoutImp line; |
|
101 AknLayoutDecodeSupport::WindowLine(line, aImplData, aParentRect, 4, aIndex1, aIndex2, aIndex3, aIndex4); |
|
102 return line; |
|
103 } |
|
104 |
|
105 TAknTextLineLayout AknLayoutDecode::TextLine0f(const SImplData* aImplData) |
|
106 { |
|
107 TAknTextLineLayoutImp line; |
|
108 AknLayoutDecodeSupport::TextLine(line, aImplData); |
|
109 return FixedTextLineLayout( line ); |
|
110 } |
|
111 |
|
112 TAknTextLineLayout AknLayoutDecode::TextLine1f(const SImplData* aImplData, TInt aIndex1) |
|
113 { |
|
114 TAknTextLineLayoutImp line; |
|
115 AknLayoutDecodeSupport::TextLine(line, aImplData, 1, aIndex1, 0, 0, 0); |
|
116 return FixedTextLineLayout( line ); |
|
117 } |
|
118 |
|
119 TAknTextLineLayout AknLayoutDecode::TextLine2f(const SImplData* aImplData, TInt aIndex1, TInt aIndex2) |
|
120 { |
|
121 TAknTextLineLayoutImp line; |
|
122 AknLayoutDecodeSupport::TextLine(line, aImplData, 2, aIndex1, aIndex2, 0, 0); |
|
123 return FixedTextLineLayout( line ); |
|
124 } |
|
125 |
|
126 TAknTextLineLayout AknLayoutDecode::TextLine3f(const SImplData* aImplData, TInt aIndex1, TInt aIndex2, TInt aIndex3) |
|
127 { |
|
128 TAknTextLineLayoutImp line; |
|
129 AknLayoutDecodeSupport::TextLine(line, aImplData, 3, aIndex1, aIndex2, aIndex3, 0); |
|
130 return FixedTextLineLayout( line ); |
|
131 } |
|
132 |
|
133 TAknTextLineLayout AknLayoutDecode::TextLine4f(const SImplData* aImplData, TInt aIndex1, TInt aIndex2, TInt aIndex3, TInt aIndex4) |
|
134 { |
|
135 TAknTextLineLayoutImp line; |
|
136 AknLayoutDecodeSupport::TextLine(line, aImplData, 4, aIndex1, aIndex2, aIndex3, aIndex4); |
|
137 return FixedTextLineLayout( line ); |
|
138 } |
|
139 |
|
140 TAknTextLineLayout AknLayoutDecode::TextLine0t(const SImplData* aImplData, const TRect& aParentRect) |
|
141 { |
|
142 TAknTextLineLayoutImp line; |
|
143 AknLayoutDecodeSupport::TextLine(line, aImplData, aParentRect, 0, 0, 0, 0, 0); |
|
144 return FixedTextLineLayout( line ); |
|
145 } |
|
146 |
|
147 TAknTextLineLayout AknLayoutDecode::TextLine1t(const SImplData* aImplData, const TRect& aParentRect, TInt aIndex1) |
|
148 { |
|
149 TAknTextLineLayoutImp line; |
|
150 AknLayoutDecodeSupport::TextLine(line, aImplData, aParentRect, 1, aIndex1, 0, 0, 0); |
|
151 return FixedTextLineLayout( line ); |
|
152 } |
|
153 |
|
154 TAknTextLineLayout AknLayoutDecode::TextLine2t(const SImplData* aImplData, const TRect& aParentRect, TInt aIndex1, TInt aIndex2) |
|
155 { |
|
156 TAknTextLineLayoutImp line; |
|
157 AknLayoutDecodeSupport::TextLine(line, aImplData, aParentRect, 2, aIndex1, aIndex2, 0, 0); |
|
158 return FixedTextLineLayout( line ); |
|
159 } |
|
160 |
|
161 TAknTextLineLayout AknLayoutDecode::TextLine3t(const SImplData* aImplData, const TRect& aParentRect, TInt aIndex1, TInt aIndex2, TInt aIndex3) |
|
162 { |
|
163 TAknTextLineLayoutImp line; |
|
164 AknLayoutDecodeSupport::TextLine(line, aImplData, aParentRect, 3, aIndex1, aIndex2, aIndex3, 0); |
|
165 return FixedTextLineLayout( line ); |
|
166 } |
|
167 |
|
168 TAknTextLineLayout AknLayoutDecode::TextLine4t(const SImplData* aImplData, const TRect& aParentRect, TInt aIndex1, TInt aIndex2, TInt aIndex3, TInt aIndex4) |
|
169 { |
|
170 TAknTextLineLayoutImp line; |
|
171 AknLayoutDecodeSupport::TextLine(line, aImplData, aParentRect, 4, aIndex1, aIndex2, aIndex3, aIndex4); |
|
172 return FixedTextLineLayout( line ); |
|
173 } |
|
174 |
|
175 TAknMultiLineTextLayout AknLayoutDecode::MultiLineTextLine1f(const SImplData* aImplData, TInt aIndex1) |
|
176 { |
|
177 TAknTextLineLayoutImp line; |
|
178 AknLayoutDecodeSupport::MultiLineTextLine(line, aImplData, 1, aIndex1, 0, 0, 0); |
|
179 return FixedTextLineLayout( line ); |
|
180 } |
|
181 |
|
182 TAknMultiLineTextLayout AknLayoutDecode::MultiLineTextLine2f(const SImplData* aImplData, TInt aIndex1, TInt aIndex2) |
|
183 { |
|
184 TAknTextLineLayoutImp line; |
|
185 AknLayoutDecodeSupport::MultiLineTextLine(line, aImplData, 2, aIndex1, aIndex2, 0, 0); |
|
186 return FixedTextLineLayout( line ); |
|
187 } |
|
188 |
|
189 TAknMultiLineTextLayout AknLayoutDecode::MultiLineTextLine3f(const SImplData* aImplData, TInt aIndex1, TInt aIndex2, TInt aIndex3) |
|
190 { |
|
191 TAknTextLineLayoutImp line; |
|
192 AknLayoutDecodeSupport::MultiLineTextLine(line, aImplData, 3, aIndex1, aIndex2, aIndex3, 0); |
|
193 return FixedTextLineLayout( line ); |
|
194 } |
|
195 |
|
196 TAknMultiLineTextLayout AknLayoutDecode::MultiLineTextLine4f(const SImplData* aImplData, TInt aIndex1, TInt aIndex2, TInt aIndex3, TInt aIndex4) |
|
197 { |
|
198 TAknTextLineLayoutImp line; |
|
199 AknLayoutDecodeSupport::MultiLineTextLine(line, aImplData, 4, aIndex1, aIndex2, aIndex3, aIndex4); |
|
200 return FixedTextLineLayout( line ); |
|
201 } |
|
202 |
|
203 TAknMultiLineTextLayout AknLayoutDecode::MultiLineTextLine1t(const SImplData* aImplData, const TRect& aParentRect, TInt aIndex1) |
|
204 { |
|
205 TAknTextLineLayoutImp line; |
|
206 AknLayoutDecodeSupport::MultiLineTextLine(line, aImplData, aParentRect, 1, aIndex1, 0, 0, 0); |
|
207 return FixedTextLineLayout( line ); |
|
208 } |
|
209 |
|
210 TAknMultiLineTextLayout AknLayoutDecode::MultiLineTextLine2t(const SImplData* aImplData, const TRect& aParentRect, TInt aIndex1, TInt aIndex2) |
|
211 { |
|
212 TAknTextLineLayoutImp line; |
|
213 AknLayoutDecodeSupport::MultiLineTextLine(line, aImplData, aParentRect, 2, aIndex1, aIndex2, 0, 0); |
|
214 return FixedTextLineLayout( line ); |
|
215 } |
|
216 |
|
217 TAknMultiLineTextLayout AknLayoutDecode::MultiLineTextLine3t(const SImplData* aImplData, const TRect& aParentRect, TInt aIndex1, TInt aIndex2, TInt aIndex3) |
|
218 { |
|
219 TAknTextLineLayoutImp line; |
|
220 AknLayoutDecodeSupport::MultiLineTextLine(line, aImplData, aParentRect, 3, aIndex1, aIndex2, aIndex3, 0); |
|
221 return FixedTextLineLayout( line ); |
|
222 } |
|
223 |
|
224 TAknMultiLineTextLayout AknLayoutDecode::MultiLineTextLine4t(const SImplData* aImplData, const TRect& aParentRect, TInt aIndex1, TInt aIndex2, TInt aIndex3, TInt aIndex4) |
|
225 { |
|
226 TAknTextLineLayoutImp line; |
|
227 AknLayoutDecodeSupport::MultiLineTextLine(line, aImplData, aParentRect, 4, aIndex1, aIndex2, aIndex3, aIndex4); |
|
228 return FixedTextLineLayout( line ); |
|
229 } |
|
230 |
|
231 TAknWindowLineLayout AknLayoutDecode::WindowTable0f(const SImplData* aImplData, TInt aLineIndex) |
|
232 { |
|
233 TAknWindowLineLayoutImp line; |
|
234 AknLayoutDecodeSupport::WindowTable(line, aImplData, aLineIndex, 0, 0, 0, 0, 0); |
|
235 return line; |
|
236 } |
|
237 |
|
238 TAknWindowLineLayout AknLayoutDecode::WindowTable1f(const SImplData* aImplData, TInt aLineIndex, TInt aIndex1) |
|
239 { |
|
240 TAknWindowLineLayoutImp line; |
|
241 AknLayoutDecodeSupport::WindowTable(line, aImplData, aLineIndex, 1, aIndex1, 0, 0, 0); |
|
242 return line; |
|
243 } |
|
244 |
|
245 TAknWindowLineLayout AknLayoutDecode::WindowTable2f(const SImplData* aImplData, TInt aLineIndex, TInt aIndex1, TInt aIndex2) |
|
246 { |
|
247 TAknWindowLineLayoutImp line; |
|
248 AknLayoutDecodeSupport::WindowTable(line, aImplData, aLineIndex, 2, aIndex1, aIndex2, 0, 0); |
|
249 return line; |
|
250 } |
|
251 |
|
252 TAknWindowLineLayout AknLayoutDecode::WindowTable3f(const SImplData* aImplData, TInt aLineIndex, TInt aIndex1, TInt aIndex2, TInt aIndex3) |
|
253 { |
|
254 TAknWindowLineLayoutImp line; |
|
255 AknLayoutDecodeSupport::WindowTable(line, aImplData, aLineIndex, 3, aIndex1, aIndex2, aIndex3, 0); |
|
256 return line; |
|
257 } |
|
258 |
|
259 TAknWindowLineLayout AknLayoutDecode::WindowTable4f(const SImplData* aImplData, TInt aLineIndex, TInt aIndex1, TInt aIndex2, TInt aIndex3, TInt aIndex4) |
|
260 { |
|
261 TAknWindowLineLayoutImp line; |
|
262 AknLayoutDecodeSupport::WindowTable(line, aImplData, aLineIndex, 4, aIndex1, aIndex2, aIndex3, aIndex4); |
|
263 return line; |
|
264 } |
|
265 |
|
266 TAknWindowLineLayout AknLayoutDecode::WindowTable0t(const SImplData* aImplData, TInt aLineIndex, const TRect& aParentRect) |
|
267 { |
|
268 TAknWindowLineLayoutImp line; |
|
269 AknLayoutDecodeSupport::WindowTable(line, aImplData, aLineIndex, aParentRect, 0, 0, 0, 0, 0); |
|
270 return line; |
|
271 } |
|
272 |
|
273 TAknWindowLineLayout AknLayoutDecode::WindowTable1t(const SImplData* aImplData, TInt aLineIndex, const TRect& aParentRect, TInt aIndex1) |
|
274 { |
|
275 TAknWindowLineLayoutImp line; |
|
276 AknLayoutDecodeSupport::WindowTable(line, aImplData, aLineIndex, aParentRect, 1, aIndex1, 0, 0, 0); |
|
277 return line; |
|
278 } |
|
279 |
|
280 TAknWindowLineLayout AknLayoutDecode::WindowTable2t(const SImplData* aImplData, TInt aLineIndex, const TRect& aParentRect, TInt aIndex1, TInt aIndex2) |
|
281 { |
|
282 TAknWindowLineLayoutImp line; |
|
283 AknLayoutDecodeSupport::WindowTable(line, aImplData, aLineIndex, aParentRect, 2, aIndex1, aIndex2, 0, 0); |
|
284 return line; |
|
285 } |
|
286 |
|
287 TAknWindowLineLayout AknLayoutDecode::WindowTable3t(const SImplData* aImplData, TInt aLineIndex, const TRect& aParentRect, TInt aIndex1, TInt aIndex2, TInt aIndex3) |
|
288 { |
|
289 TAknWindowLineLayoutImp line; |
|
290 AknLayoutDecodeSupport::WindowTable(line, aImplData, aLineIndex, aParentRect, 3, aIndex1, aIndex2, aIndex3, 0); |
|
291 return line; |
|
292 } |
|
293 |
|
294 TAknWindowLineLayout AknLayoutDecode::WindowTable4t(const SImplData* aImplData, TInt aLineIndex, const TRect& aParentRect, TInt aIndex1, TInt aIndex2, TInt aIndex3, TInt aIndex4) |
|
295 { |
|
296 TAknWindowLineLayoutImp line; |
|
297 AknLayoutDecodeSupport::WindowTable(line, aImplData, aLineIndex, aParentRect, 4, aIndex1, aIndex2, aIndex3, aIndex4); |
|
298 line.SetAllParentOffsets(aParentRect); |
|
299 return line; |
|
300 } |
|
301 |
|
302 TAknTextLineLayout AknLayoutDecode::TextTable0f(const SImplData* aImplData, TInt aLineIndex) |
|
303 { |
|
304 TAknTextLineLayoutImp line; |
|
305 AknLayoutDecodeSupport::TextTable(line, aImplData, aLineIndex, 0, 0, 0, 0, 0); |
|
306 return FixedTextLineLayout( line ); |
|
307 } |
|
308 |
|
309 TAknTextLineLayout AknLayoutDecode::TextTable1f(const SImplData* aImplData, TInt aLineIndex, TInt aIndex1) |
|
310 { |
|
311 TAknTextLineLayoutImp line; |
|
312 AknLayoutDecodeSupport::TextTable(line, aImplData, aLineIndex, 1, aIndex1, 0, 0, 0); |
|
313 return FixedTextLineLayout( line ); |
|
314 } |
|
315 |
|
316 TAknTextLineLayout AknLayoutDecode::TextTable2f(const SImplData* aImplData, TInt aLineIndex, TInt aIndex1, TInt aIndex2) |
|
317 { |
|
318 TAknTextLineLayoutImp line; |
|
319 AknLayoutDecodeSupport::TextTable(line, aImplData, aLineIndex, 2, aIndex1, aIndex2, 0, 0); |
|
320 return FixedTextLineLayout( line ); |
|
321 } |
|
322 |
|
323 TAknTextLineLayout AknLayoutDecode::TextTable3f(const SImplData* aImplData, TInt aLineIndex, TInt aIndex1, TInt aIndex2, TInt aIndex3) |
|
324 { |
|
325 TAknTextLineLayoutImp line; |
|
326 AknLayoutDecodeSupport::TextTable(line, aImplData, aLineIndex, 3, aIndex1, aIndex2, aIndex3, 0); |
|
327 return FixedTextLineLayout( line ); |
|
328 } |
|
329 |
|
330 TAknTextLineLayout AknLayoutDecode::TextTable4f(const SImplData* aImplData, TInt aLineIndex, TInt aIndex1, TInt aIndex2, TInt aIndex3, TInt aIndex4) |
|
331 { |
|
332 TAknTextLineLayoutImp line; |
|
333 AknLayoutDecodeSupport::TextTable(line, aImplData, aLineIndex, 4, aIndex1, aIndex2, aIndex3, aIndex4); |
|
334 return FixedTextLineLayout( line ); |
|
335 } |
|
336 |
|
337 TAknTextLineLayout AknLayoutDecode::TextTable0t(const SImplData* aImplData, TInt aLineIndex, const TRect& aParentRect) |
|
338 { |
|
339 TAknTextLineLayoutImp line; |
|
340 AknLayoutDecodeSupport::TextTable(line, aImplData, aLineIndex, aParentRect, 0, 0, 0, 0, 0); |
|
341 return FixedTextLineLayout( line ); |
|
342 } |
|
343 |
|
344 TAknTextLineLayout AknLayoutDecode::TextTable1t(const SImplData* aImplData, TInt aLineIndex, const TRect& aParentRect, TInt aIndex1) |
|
345 { |
|
346 TAknTextLineLayoutImp line; |
|
347 AknLayoutDecodeSupport::TextTable(line, aImplData, aLineIndex, aParentRect, 1, aIndex1, 0, 0, 0); |
|
348 return FixedTextLineLayout( line ); |
|
349 } |
|
350 |
|
351 TAknTextLineLayout AknLayoutDecode::TextTable2t(const SImplData* aImplData, TInt aLineIndex, const TRect& aParentRect, TInt aIndex1, TInt aIndex2) |
|
352 { |
|
353 TAknTextLineLayoutImp line; |
|
354 AknLayoutDecodeSupport::TextTable(line, aImplData, aLineIndex, aParentRect, 2, aIndex1, aIndex2, 0, 0); |
|
355 return FixedTextLineLayout( line ); |
|
356 } |
|
357 |
|
358 TAknTextLineLayout AknLayoutDecode::TextTable3t(const SImplData* aImplData, TInt aLineIndex, const TRect& aParentRect, TInt aIndex1, TInt aIndex2, TInt aIndex3) |
|
359 { |
|
360 TAknTextLineLayoutImp line; |
|
361 AknLayoutDecodeSupport::TextTable(line, aImplData, aLineIndex, aParentRect, 3, aIndex1, aIndex2, aIndex3, 0); |
|
362 return FixedTextLineLayout( line ); |
|
363 } |
|
364 |
|
365 TAknTextLineLayout AknLayoutDecode::TextTable4t(const SImplData* aImplData, TInt aLineIndex, const TRect& aParentRect, TInt aIndex1, TInt aIndex2, TInt aIndex3, TInt aIndex4) |
|
366 { |
|
367 TAknTextLineLayoutImp line; |
|
368 AknLayoutDecodeSupport::TextTable(line, aImplData, aLineIndex, aParentRect, 4, aIndex1, aIndex2, aIndex3, aIndex4); |
|
369 return FixedTextLineLayout( line ); |
|
370 } |
|
371 |
|
372 TAknLayoutTableLimits AknLayoutDecode::TableLimits(const TUint16* aDataLookup) |
|
373 { |
|
374 return AknLayoutDecodeSupport::TableLimits(aDataLookup); |
|
375 } |