Symbian3/PDK/Source/GUID-1D7BD70F-40A3-53FF-8150-A9CAFA4D01D8.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Fri, 22 Jan 2010 18:26:19 +0000
changeset 1 25a17d01db0c
child 3 46218c8b8afa
permissions -rw-r--r--
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608

<?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><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><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><title> Application class</title> <p>The application class implements
the following required functions: </p> <ul>
<li id="GUID-EB8223E8-41E8-57BF-A02C-E3F964126342"><p> <codeph>CApaApplication::CreateDocumentL()</codeph>  </p> </li>
<li id="GUID-E653F464-EA55-5AF9-A3CF-559CE2FCF07A"><p> <codeph>CApaApplication::AppDllUid()</codeph>  </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><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><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><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><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>
<section><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>&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>