<?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-GENID-1-10-1-6-1-1-4-1-6-1-7-1-11-1" xml:lang="en"><title>Layoutmanagement</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 accordingto the prevailing UI policy, skin, font, text style, zoom-factor and the sizesand shapes of the controls themselves. A change to any one of these mightnecessitate 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 tothe layout. </p><p>A layout manager is associated with a compound control using: </p><codeblock id="GUID-B2CAA11F-EAEF-5583-A86D-BEF8A279EF22-GENID-1-10-1-6-1-1-4-1-6-1-7-1-11-1-2-4" 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 retaina pointer. A layout manager may be attached to more than one control so itmust implement its own reference count and delete itself when the count becomeszero. <codeph>SetLayoutManagerL()</codeph> is also used to dissociate a layoutmanager from a control by passing either NULL or a pointer to a differentlayout manager. </p><p>The Control Framework does not provide any concrete layout managers. Thisis the responsibility of the UI variant library or the application developer. </p><p>Though layout managers are now built into the control framework their useis optional. </p></conbody></concept>