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-37E8A48E-09B8-5958-9263-B33EDAE3F7C6-GENID-1-8-1-6-1-1-4-1-6-1-3-1" xml:lang="en"><title>UI |
|
13 Control Framework Overview</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <section id="GUID-4DB4AA3B-1CC9-4829-9146-B07BBDDEBAC5-GENID-1-8-1-6-1-1-4-1-6-1-3-1-2-1"><title>Architectural |
|
15 relationships</title> <p>The control framework provides an abstract middle |
|
16 layer between the low-level windowing functionality, provided by the Window |
|
17 Server, and concrete user interface classes provided by UIKON and UI variant-specific |
|
18 libraries. </p> <p>Application developers use the API directly to create their |
|
19 own controls and indirectly through derived classes provided by UIKON and |
|
20 AVKON. </p> <fig id="GUID-DD81BA7E-07D0-53C7-9B42-7BE263CC82D3-GENID-1-8-1-6-1-1-4-1-6-1-3-1-2-1-4"> |
|
21 <title> Cone architectural relationships </title> |
|
22 <image href="GUID-63BB9C30-9103-5900-9FD7-5B45FD78A5D7_d0e51074_href.png" placement="inline"/> |
|
23 </fig> </section> |
|
24 <section id="GUID-9A9F72A2-0CA0-488A-91DE-35FD0A88B6CD-GENID-1-8-1-6-1-1-4-1-6-1-3-1-2-2"><title>Description</title> <p><b>Controls</b> </p> <p>A |
|
25 control is a rectangular area of a window that may respond to user input. |
|
26 Controls have a number of properties that determine their behavior and their |
|
27 relationships to other controls and windows. </p> <p>A control is represented |
|
28 by the class <xref href="GUID-B06F99BD-F032-3B87-AB26-5DD6EBE8C160.dita"><apiname>CCoeControl</apiname></xref>. </p> <p>A <b>simple control</b> is |
|
29 one which contains no other controls. </p> <p>A <b>container control</b> is |
|
30 one which contains one or more controls. A container control is also referred |
|
31 to as a <b>compound control</b>. The contained controls may themselves be |
|
32 container controls. When a control is contained in a container control it |
|
33 is called a <b>component control</b>. A component control is always redrawn |
|
34 when its container control is redrawn. </p> <p>The following diagram shows |
|
35 simple controls in orange and container controls in grey. </p> <fig id="GUID-771A429A-B61E-5C45-83A9-4B9F76C40FB9-GENID-1-8-1-6-1-1-4-1-6-1-3-1-2-2-8"> |
|
36 <title> Simple and compound controls </title> |
|
37 <image href="GUID-8B37A2C7-B4DB-5826-B6C2-3C21012EF9EA_d0e51123_href.png" placement="inline"/> |
|
38 </fig> <p><b>Controls and Windows </b> </p> <p>A window may be considered |
|
39 as a transparent layer. Windows are managed by the Window Server and described <xref href="GUID-0C4B86B5-530A-5839-86C1-46E7ABE281E0.dita">elsewhere</xref>. A control |
|
40 provides a means of access to a window - it can be drawn onto the window and |
|
41 can receive input. </p> <p>Each window has a one-to-one relationship with |
|
42 a single control that covers it precisely. This control is referred to as |
|
43 a <b>window-owning control</b>. A window-owning control shares the behavior |
|
44 of its window, in particular the parent-child window relationships which govern |
|
45 the window's position and overlapping behavior. </p> <p>A <b>non-window-owning |
|
46 control</b> typically covers only part of a window. It cannot be moved around |
|
47 on the screen independently of its window, cannot draw outside its window |
|
48 and is always a component control. </p> <p>You might think of a window-owning |
|
49 control as a piece of glass and a non-window-owning control as a sticker on |
|
50 a window-owning control. </p> <p><b>Application User Interface (AppUi) framework</b> </p> <p>The |
|
51 application user interface framework provides support for the distribution |
|
52 of key events to an application's controls. It maintains a control stack to |
|
53 which an application must add all the top-level container controls that it |
|
54 wishes to handle key events, setting a priority for each. When a key event |
|
55 occurs, the framework offers it to each control on the stack in priority order |
|
56 until it is consumed. </p> <p>The application user interface framework is |
|
57 provided by the base class <xref href="GUID-3AC2CDAC-0291-309F-A020-049BC9F2CF90.dita"><apiname>CCoeAppUi</apiname></xref>. UIKON and UI variants |
|
58 specialize <codeph>CCoeAppUi</codeph> further. Applications derive from the |
|
59 variant AppUi. </p> <p> <xref href="GUID-3AC2CDAC-0291-309F-A020-049BC9F2CF90.dita"><apiname>CCoeAppUi</apiname></xref> provides a simplified |
|
60 interface to the <xref href="GUID-830E40D0-7DEE-5EFB-BCC6-EC0AA7FF7A02.dita">View |
|
61 Server</xref> which enables seamless switching between different views across |
|
62 various applications. </p> <p><b>Control Environment (CoeEnv)</b> </p> <p>The |
|
63 Control Environment simplifies the interface to the Window Server and provides |
|
64 an environment for creating controls. It is a single instance (a singleton) |
|
65 of the class <xref href="GUID-12A9389D-363B-3F54-857F-89EE0EDCDF40.dita"><apiname>CCoeEnv</apiname></xref> which encapsulates an active scheduler |
|
66 and active objects for communicating with the window server. <xref href="GUID-12A9389D-363B-3F54-857F-89EE0EDCDF40.dita"><apiname>CCoeEnv</apiname></xref> is |
|
67 created automatically by the framework and a pointer stored in Thread Local |
|
68 Storage (TLS). It is available through <xref href="GUID-B06F99BD-F032-3B87-AB26-5DD6EBE8C160.dita#GUID-B06F99BD-F032-3B87-AB26-5DD6EBE8C160/GUID-BB8AF6C8-F7C8-3478-858A-4E2C68DF1B7A"><apiname>CCoeControl::CoeEnv()</apiname></xref>, <xref href="GUID-3AC2CDAC-0291-309F-A020-049BC9F2CF90.dita#GUID-3AC2CDAC-0291-309F-A020-049BC9F2CF90/GUID-6D8B3C54-087B-36C6-81A4-E07E92AA9D72"><apiname>CCoeAppUi::CoeEnv()</apiname></xref> and |
|
69 through its own static function, <xref href="GUID-12A9389D-363B-3F54-857F-89EE0EDCDF40.dita#GUID-12A9389D-363B-3F54-857F-89EE0EDCDF40/GUID-7A9CB8EE-520A-30E2-BA54-5BEFBB56717F"><apiname>CCoeEnv::Static()</apiname></xref>, which |
|
70 is less efficient. </p> <p>The control environment also provides simplified |
|
71 access to drawing functions, fonts, and resource files which are used by most |
|
72 applications. </p> </section> |
|
73 <section id="GUID-060D338D-BADE-46A6-B7B1-DB28F07B39D3-GENID-1-8-1-6-1-1-4-1-6-1-3-1-2-3"><title>See also</title> <ul> |
|
74 <li><p><xref href="GUID-1C802DBD-1453-5C69-94D5-FB0229C544D6.dita">Uikon Overview</xref></p></li> |
|
75 <li><p><xref href="GUID-830E40D0-7DEE-5EFB-BCC6-EC0AA7FF7A02.dita">View Server |
|
76 Overview</xref></p></li> |
|
77 <li><p><xref href="GUID-0C4B86B5-530A-5839-86C1-46E7ABE281E0.dita">Window Server</xref></p></li> |
|
78 <li><p><xref href="GUID-EEAB5A2F-AD1F-57B9-98AA-20DEEA23C3C2.dita">Asynchronous |
|
79 Programming (active scheduler & active objects)</xref></p></li> |
|
80 </ul></section> |
|
81 </conbody></concept> |
|