|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-0387B02E-9B81-5E61-A33E-D644251424A2" xml:lang="en"><title>Layout |
|
13 management</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <p>Many factors have to be taken into consideration when laying out controls. |
|
15 Component controls are normally laid out within their containers according |
|
16 to the prevailing UI policy, skin, font, text style, zoom-factor and the sizes |
|
17 and shapes of the controls themselves. A change to any one of these might |
|
18 necessitate a new layout. </p> |
|
19 <p>The Control Framework supports run-time layout management with the <xref href="GUID-A622B8C7-60F4-38E8-B102-14883BCBA249.dita"><apiname>MCoeLayoutManager</apiname></xref> interface. |
|
20 Each compound control knows which layout manager to call when it changes size. |
|
21 The layout manager then takes responsibility for making any adjustments to |
|
22 the layout. </p> |
|
23 <p>A layout manager is associated with a compound control using: </p> |
|
24 <codeblock id="GUID-B2CAA11F-EAEF-5583-A86D-BEF8A279EF22" xml:space="preserve"> IMPORT_C virtual void SetLayoutManagerL(MCoeLayoutManager* aLayout);</codeblock> |
|
25 <p>Note that this call passes 'ownership' so the caller does not need to retain |
|
26 a pointer. A layout manager may be attached to more than one control so it |
|
27 must implement its own reference count and delete itself when the count becomes |
|
28 zero. <codeph>SetLayoutManagerL()</codeph> is also used to dissociate a layout |
|
29 manager from a control by passing either NULL or a pointer to a different |
|
30 layout manager. </p> |
|
31 <p>The Control Framework does not provide any concrete layout managers. This |
|
32 is the responsibility of the UI variant library or the application developer. </p> |
|
33 <p>Though layout managers are now built into the control framework their use |
|
34 is optional. </p> |
|
35 </conbody></concept> |