Symbian3/SDK/Source/GUID-0387B02E-9B81-5E61-A33E-D644251424A2.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 11 Jun 2010 12:39:03 +0100
changeset 8 ae94777fff8f
permissions -rw-r--r--
Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.

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