Symbian3/SDK/Source/GUID-352850A9-227F-45DB-8DCD-C6268954B4ED.dita
changeset 0 89d6a7a84779
equal deleted inserted replaced
-1:000000000000 0:89d6a7a84779
       
     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-352850A9-227F-45DB-8DCD-C6268954B4ED" xml:lang="en"><title>Window
       
    13 owning and non-window owning controls</title><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    14 <section id="GUID-A403D2F8-7ED3-4DE6-92E8-4B16CC646CA6"><title>Window-owning
       
    15 controls</title>
       
    16 <p>Window-owning controls have the same size and position as a window in
       
    17 the display. Each window has a one-to-one relationship with the control that
       
    18 covers it, and shares its behavior with that control.</p>
       
    19 <p>Examples of window-owning controls include:</p>
       
    20 <ul>
       
    21 <li><p>top-level control in <xref href="GUID-B5DE1C86-2B16-4B22-887F-7079E54A8ED6.dita">Traditional
       
    22 Symbian architecture</xref></p></li>
       
    23 <li><p>the subpanes in the status pane</p></li>
       
    24 <li><p>pop-up windows, when a sense of layering is required</p>
       
    25 </li>
       
    26 </ul>
       
    27 <p>The following code snippet is an example of the second phase construction
       
    28 of a window-owning control:</p>
       
    29 <codeblock id="GUID-234E4AC3-2FC8-4AD9-8B72-0FBA478E1D5A" xml:space="preserve">CMyControl::ConstructL()
       
    30     {
       
    31     CreateWindowL();    // This makes the control window- 
       
    32                         // owning
       
    33     SetRectL(ClientRect()); // This sets the control’s 
       
    34                             // size
       
    35     ActivateL();        // This must be called before
       
    36                         // the control can be drawn
       
    37     }
       
    38 </codeblock>
       
    39 <p><parmname>ClientRect()</parmname> returns the screen area available
       
    40 to the application for drawing. This typically does not include the space
       
    41 that is reserved for the status/control panes.</p>
       
    42 <p>For more information, see <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/guide/Application-Framework-subsystem-guide/UIControlFrameworkGuide/UIControlFrameworkGuide2/RunTimeControlHierarchy.guide.html#ApplicationFrameworkOverview%2eUIControlFrameworkGuide2%2ehierarchy" format="application/java-archive">The run-time control hierarchy</xref></p>
       
    43 </section>
       
    44 <section id="GUID-13D754E5-EBCF-4058-B3B3-05505289953B"><title>Non-window-owning
       
    45 controls</title>
       
    46 <p>Non-window-owning controls typically cover only part of a window on
       
    47 the display, and must be contained in window-owning controls. They are faster
       
    48 and require fewer resources than window-owning controls.</p>
       
    49 <p>Examples of non-window-owning controls include:</p>
       
    50 <ul>
       
    51 <li><p>command buttons</p></li>
       
    52 <li><p>edit windows</p></li>
       
    53 <li><p>labels</p></li>
       
    54 </ul>
       
    55 <p>Non-window-owning controls are assigned to window-owning controls by
       
    56 calling <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Control_Environment/CCoeControlClass.html#%3a%3aCCoeControl%3a%3aSetContainerWindowL%28RBackedUpWindow%20%26amp%3b%29" format="application/java-archive"><parmname>CCoeControl::SetContainerWindowL</parmname></xref> when the
       
    57 control is constructed.</p>
       
    58 <p>For more information, see <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/guide/Application-Framework-subsystem-guide/UIControlFrameworkGuide/UIControlFrameworkGuide2/RunTimeControlHierarchy.guide.html#ApplicationFrameworkOverview%2eUIControlFrameworkGuide2%2ehierarchy" format="application/java-archive">The run-time control hierarchy</xref></p>
       
    59 </section>
       
    60 </conbody></concept>