146 |
146 |
147 public: |
147 public: |
148 |
148 |
149 /** |
149 /** |
150 * Gets the size of template item according to highlight and orientation. |
150 * Gets the size of template item according to highlight and orientation. |
151 * |
151 * |
152 * @since S60 v3.0 |
152 * @since S60 v3.0 |
153 * @param aWidgetType The widget type. |
153 * @param aWidgetType The widget type. |
154 * @param aTemplate The current template for the item. |
154 * @param aTemplate The current template for the item. |
155 * @param aLandscapeOrientation Is view in landscape orientation. |
155 * @param aLandscapeOrientation Is view in landscape orientation. |
156 * @param aHighlighted Is item highlighted. |
156 * @param aHighlighted Is item highlighted. |
157 * @param aParentRect The bounding rect in which the item is drawn. |
157 * @param aParentRect The bounding rect in which the item is drawn. |
158 * |
158 * |
159 * @return size of item |
159 * @return size of item |
160 */ |
160 */ |
161 TSize GetSize( TMmWidgetType aWidgetType, const TDesC8& aTemplate, |
161 TSize GetSize( TMmWidgetType aWidgetType, const TDesC8& aTemplate, |
162 TBool aLandscapeOrientation = 0, TBool aHighlighted = 0, |
162 TBool aLandscapeOrientation = 0, TBool aHighlighted = 0, |
163 TRect aParentRect = TRect() ); |
163 TRect aParentRect = TRect() ); |
164 |
164 |
165 /** |
165 /** |
166 * Gets the size of template. |
166 * Gets the size of template. |
167 * |
167 * |
168 * @since S60 v3.0 |
168 * @since S60 v3.0 |
169 * @param aItemSize Item size to be set. |
169 * @param aItemSize Item size to be set. |
170 * @param aWidgetType The widget type. |
170 * @param aWidgetType The widget type. |
171 * @param aTemplate The current template for the item. |
171 * @param aTemplate The current template for the item. |
172 * @param aLandscapeOrientation Is view in landscape orientation. |
172 * @param aLandscapeOrientation Is view in landscape orientation. |
173 * @param aHighlighted Is item highlighted. |
173 * @param aHighlighted Is item highlighted. |
174 * @param aParentRect The bounding rect in which the item is drawn. |
174 * @param aParentRect The bounding rect in which the item is drawn. |
175 * |
175 * |
176 * @return error code |
176 * @return error code |
177 */ |
177 */ |
178 TInt GetSize( TSize& aItemSize, TMmWidgetType aWidgetType, |
178 TInt GetSize( TSize& aItemSize, TMmWidgetType aWidgetType, |
179 const TDesC8& aTemplate, TBool aLandscapeOrientation, |
179 const TDesC8& aTemplate, TBool aLandscapeOrientation, |
180 TBool aHighlighted , TRect aParentRect = TRect() ); |
180 TBool aHighlighted , TRect aParentRect = TRect() ); |
181 |
181 |
182 /** |
182 /** |
183 * Get array of templates for subcells ( item children ). |
183 * Get array of templates for subcells ( item children ). |
184 * |
184 * |
185 * @since S60 v3.0 |
185 * @since S60 v3.0 |
186 * @param aWidgetType The widget type. |
186 * @param aWidgetType The widget type. |
187 * @param aArray The array of subcell children to be set. |
187 * @param aArray The array of subcell children to be set. |
188 * @param aTemplate The current template for the item. |
188 * @param aTemplate The current template for the item. |
189 * @param aLandscapeOrientation Is view in landscape orientation. |
189 * @param aLandscapeOrientation Is view in landscape orientation. |
190 * @param aHighlighted Is item highlighted. |
190 * @param aHighlighted Is item highlighted. |
191 * @param aIsEditMode Is in edit mode. |
191 * @param aIsEditMode Is in edit mode. |
192 * |
192 * |
193 */ |
193 */ |
194 void GetChildrenL( TMmWidgetType aWidgetType, |
194 void GetChildrenL( TMmWidgetType aWidgetType, |
195 RArray< TTemplateChild >& aArray, const TDesC8& aTemplate, |
195 RArray< TTemplateChild >& aArray, const TDesC8& aTemplate, |
196 TBool aLandscapeOrientation = 0, TBool aHighlighted = 0, TBool aIsEditMode = 0 ); |
196 TBool aLandscapeOrientation = 0, TBool aHighlighted = 0, TBool aIsEditMode = 0 ); |
197 |
197 |
198 /** |
198 /** |
199 * Get the layout size ( Grid ) e.g. 3x4 |
199 * Get the layout size ( Grid ) e.g. 3x4 |
200 * |
200 * |
201 * @since S60 v3.0 |
201 * @since S60 v3.0 |
202 * @param aWidgetType The widget type. |
202 * @param aWidgetType The widget type. |
203 * @param aTemplate The current template for the item. |
203 * @param aTemplate The current template for the item. |
204 * @param aLandscapeOrientation Is view in landscape orientation. |
204 * @param aLandscapeOrientation Is view in landscape orientation. |
205 * |
205 * |
206 * @return the size of the layout. |
206 * @return the size of the layout. |
207 */ |
207 */ |
208 TSize GetLayoutSizeL( TMmWidgetType aWidgetType, const TDesC8& aTemplate, |
208 TSize GetLayoutSizeL( TMmWidgetType aWidgetType, const TDesC8& aTemplate, |
209 TBool aLandscapeOrientation ); |
209 TBool aLandscapeOrientation ); |
210 |
210 |
211 /** |
211 /** |
212 * Get rect of move indicator according to item (as reference position). |
212 * Get rect of move indicator according to item (as reference position). |
213 * The rect is relevant to the item in point (0,0). |
213 * The rect is relevant to the item in point (0,0). |
214 * e.g for item size 20x360 the rect can be (-5,-5):(365,25). |
214 * e.g for item size 20x360 the rect can be (-5,-5):(365,25). |
215 * |
215 * |
216 * @since S60 v3.0 |
216 * @since S60 v3.0 |
217 * @param aWidgetType The widget type. |
217 * @param aWidgetType The widget type. |
218 * @param aTemplate The current template for the item. |
218 * @param aTemplate The current template for the item. |
219 * @param aLandscapeOrientation Is view in landscape orientation. |
219 * @param aLandscapeOrientation Is view in landscape orientation. |
220 * @param aHighlighted Is item highlighted. |
220 * @param aHighlighted Is item highlighted. |
221 * |
221 * |
222 * @return rect of move indicator area. |
222 * @return rect of move indicator area. |
223 */ |
223 */ |
224 TRect GetMoveIndicatorRect( TMmWidgetType aWidgetType, const TDesC8& aTemplate, |
224 TRect GetMoveIndicatorRect( TMmWidgetType aWidgetType, const TDesC8& aTemplate, |
225 TBool aLandscapeOrientation, TBool aHighlighted ); |
225 TBool aLandscapeOrientation, TBool aHighlighted ); |
226 |
226 |
227 /** |
227 /** |
228 * Get children templates for move indicator. |
228 * Get children templates for move indicator. |
229 * |
229 * |
230 * @since S60 v3.0 |
230 * @since S60 v3.0 |
231 * @param aWidgetType The widget type. |
231 * @param aWidgetType The widget type. |
232 * @param aArray Array of children templates. |
232 * @param aArray Array of children templates. |
233 * @param aTemplate The current template for the item. |
233 * @param aTemplate The current template for the item. |
234 * @param aLandscapeOrientation Is view in landscape orientation. |
234 * @param aLandscapeOrientation Is view in landscape orientation. |
235 * @param aHighlighted Is item highlighted. |
235 * @param aHighlighted Is item highlighted. |
236 * |
236 * |
237 */ |
237 */ |
238 void GetMoveIndicatorChildrenL( TMmWidgetType aWidgetType, |
238 void GetMoveIndicatorChildrenL( TMmWidgetType aWidgetType, |
239 RArray< TTemplateChild >& aArray, const TDesC8& aTemplate, TBool aLandscapeOrientation, TBool aHighlighted ); |
239 RArray< TTemplateChild >& aArray, const TDesC8& aTemplate, TBool aLandscapeOrientation, TBool aHighlighted ); |
240 |
240 |
241 /** |
241 /** |
242 * Get size of item for LCT template. |
242 * Get size of item for LCT template. |
243 * |
243 * |
244 * @since S60 v3.0 |
244 * @since S60 v3.0 |
245 * @param aLCTTemplate The LCT template name. |
245 * @param aLCTTemplate The LCT template name. |
246 * @param aVariety The variety for aLCTTemplate. |
246 * @param aVariety The variety for aLCTTemplate. |
247 * @param aWindowLayout The window layout to be used to calculet the size. |
247 * @param aWindowLayout The window layout to be used to calculet the size. |
248 * @param aLandscapeOrientation ETrue if view in landscape orientation otherwise EFalse. |
248 * @param aLandscapeOrientation ETrue if view in landscape orientation otherwise EFalse. |
249 * |
249 * |
250 * @return item size |
250 * @return item size |
251 */ |
251 */ |
252 TSize GetLCTSize( const TDesC8& aLCTTemplate, TInt aVariety, TAknWindowLineLayout& aWindowLayout, TBool aLandscapeOrientation ); |
252 TSize GetLCTSize( const TDesC8& aLCTTemplate, TInt aVariety, TAknWindowLineLayout& aWindowLayout, TBool aLandscapeOrientation ); |
253 |
253 |
254 /** |
254 /** |
255 * Clean the cache |
255 * Clean the cache |
256 * |
256 * |
257 * @since S60 v3.0 |
257 * @since S60 v3.0 |
258 */ |
258 */ |
259 void CleanAndClearCache( ); |
259 void CleanAndClearCache( ); |
260 |
260 |
261 /** |
261 /** |
262 * The template content is loaded. LCT templates have highest priority. |
262 * The template content is loaded. LCT templates have highest priority. |
263 * If there is no LCT template, a custom template is loaded. |
263 * If there is no LCT template, a custom template is loaded. |
264 * |
264 * |
265 * @since S60 v3.0 |
265 * @since S60 v3.0 |
266 * @param aTemplate The current template for the item. |
266 * @param aTemplate The current template for the item. |
267 * @param aWidgetType The widget type. |
267 * @param aWidgetType The widget type. |
268 * @param aMmTemplateType Type of template (LCT/custom). |
268 * @param aMmTemplateType Type of template (LCT/custom). |
269 * |
269 * |
270 * @return Template content. |
270 * @return Template content. |
271 */ |
271 */ |
272 HBufC8* GetTemplateContentL( const TDesC8& aTemplate, TMmWidgetType aWidgetType, TMmTemplateType& aMmTemplateType ); |
272 HBufC8* GetTemplateContentL( const TDesC8& aTemplate, TMmWidgetType aWidgetType, TMmTemplateType& aMmTemplateType ); |
273 |
273 |
274 /** |
274 /** |
275 * Sets scrollbar visibility so template library is aware. |
275 * Sets scrollbar visibility so template library is aware. |
276 * |
276 * |
277 * @since S60 v3.0 |
277 * @since S60 v3.0 |
278 * @param aIsScrollbarVisible Is scrollbar visible. |
278 * @param aIsScrollbarVisible Is scrollbar visible. |
279 */ |
279 */ |
280 void SetScrollbarVisibilityL( TBool aIsScrollbarVisible ); |
280 void SetScrollbarVisibilityL( TBool aIsScrollbarVisible ); |
281 |
281 |
282 /** |
282 /** |
283 * Gets scrollbar visibility. |
283 * Gets scrollbar visibility. |
284 * |
284 * |
285 * @since S60 v3.0 |
285 * @since S60 v3.0 |
286 * @return Is scrollbar visible. |
286 * @return Is scrollbar visible. |
287 */ |
287 */ |
288 TBool GetScrollbarVisibility(); |
288 TBool GetScrollbarVisibility(); |
289 |
289 |
290 /** |
|
291 * Sets the current zoom so template library can retrieve the appropriate templates. |
|
292 * |
|
293 * @since S60 v3.0 |
|
294 * @param aZoom Is The current zoom to be set. |
|
295 */ |
|
296 void SetZoom( TAknUiZoom aZoom = EAknUiZoomAutomatic ); |
|
297 |
|
298 /** |
290 /** |
299 * Sets the scrollbar width so template library can calculate the width of the item correctly. |
291 * Sets the scrollbar width so template library can calculate the width of the item correctly. |
300 * |
292 * |
301 * @since S60 v3.0 |
293 * @since S60 v3.0 |
302 * @param aScrollbarWidth The current width of the scrollbar. |
294 * @param aScrollbarWidth The current width of the scrollbar. |
303 */ |
295 */ |
304 void SetScrollbarWidthL( TInt aScrollbarWidth ); |
296 void SetScrollbarWidthL( TInt aScrollbarWidth ); |
305 |
297 |
306 /** |
298 /** |
307 * Gets scrollbar width. |
299 * Gets scrollbar width. |
308 * |
300 * |
309 * @since S60 v3.0 |
301 * @since S60 v3.0 |
310 * @return scrollbar width |
302 * @return scrollbar width |
311 */ |
303 */ |
312 TInt ScrollbarWidth(); |
304 TInt ScrollbarWidth(); |
313 |
305 |
314 /** |
306 /** |
315 * Gets the parent rect for given orientation from which templates were calculated. |
307 * Gets the parent rect for given orientation from which templates were calculated. |
316 * |
308 * |
317 * @since S60 v3.0 |
309 * @since S60 v3.0 |
318 * @param aLandscapeOrientation The current landscape orientation. |
310 * @param aLandscapeOrientation The current landscape orientation. |
319 * @return Parent rect for given orientation. |
311 * @return Parent rect for given orientation. |
320 */ |
312 */ |
321 TRect GetParentRect( TBool aLandscapeOrientation ); |
313 TRect GetParentRect( TBool aLandscapeOrientation ); |
322 |
314 |
323 private: |
315 private: |
324 /** |
316 /** |
325 * Get the lookup text. |
317 * Get the lookup text. |
326 * |
318 * |
327 * @since S60 v3.0 |
319 * @since S60 v3.0 |
328 * @param aTemplate The current template for the item. |
320 * @param aTemplate The current template for the item. |
329 * @param aWidgetType The widget type. |
321 * @param aWidgetType The widget type. |
330 * @param aLandscapeOrientation Is view in landscape orientation. |
322 * @param aLandscapeOrientation Is view in landscape orientation. |
331 * @param aHighlighted Is item highlighted. |
323 * @param aHighlighted Is item highlighted. |
332 * |
324 * |
333 * @return Lookup text. |
325 * @return Lookup text. |
334 */ |
326 */ |
335 HBufC8* LookupText( const TDesC8& aTemplate, TMmWidgetType aWidgetType, |
327 HBufC8* LookupText( const TDesC8& aTemplate, TMmWidgetType aWidgetType, |
336 TAknUiZoom aZoom, TBool aLandscapeOrientation = EFalse, |
328 TBool aLandscapeOrientation = EFalse, |
337 TBool aHighlighted = EFalse ); |
329 TBool aHighlighted = EFalse ); |
338 |
330 |
339 /** |
331 /** |
340 * Get the lookup text for layout size. |
332 * Get the lookup text for layout size. |
341 * |
333 * |
342 * @since S60 v3.0 |
334 * @since S60 v3.0 |
343 * @param aWidgetType The widget type. |
335 * @param aWidgetType The widget type. |
344 * @param aTemplate The current template for the item. |
336 * @param aTemplate The current template for the item. |
345 * @param aLandscapeOrientation Is view in landscape orientation. |
337 * @param aLandscapeOrientation Is view in landscape orientation. |
346 * |
338 * |
347 * @return lookup layout text. |
339 * @return lookup layout text. |
348 */ |
340 */ |
349 HBufC8* LookupLayoutText( TMmWidgetType aWidgetType, TAknUiZoom aZoom, |
341 HBufC8* LookupLayoutText( TMmWidgetType aWidgetType, |
350 const TDesC8& aTemplate, TBool aLandscapeOrientation ); |
342 const TDesC8& aTemplate, |
351 |
343 TBool aLandscapeOrientation ); |
|
344 |
352 /** |
345 /** |
353 * Get the lookup text for move indicator. |
346 * Get the lookup text for move indicator. |
354 * |
347 * |
355 * @since S60 v3.0 |
348 * @since S60 v3.0 |
356 * @param aLookupText The lookup text to be used to create the lookup indicator text. |
349 * @param aLookupText The lookup text to be used to create the lookup indicator text. |
357 * @return lookup Indicator text. |
350 * @return lookup Indicator text. |
358 */ |
351 */ |
359 HBufC8* LookupIndicatorText( const TDesC8& aLookupText ); |
352 HBufC8* LookupIndicatorText( const TDesC8& aLookupText ); |
360 |
353 |
361 /** |
354 /** |
362 * Load the template to cache. |
355 * Load the template to cache. |
363 * |
356 * |
364 * @since S60 v3.0 |
357 * @since S60 v3.0 |
365 * @param aWidgetType The widget type. |
358 * @param aWidgetType The widget type. |
366 * @param aTemplate The current template for the item. |
359 * @param aTemplate The current template for the item. |
367 * @param aLandscapeOrientation The current orientation. |
360 * @param aLandscapeOrientation The current orientation. |
368 */ |
361 */ |
369 void LoadTemplateL( TMmWidgetType aWidgetType, const TDesC8& aTemplate, |
362 void LoadTemplateL( TMmWidgetType aWidgetType, const TDesC8& aTemplate, |
370 TBool aLandscapeOrientation ); |
363 TBool aLandscapeOrientation ); |
371 |
364 |
372 /** |
365 /** |
373 * Get template file content. |
366 * Get template file content. |
374 * |
367 * |
375 * @since S60 v3.0 |
368 * @since S60 v3.0 |
376 * @param aContent Descriptor to which the file content should be set. |
369 * @param aContent Descriptor to which the file content should be set. |
377 * @param aTemplate The current template for the item. |
370 * @param aTemplate The current template for the item. |
378 * @param aWidgetType The widget type. |
371 * @param aWidgetType The widget type. |
379 * @param aMmTemplateType Type of template (LCT/custom). |
372 * @param aMmTemplateType Type of template (LCT/custom). |
380 * @param aLoadCustomTemplate Value to be set depending on template type loaded (LCT/custom). |
373 * @param aLoadCustomTemplate Value to be set depending on template type loaded (LCT/custom). |
381 */ |
374 */ |
382 void GetTemplateFileContentL (HBufC8*& aContent, const TDesC8& aTemplate, |
375 void GetTemplateFileContentL (HBufC8*& aContent, const TDesC8& aTemplate, |
383 TMmWidgetType aWidgetType, TMmTemplateType& aMmTemplateType, |
376 TMmWidgetType aWidgetType, TMmTemplateType& aMmTemplateType, |
384 TBool aLoadCustomTemplate = EFalse); |
377 TBool aLoadCustomTemplate = EFalse); |
385 |
378 |
386 /** |
379 /** |
387 * Process xml element. |
380 * Process xml element. |
388 * |
381 * |
389 * @since S60 v3.0 |
382 * @since S60 v3.0 |
390 * @param aMmTemplateType Type of template (LCT/custom). |
383 * @param aMmTemplateType Type of template (LCT/custom). |
391 * @param aElement Element ( xml ). |
384 * @param aElement Element ( xml ). |
392 * @param aTemplate The current template for the item. |
385 * @param aTemplate The current template for the item. |
393 * @param aLandscapeOrientation Is view in landscape orientation. |
386 * @param aLandscapeOrientation Is view in landscape orientation. |
394 * @param aHighlighted Is item highlighted. |
387 * @param aHighlighted Is item highlighted. |
395 * |
388 * |
396 */ |
389 */ |
397 void ProcessElementL (TMmTemplateType aMmTemplateType, |
390 void ProcessElementL (TMmTemplateType aMmTemplateType, |
398 TXmlEngElement aElement, const TDesC8& aTemplate, |
391 TXmlEngElement aElement, const TDesC8& aTemplate, |
399 TBool aLandscapeOrientation, TBool aHighlighted); |
392 TBool aLandscapeOrientation, TBool aHighlighted); |
400 |
393 |
401 /** |
394 /** |
402 * Process the LCT template. |
395 * Process the LCT template. |
403 * |
396 * |
404 * @since S60 v3.0 |
397 * @since S60 v3.0 |
405 * @param aElement Element (xml). |
398 * @param aElement Element (xml). |
406 * @param aTemplate The current template for the item. |
399 * @param aTemplate The current template for the item. |
407 * @param aLandscapeOrientation Is view in landscape orientation. |
400 * @param aLandscapeOrientation Is view in landscape orientation. |
408 * @param aHighlighted Is item highlighted. |
401 * @param aHighlighted Is item highlighted. |
409 */ |
402 */ |
410 void ProcessLCTTemplateElementL( TXmlEngElement aElement, |
403 void ProcessLCTTemplateElementL( TXmlEngElement aElement, |
411 const TDesC8& aTemplate, |
404 const TDesC8& aTemplate, |
412 TBool aLandscapeOrientation, |
405 TBool aLandscapeOrientation, |
413 TBool aHighlighted ); |
406 TBool aHighlighted ); |
414 |
407 |
415 /** |
408 /** |
416 * Process the custom template. |
409 * Process the custom template. |
417 * |
410 * |
418 * @since S60 v3.0 |
411 * @since S60 v3.0 |
419 * @param aElement Element (xml) |
412 * @param aElement Element (xml) |
420 * @param aTemplate The current template for the item. |
413 * @param aTemplate The current template for the item. |
421 * @param aLandscapeOrientation Is view in landscape orientation. |
414 * @param aLandscapeOrientation Is view in landscape orientation. |
422 * @param aHighlighted Is item highlighted. |
415 * @param aHighlighted Is item highlighted. |
423 */ |
416 */ |
424 void ProcessCustomTemplateElementL( TXmlEngElement aElement, |
417 void ProcessCustomTemplateElementL( TXmlEngElement aElement, |
425 const TDesC8& aTemplate, |
418 const TDesC8& aTemplate, |
426 TBool aLandscapeOrientation, |
419 TBool aLandscapeOrientation, |
427 TBool aHighlighted ); |
420 TBool aHighlighted ); |
428 |
421 |
429 /** |
422 /** |
430 * Setup LCT template data. |
423 * Setup LCT template data. |
431 * |
424 * |
432 * @since S60 v3.0 |
425 * @since S60 v3.0 |
433 * @param aChildTemplate Template where the data should be set up. |
426 * @param aChildTemplate Template where the data should be set up. |
434 * @param aChildElement Element (xml). |
427 * @param aChildElement Element (xml). |
435 * @param aItemSize Item size. |
428 * @param aItemSize Item size. |
436 */ |
429 */ |
437 void SetupLCTTemplateL(TTemplateChild& aChildTemplate, TXmlEngElement& aChildElement, TSize aItemSize ); |
430 void SetupLCTTemplateL(TTemplateChild& aChildTemplate, TXmlEngElement& aChildElement, TSize aItemSize ); |
438 |
431 |
439 /** |
432 /** |
440 * Setup custom template. |
433 * Setup custom template. |
441 * |
434 * |
442 * @since S60 v3.0 |
435 * @since S60 v3.0 |
443 * @param aChildTemplate Template where the data should be set up. |
436 * @param aChildTemplate Template where the data should be set up. |
444 * @param aChildElement Element (xml). |
437 * @param aChildElement Element (xml). |
445 */ |
438 */ |
446 void SetupCustomTemplateL(TTemplateChild& aChildTemplate, TXmlEngElement& aChildElement ); |
439 void SetupCustomTemplateL(TTemplateChild& aChildTemplate, TXmlEngElement& aChildElement ); |
447 |
440 |
448 /** |
441 /** |
449 * Set the template visual id. |
442 * Set the template visual id. |
450 * |
443 * |
451 * @since S60 v3.0 |
444 * @since S60 v3.0 |
452 * @param aChildTemplate Template data. |
445 * @param aChildTemplate Template data. |
453 */ |
446 */ |
454 void SetupTemplateVisualId(TTemplateChild& aChildTemplate ); |
447 void SetupTemplateVisualId(TTemplateChild& aChildTemplate ); |
455 |
448 |
456 /** |
449 /** |
457 * Setup the item children template data for move indicator and cache the data. |
450 * Setup the item children template data for move indicator and cache the data. |
458 * |
451 * |
459 * @since S60 v3.0 |
452 * @since S60 v3.0 |
460 * @param aLookupString Lookup string. |
453 * @param aLookupString Lookup string. |
461 * @param aItemSize Item size. |
454 * @param aItemSize Item size. |
462 */ |
455 */ |
463 void SetupMoveIndicatorTemplateChildrenL( const TDesC8& aLookupString, TSize aItemSize ); |
456 void SetupMoveIndicatorTemplateChildrenL( const TDesC8& aLookupString, TSize aItemSize ); |
464 |
457 |
465 /** |
458 /** |
466 * Adjusts the item size loaded to template cache according to layout size and orientation. |
459 * Adjusts the item size loaded to template cache according to layout size and orientation. |
467 * This method adjusts the item width so that items occupy the view correctly. |
460 * This method adjusts the item width so that items occupy the view correctly. |
468 * |
461 * |
469 * @since S60 v3.0 |
462 * @since S60 v3.0 |
470 * @param aSize The size of the item to be adjusted. |
463 * @param aSize The size of the item to be adjusted. |
471 * @param aLayoutSize The layout of the widget e.g 3x4 |
464 * @param aLayoutSize The layout of the widget e.g 3x4 |
472 * @param aLandscapeOrientation The orientation of the template being processed. |
465 * @param aLandscapeOrientation The orientation of the template being processed. |
473 */ |
466 */ |
474 void AdjustItemWidth( TSize& aSize, TSize aLayoutSize, TBool aLandscapeOrientation ); |
467 void AdjustItemWidth( TSize& aSize, TSize aLayoutSize, TBool aLandscapeOrientation ); |
475 |
468 |
476 /** |
469 /** |
477 * Updates the parent rect according to orientation. |
470 * Updates the parent rect according to orientation. |
478 * |
471 * |
479 * @since S60 v3.0 |
472 * @since S60 v3.0 |
480 * @param aParentRect The current parent rectangle. |
473 * @param aParentRect The current parent rectangle. |
481 * @param aLandscapeOrientation The current orientation. |
474 * @param aLandscapeOrientation The current orientation. |
482 */ |
475 */ |
483 void UpdateParentRect( TRect aParentRect, TBool aLandscapeOrientation ); |
476 void UpdateParentRect( TRect aParentRect, TBool aLandscapeOrientation ); |
484 |
477 |
485 /** |
478 /** |
486 * Sets the parent rect for given orientation. |
479 * Sets the parent rect for given orientation. |
487 * |
480 * |
488 * @since S60 v3.0 |
481 * @since S60 v3.0 |
489 * @param aLandscapeOrientation Orientation for which parent rect shoul be set. |
482 * @param aLandscapeOrientation Orientation for which parent rect shoul be set. |
490 * @param aParentRect The parent rect of current orientation. |
483 * @param aParentRect The parent rect of current orientation. |
491 */ |
484 */ |
492 void SetParentRect( TBool aLandscapeOrientation, TRect aParentRect); |
485 void SetParentRect( TBool aLandscapeOrientation, TRect aParentRect); |
493 |
486 |
494 /** |
487 /** |
495 * Appends the edit mode template (backdrop icon) to the array of template children passed to the item drawer for drawing. |
488 * Appends the edit mode template (backdrop icon) to the array of template children passed to the item drawer for drawing. |
496 * |
489 * |
497 * @since S60 v3.0 |
490 * @since S60 v3.0 |
498 * @param aTemplateArray The template array to which the edit mode template is appended. |
491 * @param aTemplateArray The template array to which the edit mode template is appended. |
499 * @param aSize The size of the item for which the edit mode template should be calculated. |
492 * @param aSize The size of the item for which the edit mode template should be calculated. |
500 */ |
493 */ |
501 void AppendEditModeTemplateL( RArray< TTemplateChild >& aTemplateArray, TSize aSize ); |
494 void AppendEditModeTemplateL( RArray< TTemplateChild >& aTemplateArray, TSize aSize ); |
502 |
495 |
503 /** |
496 /** |
504 * Adjusts the item size according to layout, LCT item size and orientation. |
497 * Adjusts the item size according to layout, LCT item size and orientation. |
505 * |
498 * |
506 * @since S60 v3.0 |
499 * @since S60 v3.0 |
507 * @param aItemSize The LCT item size. |
500 * @param aItemSize The LCT item size. |
508 * @param aLayoutSize The layout size to be used to calculate item size. |
501 * @param aLayoutSize The layout size to be used to calculate item size. |
509 * @param aLandscapeOrientation The orientation for which the template is loaded. |
502 * @param aLandscapeOrientation The orientation for which the template is loaded. |
510 */ |
503 */ |
511 void AdjustItemSize(TSize& aItemSize, TSize aLayoutSize, TBool aLandscapeOrientation ); |
504 void AdjustItemSize(TSize& aItemSize, TSize aLayoutSize, TBool aLandscapeOrientation ); |
512 |
505 |
513 /** |
|
514 * Get the current zoom for displaying templates. |
|
515 * |
|
516 * @since S60 v3.0 |
|
517 * @return The current zoom. |
|
518 */ |
|
519 TAknUiZoom Zoom( ); |
|
520 |
|
521 /** |
506 /** |
522 * Caches the layout size |
507 * Caches the layout size |
523 * |
508 * |
524 * @since S60 v3.0 |
509 * @since S60 v3.0 |
525 * @param aLayoutSize The layout size to ba cached. |
510 * @param aLayoutSize The layout size to ba cached. |
526 * @param aTemplate The template for the cached layout size. |
511 * @param aTemplate The template for the cached layout size. |
527 * @param aLandscapeOrientation The orientation for which the template is loaded. |
512 * @param aLandscapeOrientation The orientation for which the template is loaded. |
528 * @return The current zoom. |
|
529 */ |
513 */ |
530 void CacheLayoutSizeL( TSize aLayoutSize, const TDesC8& aTemplate, TBool aLandscapeOrientation ); |
514 void CacheLayoutSizeL( TSize aLayoutSize, const TDesC8& aTemplate, TBool aLandscapeOrientation ); |
531 |
515 |
532 /** |
516 /** |
533 * Adjusts icon's align to layout (left, center, right). |
517 * Adjusts icon's align to layout (left, center, right). |
534 * |
518 * |
535 * @since S60 v5.0 |
519 * @since S60 v5.0 |
536 * @param aParentSize The LCT parent item size. |
520 * @param aParentSize The LCT parent item size. |
537 * @param aTemplateChild Template data. |
521 * @param aTemplateChild Template data. |
538 */ |
522 */ |
539 void AdjustIconPosition(TSize aParentSize, |
523 void AdjustIconPosition(TSize aParentSize, |