|
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 platform architecture</xref></p></li> |
|
23 <li><p>the sub-panes 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>CEikAppUi::ClientRect()</parmname> returns the screen area |
|
40 available to the application for drawing. This typically does not include |
|
41 the space that is reserved for the status/control panes.</p> |
|
42 <p>For more information, see <xref href="GUID-E244744F-4837-5B46-8E37-4666A28BF0B7-GENID-1-8-1-3-1-1-7-1-7-1-5-1.dita">The |
|
43 run-time control hierarchy</xref></p> |
|
44 </section> |
|
45 <section id="GUID-13D754E5-EBCF-4058-B3B3-05505289953B"><title>Non-window-owning |
|
46 controls</title> |
|
47 <p>Non-window-owning controls typically cover only part of a window on |
|
48 the display, and must be contained in window-owning controls. They are faster |
|
49 and require fewer resources than window-owning controls.</p> |
|
50 <p>Examples of non-window-owning controls include:</p> |
|
51 <ul> |
|
52 <li><p>command buttons</p></li> |
|
53 <li><p>edit windows</p></li> |
|
54 <li><p>labels</p></li> |
|
55 </ul> |
|
56 <p>Non-window-owning controls are assigned to window-owning controls by |
|
57 calling <xref href="GUID-B06F99BD-F032-3B87-AB26-5DD6EBE8C160.dita#GUID-B06F99BD-F032-3B87-AB26-5DD6EBE8C160/GUID-A39BAD7E-BAF2-3A4B-BE4F-2A86718EB190"><apiname>CCoeControl::SetContainerWindowL()</apiname></xref> when the control |
|
58 is constructed.</p> |
|
59 <p>For more information, see <xref href="GUID-E244744F-4837-5B46-8E37-4666A28BF0B7-GENID-1-8-1-3-1-1-7-1-7-1-5-1.dita">The |
|
60 run-time control hierarchy</xref></p> |
|
61 </section> |
|
62 </conbody></concept> |