7 Nokia Corporation - initial contribution. |
7 Nokia Corporation - initial contribution. |
8 Contributors: |
8 Contributors: |
9 --> |
9 --> |
10 <!DOCTYPE concept |
10 <!DOCTYPE concept |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
12 <concept id="GUID-1D7BD70F-40A3-53FF-8150-A9CAFA4D01D8" xml:lang="en"><title>Minimal: |
12 <concept id="GUID-1D7BD70F-40A3-53FF-8150-A9CAFA4D01D8" xml:lang="en"><title>Minimal: A Minimal UI Application</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
13 A Minimal UI Application</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
13 <section id="GUID-A92B8EF3-4294-4953-A521-DC74801DBF82"><title>Download</title> <p>Click on the following link to |
14 <section><title>Download</title> <p>Click on the following link to download |
14 download the example: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-ee094a10-e9ff-41e1-9df3-61714ac82b24.zip" scope="external">Minimal.zip</xref></p><p>Click: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-ee094a10-e9ff-41e1-9df3-61714ac82b24.html" scope="peer">browse</xref> to view the example code. </p> </section> |
15 the example: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-ee094a10-e9ff-41e1-9df3-61714ac82b24.zip" scope="external">Minimal.zip</xref></p><p>Click: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-ee094a10-e9ff-41e1-9df3-61714ac82b24.html" scope="peer">browse</xref> to view the example code. </p> </section> |
15 <section id="GUID-3BFFBEFD-103D-4E51-9F1D-093DB7BD5361"><title>Description</title> <p>This example demonstrates a |
16 <section><title>Description</title> <p>This example demonstrates a minimal |
16 minimal UI application without the use of resource files. It implements |
17 UI application without the use of resource files. It implements the standard |
17 the standard classes required by the UI framework of any application; |
18 classes required by the UI framework of any application; application, document, |
18 application, document, application UI and view, all of which are implemented |
19 application UI and view, all of which are implemented minimally. </p> </section> |
19 minimally. </p> </section> |
20 <section><title> Application class</title> <p>The application class implements |
20 <section id="GUID-F7482315-D24E-4CE7-9DE1-4C40F674C554"><title> Application class</title> <p>The application class |
|
21 implements the following required functions: </p> <ul> |
|
22 <li id="GUID-EB8223E8-41E8-57BF-A02C-E3F964126342"><p><xref href="GUID-C0297A58-2E39-3211-A2B4-C334192CE2A7.dita#GUID-C0297A58-2E39-3211-A2B4-C334192CE2A7/GUID-7A74BD90-DCE5-3BE0-ADC0-B8CE2CCE51D2"><apiname>CApaApplication::CreateDocumentL(CApaProcess*)</apiname></xref> </p> </li> |
|
23 <li id="GUID-E653F464-EA55-5AF9-A3CF-559CE2FCF07A"><p><xref href="GUID-C0297A58-2E39-3211-A2B4-C334192CE2A7.dita#GUID-C0297A58-2E39-3211-A2B4-C334192CE2A7/GUID-E6593AB2-2623-3ACA-99F5-6A26AE030880"><apiname>CApaApplication::AppDllUid() |
|
24 const</apiname></xref> </p> </li> |
|
25 </ul> <p>Because the application does not use a resource file, it |
|
26 also needs to override <codeph>CEikApplication::ResourceFileName()</codeph>, to return an empty resource filename. </p> </section> |
|
27 <section id="GUID-3A0466DA-43F1-4947-8096-FD1D2254BEF3"><title>Document class</title> <p>The document class must |
|
28 implement <xref href="GUID-B33A8A56-D1BE-3E3D-B5AC-F644A5C764DB.dita#GUID-B33A8A56-D1BE-3E3D-B5AC-F644A5C764DB/GUID-37544F28-FD9A-3E11-96B8-7DA8BC84CC59"><apiname>CEikDocument::CreateAppUiL()</apiname></xref>. </p> </section> |
|
29 <section id="GUID-58A9536D-E3A9-4E37-97EE-D86AD7BABA0F"><title>Application UI class</title> <p>The app UI class implements |
21 the following required functions: </p> <ul> |
30 the following required functions: </p> <ul> |
22 <li id="GUID-EB8223E8-41E8-57BF-A02C-E3F964126342"><p> <codeph>CApaApplication::CreateDocumentL()</codeph> </p> </li> |
31 <li id="GUID-E5798DAA-50F5-5A65-B5CB-BD1E9C950952"><p>A <codeph>ConstructL()</codeph>. This must call <codeph>CEikAppUi::BaseConstructL()</codeph>. The <codeph>ENoAppResourceFile</codeph> flag is used to indicate that it has |
23 <li id="GUID-E653F464-EA55-5AF9-A3CF-559CE2FCF07A"><p> <codeph>CApaApplication::AppDllUid()</codeph> </p> </li> |
32 no resource file, and <codeph>ENoScreenFurniture</codeph> indicates |
24 </ul> <p>Because the application does not use a resource file, it also needs |
33 that it does not require any resource independent 'screen furniture', |
25 to override <codeph>CEikApplication::ResourceFileName()</codeph>, to return |
34 for example status bars. <codeph>ConstructL()</codeph> is also used |
26 an empty resource filename. </p> </section> |
35 to create any views owned by the app UI. </p> </li> |
27 <section><title>Document class</title> <p>The document class must implement <xref href="GUID-B33A8A56-D1BE-3E3D-B5AC-F644A5C764DB.dita#GUID-B33A8A56-D1BE-3E3D-B5AC-F644A5C764DB/GUID-37544F28-FD9A-3E11-96B8-7DA8BC84CC59"><apiname>CEikDocument::CreateAppUiL()</apiname></xref>. </p> </section> |
36 <li id="GUID-E233D016-0DB0-5633-9E55-2524171FF613"><p>A destructor, |
28 <section><title>Application UI class</title> <p>The app UI class implements |
37 to delete the view. </p> </li> |
29 the following required functions: </p> <ul> |
38 <li id="GUID-CAD683D3-CEC8-55C2-A59B-92B84BA9A27E"><p>A <codeph>HandleCommandL()</codeph> This app UI only handles a single command, to exit the application. </p> </li> |
30 <li id="GUID-E5798DAA-50F5-5A65-B5CB-BD1E9C950952"><p>A <codeph>ConstructL()</codeph>. |
|
31 This must call <codeph>CEikAppUi::BaseConstructL()</codeph>. The <codeph>ENoAppResourceFile</codeph> flag |
|
32 is used to indicate that it has no resource file, and <codeph>ENoScreenFurniture</codeph> indicates |
|
33 that it does not require any resource independent 'screen furniture', for |
|
34 example status bars. <codeph>ConstructL()</codeph> is also used to create |
|
35 any views owned by the app UI. </p> </li> |
|
36 <li id="GUID-E233D016-0DB0-5633-9E55-2524171FF613"><p>A destructor, to delete |
|
37 the view. </p> </li> |
|
38 <li id="GUID-CAD683D3-CEC8-55C2-A59B-92B84BA9A27E"><p>A <codeph>HandleCommandL()</codeph> This |
|
39 app UI only handles a single command, to exit the application. </p> </li> |
|
40 </ul> </section> |
39 </ul> </section> |
41 <section><title>View class</title> <p>Views are controls, derived from <xref href="GUID-B06F99BD-F032-3B87-AB26-5DD6EBE8C160.dita"><apiname>CCoeControl</apiname></xref>. |
40 <section id="GUID-2B8EBB22-2EF0-48C7-967F-6A5AB3A48F13"><title>View class</title> <p>Views are controls, derived |
42 Their main purpose is to display the application's data and to handle input. |
41 from <xref href="GUID-B06F99BD-F032-3B87-AB26-5DD6EBE8C160.dita"><apiname>CCoeControl</apiname></xref>. Their main purpose is to display |
43 This view overrides <codeph>CCoeControl::Draw()</codeph>, to display a message |
42 the application's data and to handle input. This view overrides <codeph>CCoeControl::Draw()</codeph>, to display a message in the centre |
44 in the centre of the screen rectangle. It does not handle any key or pen input. </p> </section> |
43 of the screen rectangle. It does not handle any key or pen input. </p> </section> |
45 <section><title>Class Summary</title><p><xref href="GUID-E36E2F07-09E7-32BC-BB83-14DF9232E7D9.dita"><apiname>CEikApplication</apiname></xref></p><p><xref href="GUID-B33A8A56-D1BE-3E3D-B5AC-F644A5C764DB.dita"><apiname>CEikDocument</apiname></xref></p><p><xref href="GUID-1185F595-0488-3E93-8D60-6B3A1A3AC32E.dita"><apiname>CEikAppUi</apiname></xref></p><p><xref href="GUID-B06F99BD-F032-3B87-AB26-5DD6EBE8C160.dita"><apiname>CCoeControl</apiname></xref></p></section> |
44 <section id="GUID-DDA57900-42FB-4C4B-B68B-964DD6601B44"><title>Class Summary</title><ul> |
46 <section><title>Build</title> <p>The <xref href="GUID-3100800B-B2F7-50EF-BD4C-3C345ECCB2A5.dita">Symbian |
45 <li><p><xref href="GUID-E36E2F07-09E7-32BC-BB83-14DF9232E7D9.dita"><apiname>CEikApplication</apiname></xref></p></li> |
47 build process</xref> describes how to build an application. </p> <p>The <filepath>Minimal</filepath> example |
46 <li><p><xref href="GUID-B33A8A56-D1BE-3E3D-B5AC-F644A5C764DB.dita"><apiname>CEikDocument</apiname></xref></p></li> |
48 builds an executable called <filepath>Minimal.exe</filepath> in the standard |
47 <li><p><xref href="GUID-1185F595-0488-3E93-8D60-6B3A1A3AC32E.dita"><apiname>CEikAppUi</apiname></xref></p></li> |
49 location (<filepath>\epoc32\release\winscw\</filepath> <i><build_variant></i> for |
48 <li><p><xref href="GUID-B06F99BD-F032-3B87-AB26-5DD6EBE8C160.dita"><apiname>CCoeControl</apiname></xref></p></li> |
50 CodeWarrior). Either launch the executable itself, or launch the emulator |
49 </ul></section> |
51 and then select the <filepath>Minimal</filepath> application from the Emulator's |
50 <section id="GUID-E35DE76E-896C-4127-8900-715D6381D240"><title>Build</title> <p>The <xref href="GUID-3100800B-B2F7-50EF-BD4C-3C345ECCB2A5.dita">Symbian build process</xref> describes how to build an application. </p> <p>The <filepath>Minimal</filepath> example builds an executable called <filepath>Minimal.exe</filepath> in the standard location (<filepath>\epoc32\release\winscw\</filepath> <i><build_variant></i> for CodeWarrior). Either launch the executable |
52 extras bar. </p> </section> |
51 itself, or launch the emulator and then select the <filepath>Minimal</filepath> application from the Emulator's extras bar. </p> </section> |
53 </conbody></concept> |
52 </conbody></concept> |