Symbian3/SDK/Source/GUID-F3EE1000-71A6-4D48-A30B-3D2357BF20FB.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 11 Jun 2010 12:39:03 +0100
changeset 8 ae94777fff8f
parent 7 51a74ef9ed63
child 13 48780e181b38
permissions -rw-r--r--
Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.

<?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-F3EE1000-71A6-4D48-A30B-3D2357BF20FB" xml:lang="en"><title>Generic
button API</title><shortdesc>The Generic button API is used for enabling touch support for buttons.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>An Avkon button is a generic button component specifically designed for
touch support. The generic button component (<xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknButton.html" format="application/java-archive"><codeph>CAknButton</codeph></xref>, defined in <codeph>aknbutton.h</codeph>) is used, for example, in
a toolbar and a status pane. The button can contain text, an image, or both. </p>
<p>Buttons can have multiple states, and each of the states can have three
different states according to user actions. The possible user-action states
for the button states are:</p>
<ul>
<li><p>Normal</p></li>
<li><p>Pressed down</p></li>
<li><p>Dimmed</p></li>
</ul>
<p>By default, the button has a frame, it responds to tap (press) event, has
a latchable view in the pressed-down state, and has horizontally and vertically
aligned text in it. Some default behavior can be changed with button flags
or with the help of member functions. </p>
<p>To observe the buttons in your application, use the <codeph>MCoeControlObserver</codeph> observer
interface.</p>
<fig id="GUID-EEC0C576-8EEC-481E-817F-6E137E4F6A7D">
<title>Generic button used in a toolbar</title>
<image href="GUID-ED823C5E-A59B-476A-BF88-0FCBA5D35FED_d0e72175_href.png" scale="50" placement="inline"/>
</fig>
<note><p> The Generic button API is used for creating buttons that are displayed
as parts of container components, such as a toolbar. It is not used for creating
CBA buttons displayed in the control pane at the bottom of the device screen.
The API for creating CBA buttons is the <xref format="html" href="specs/guides/Buttons_API_Specification/Buttons_API_Specification.html" scope="peer">Buttons API</xref>.</p></note>
<p>For look and feel guidelines on the generic button component as part of
a toolbar, see the <xref href="GUID-EB212C35-5416-4CA7-8091-61B45D78E220.dita">toolbar
UI component description</xref>.</p>
<p>For information on using the API, see <xref href="GUID-97712509-84AD-462F-8FFB-E1E6D8278938.dita">Enabling
touch support for buttons</xref>.</p>
<p>For the Generic button API classes and header files, see Classes and Definitions.</p>
<section id="GUID-464FAFFC-A02C-4313-8461-5618C8EEBA21"><title>Changes and release information</title><p>The Generic button
API is an SDK API and first released in S60 5th Edition. </p></section>
<section id="GUID-3334EF0D-D9BF-468D-B218-27FA9A2492AC"><title>Constraints</title><p>This
API is valid for all platforms running on Symbian OS v9.3 or later.</p></section>
<section id="GUID-EA74FA6F-FA20-47D7-99F2-9A98A4F24CF1"><title>Emulator support</title><p>This
API is supported in the WINS/WINSCW emulator environment, with the following
exception:</p><ul>
<li><p>Tactile feedback is not supported.</p></li>
</ul></section>
</conbody><related-links>
<linklist><title>Related APIs</title>
<link format="html" href="specs/guides/Skins_API_Specification/Skins_API_Specification.html" scope="peer"><linktext>Skins API</linktext>
<desc> for adding skin support to the button</desc>
</link>
<link href="GUID-B05B61B8-1217-441F-BAFA-C209C8F123C5.dita"><linktext>Toolbar API</linktext>
<desc> for creating a toolbar containing generic buttons</desc>
</link>
<link href="GUID-92018B6B-3CBB-434D-9E61-F271C67E98E3.dita"><linktext>Touch UI
utilities API</linktext>
<desc> for using long-tap events</desc>
</link>
</linklist>
</related-links></concept>