Symbian3/SDK/Source/GUID-A3AF142B-F9DF-43FD-9D3F-788A74D0C575.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Tue, 20 Jul 2010 12:00:49 +0100
changeset 13 48780e181b38
parent 0 89d6a7a84779
permissions -rw-r--r--
Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and 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-A3AF142B-F9DF-43FD-9D3F-788A74D0C575" xml:lang="en"><title>Using
precompiled CBA button resources</title><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>To define <xref href="GUID-0F8D0399-58CD-4EB6-82DF-75D6BE5B0A84.dita#GUID-0F8D0399-58CD-4EB6-82DF-75D6BE5B0A84/GUID-5F749184-C804-41FC-BA81-038783BDC967">resources</xref> for
a precompiled <xref href="GUID-A4F3738C-CBFD-4151-9132-26FE05966715.dita">CBA button</xref> option:</p>
<ol>
<li id="GUID-5225D60A-D8D2-4FB0-B938-F2FAE91F4955"><p>Determine
the CBA button requirements of your application.</p></li>
<li id="GUID-C7B01995-16A6-45AD-8616-FFB290870BC2"><p>Declare <parmname>cba
= precompiled symbolic ID in avkon.hrh</parmname> in the <xref href="GUID-23A60DE7-B72D-41BD-9F1E-882D31A7E3C7.dita"><parmname>EIK_APP_INFO</parmname></xref> or <xref href="GUID-B238952B-1691-49F4-B8B9-9F755011A7DD.dita"><parmname>AVKON_VIEW</parmname></xref> resource.
where <parmname>precompiled symbolic ID in avkon.hrh</parmname> is an <xref href="GUID-CBB00F6A-CBA7-4872-B0A1-A86A863725F5.dita">enumerated value</xref> in
the <parmname>avkon.hrh</parmname> file delivered with the SDK and in the <parmname>./Epoc32/include</parmname> folder.
An example is as follows:</p>
<itemgroup>
<codeblock id="GUID-6D73CAC8-36C6-4AC1-B5A3-E53B97F9B6FF" xml:space="preserve">RESOURCE EIK_APP_INFO
    {
    menubar = r_value_menubar;
    cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
    }</codeblock>
<p>In this case, <parmname>Options</parmname> and <parmname>Exit</parmname> appear
above the softkeys at runtime.</p>
<p>The <parmname>Options</parmname> softkey is bound to a command that
results in the application framework opening the options menu based on the <parmname>MENU_BAR</parmname> resource.
The <parmname>Exit</parmname> softkey returns the <parmname>EAknSoftkeyExit</parmname> command,
which would need to be handled in the appropriate place for command handling
in your application architecture. Note that the Symbian platform enumerations
are in the <parmname>avkon.hrh</parmname> file. In general, you can map the
commands returned from the CBA options by comparing the names of the symbolic
IDs to the symbolic names in the enumerated list.</p>
</itemgroup>
</li>
<li id="GUID-EBEB81FE-4A51-4E22-A815-BA49CB7E3E03"><p>If required, <xref href="GUID-4941C035-C359-4968-9BD5-31F44EE5F810.dita">handle the commands</xref> caused
by the selection of a CBA option in your application.</p></li>
</ol>
</conbody></concept>