|
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-68B999C2-0993-4804-9624-42C3D88BE5C7" xml:lang="en"><title>View |
|
13 architecture</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <p>The following image illustrates the components of the view architecture |
|
15 approach.</p> |
|
16 <fig id="GUID-A4D968BE-B048-424C-94B5-FAAA7B14C5D5"><title>View architecture classes</title><image href="GUID-2B50C6B1-E1E8-44E6-840B-7FAA206E6C26_d0e44021_href.png"/></fig> |
|
17 <p>Symbian platform applications that follow the view architecture require:</p> |
|
18 <ul> |
|
19 <li><p>a <xref href="GUID-FD2CDEB8-0784-4BE5-A775-170F57D71BBC.dita">UI |
|
20 controller</xref> derived from <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknViewAppUi.html" format="application/java-archive"><parmname>CAknViewAppUi</parmname></xref></p> |
|
21 </li> |
|
22 <li><p>a <xref href="GUID-DAC32BB9-C0EB-42FF-A596-C2F1A90A4BD7.dita">view |
|
23 controller</xref> derived from <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknView.html" format="application/java-archive"><parmname>CAknView</parmname></xref></p> |
|
24 </li> |
|
25 <li><p>a <xref href="GUID-DAC32BB9-C0EB-42FF-A596-C2F1A90A4BD7.dita">view</xref> or |
|
26 views derived from <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Control_Environment/CCoeControlClass.html" format="application/java-archive"><parmname>CCoeControl</parmname></xref></p> |
|
27 </li> |
|
28 </ul> |
|
29 <p>The view architecture only allows one view to be active in each application. |
|
30 If a new view is switched to within an application, the current view is immediately |
|
31 deactivated, so this architectural approach is <i>not</i> appropriate in the |
|
32 following cases:</p> |
|
33 <ul> |
|
34 <li><p>Applications with any view that cannot cleanly handle unexpected |
|
35 activation of another view in that application.</p></li> |
|
36 <li><p>Applications that provide views that can be nested over other |
|
37 applications, except where embedding is used.</p></li> |
|
38 <li><p>Applications that provide controls that can be used inside |
|
39 other applications (for example, using a Web control inside an e-mail viewer |
|
40 to show an e‑mail with HTML content).</p></li> |
|
41 </ul> |
|
42 <p>Typical responsibilities in this architecture are:</p> |
|
43 <ul> |
|
44 <li><p><xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknViewAppUi.html" format="application/java-archive"><parmname>CAknViewAppUi</parmname></xref>-derived |
|
45 class acts as a <xref href="GUID-FD2CDEB8-0784-4BE5-A775-170F57D71BBC.dita">UI |
|
46 controller</xref>:</p> |
|
47 <itemgroup> |
|
48 <ul> |
|
49 <li><p>It creates one or more <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknView.html" format="application/java-archive"><parmname>CAknView</parmname></xref>-derived |
|
50 view controllers.</p></li> |
|
51 <li><p>It handles <xref href="GUID-EF7FF39E-929F-4767-B475-5D582D37BB32.dita">events</xref> that |
|
52 are not handled by the view controllers.</p></li> |
|
53 <li><p>To switch between views, it activates and deactivates views.</p> |
|
54 </li> |
|
55 <li><p>It handles menu <xref href="GUID-4941C035-C359-4968-9BD5-31F44EE5F810.dita">commands</xref> passed |
|
56 to it by the view controllers.</p></li> |
|
57 <li><p>It receives events such as <xref href="GUID-DD15F24B-0786-4531-A6C5-A5E70EBE2732.dita">layout</xref> and <xref href="GUID-3B441CDC-AB7A-4D8D-A595-57C21E1D426C.dita">foreground</xref> notifications |
|
58 from the run-time environment.</p></li> |
|
59 </ul> |
|
60 </itemgroup> |
|
61 </li> |
|
62 <li><p><xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknView.html" format="application/java-archive"><parmname>CAknView</parmname></xref>-derived |
|
63 class acts as a <xref href="GUID-FD2CDEB8-0784-4BE5-A775-170F57D71BBC.dita">view |
|
64 controller</xref></p> |
|
65 <itemgroup> |
|
66 <ul> |
|
67 <li><p>It creates one of more <xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Control_Environment/CCoeControlClass.html" format="application/java-archive"><parmname>CCoeControl</parmname></xref>-derived |
|
68 views.</p></li> |
|
69 <li><p>It handles registering controls for <xref href="GUID-E402616A-7ED8-45AC-B836-99C3A3760B33.dita">key |
|
70 event handling</xref>.</p></li> |
|
71 <li><p>It handles menu <xref href="GUID-4941C035-C359-4968-9BD5-31F44EE5F810.dita">commands</xref>.</p> |
|
72 </li> |
|
73 </ul> |
|
74 </itemgroup> |
|
75 </li> |
|
76 <li><p><xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Control_Environment/CCoeControlClass.html" format="application/java-archive"><parmname>CCoeControl</parmname></xref>-derived |
|
77 view:</p> |
|
78 <itemgroup> |
|
79 <ul> |
|
80 <li><p>Shows application data and state on the screen.</p></li> |
|
81 </ul> |
|
82 </itemgroup> |
|
83 </li> |
|
84 </ul> |
|
85 <p>For information on the <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknApplication.html" format="application/java-archive"><parmname>CAknApplication</parmname></xref> and <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknDocument.html" format="application/java-archive"><parmname>CAknDocument</parmname></xref>-derived |
|
86 classes, see <xref href="GUID-BDDDF68F-F7C3-43AF-8B6C-C77C701FD2A9.dita">Framework |
|
87 requirements for GUI applications</xref>.</p> |
|
88 </conbody></concept> |