Symbian3/PDK/Source/GUID-1D7BD70F-40A3-53FF-8150-A9CAFA4D01D8.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 16 Jul 2010 17:23:46 +0100
changeset 12 80ef3a206772
parent 9 59758314f811
permissions -rw-r--r--
Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-1D7BD70F-40A3-53FF-8150-A9CAFA4D01D8" xml:lang="en"><title>Minimal: A Minimal UI Application</title><prolog><metadata><keywords/></metadata></prolog><conbody>
<section id="GUID-A92B8EF3-4294-4953-A521-DC74801DBF82"><title>Download</title> <p>Click on the following link to 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>
<section id="GUID-3BFFBEFD-103D-4E51-9F1D-093DB7BD5361"><title>Description</title> <p>This example demonstrates a minimal UI application without the
use of resource files. It implements the standard classes required
by the UI framework of any application; application, document, application
UI and view, all of which are implemented minimally. </p> </section>
<section id="GUID-F7482315-D24E-4CE7-9DE1-4C40F674C554"><title> Application
class</title> <p>The application class implements the following required
functions: </p> <ul>
<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>
<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()
const</apiname></xref>  </p> </li>
</ul> <p>Because the application does not use a resource file, it
also needs to override <codeph>CEikApplication::ResourceFileName()</codeph>, to return an empty resource filename. </p> </section>
<section id="GUID-3A0466DA-43F1-4947-8096-FD1D2254BEF3"><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>
<section id="GUID-58A9536D-E3A9-4E37-97EE-D86AD7BABA0F"><title>Application
UI class</title> <p>The app UI class implements the following required
functions: </p> <ul>
<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
no resource file, and <codeph>ENoScreenFurniture</codeph> indicates
that it does not require any resource independent 'screen furniture',
for example status bars. <codeph>ConstructL()</codeph> is also used
to create any views owned by the app UI. </p> </li>
<li id="GUID-E233D016-0DB0-5633-9E55-2524171FF613"><p>A destructor,
to delete the view. </p> </li>
<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>
</ul> </section>
<section id="GUID-2B8EBB22-2EF0-48C7-967F-6A5AB3A48F13"><title>View
class</title> <p>Views are controls, derived from <xref href="GUID-B06F99BD-F032-3B87-AB26-5DD6EBE8C160.dita"><apiname>CCoeControl</apiname></xref>. Their main purpose is to display the application's data and to
handle input. This view overrides <codeph>CCoeControl::Draw()</codeph>, to display a message in the centre of the screen rectangle. It
does not handle any key or pen input. </p> </section>
<section id="GUID-DDA57900-42FB-4C4B-B68B-964DD6601B44"><title>Class
Summary</title><ul>
<li><p><xref href="GUID-E36E2F07-09E7-32BC-BB83-14DF9232E7D9.dita"><apiname>CEikApplication</apiname></xref></p></li>
<li><p><xref href="GUID-B33A8A56-D1BE-3E3D-B5AC-F644A5C764DB.dita"><apiname>CEikDocument</apiname></xref></p></li>
<li><p><xref href="GUID-1185F595-0488-3E93-8D60-6B3A1A3AC32E.dita"><apiname>CEikAppUi</apiname></xref></p></li>
<li><p><xref href="GUID-B06F99BD-F032-3B87-AB26-5DD6EBE8C160.dita"><apiname>CCoeControl</apiname></xref></p></li>
</ul></section>
<section id="GUID-E35DE76E-896C-4127-8900-715D6381D240"><title>Build</title> <p>The Symbian build process 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>&lt;build_variant&gt;</i> for CodeWarrior). Either launch the executable itself, or launch
the emulator and then select the <filepath>Minimal</filepath> application
from the Emulator's extras bar. </p> </section>
</conbody></concept>