|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"><concept id="GUID-F3EE1000-71A6-4D48-A30B-3D2357BF20FB" xml:lang="en"><title>Generic |
|
10 button API</title><shortdesc>The Generic button API is used for enabling touch support for buttons.</shortdesc><prolog><metadata><keywords></keywords></metadata></prolog><conbody> |
|
11 <p>An Avkon button is a generic button component specifically designed for |
|
12 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 aknbutton.h) |
|
13 is used, for example, in a toolbar and a status pane. The button can contain |
|
14 text, an image, or both. </p> |
|
15 <p>Buttons can have multiple states, and each of the states can have three |
|
16 different states according to user actions. The possible user-action states |
|
17 for the button states are:</p> |
|
18 <ul> |
|
19 <li><p>Normal</p></li> |
|
20 <li><p>Pressed down</p></li> |
|
21 <li><p>Dimmed</p></li> |
|
22 </ul> |
|
23 <p>By default, the button has a frame, it responds to tap (press) event, has |
|
24 a latchable view in the pressed-down state, and has horizontally and vertically |
|
25 aligned text in it. Some default behavior can be changed with button flags |
|
26 or with the help of member functions. </p> |
|
27 <p>To observe the buttons in your application, use the <codeph>MCoeControlObserver</codeph> observer |
|
28 interface.</p> |
|
29 <fig id="GUID-EEC0C576-8EEC-481E-817F-6E137E4F6A7D"> |
|
30 <title>Generic button used in a toolbar</title> |
|
31 <image href="GUID-ED823C5E-A59B-476A-BF88-0FCBA5D35FED_d0e49091_href.png" scale="50" placement="inline"></image> |
|
32 </fig> |
|
33 <note><p> The Generic button API is used for creating buttons that are displayed |
|
34 as parts of container components, such as a toolbar. It is not used for creating |
|
35 CBA buttons displayed in the control pane at the bottom of the device screen. |
|
36 The API for creating CBA buttons is the Buttons |
|
37 API.</p></note> |
|
38 <p>For look and feel guidelines on the generic button component as part of |
|
39 a toolbar, see the <xref href="GUID-EB212C35-5416-4CA7-8091-61B45D78E220.dita">toolbar |
|
40 UI component description</xref>.</p> |
|
41 <p>For information on using the API, see <xref href="GUID-97712509-84AD-462F-8FFB-E1E6D8278938.dita">Enabling |
|
42 touch support for buttons</xref>.</p> |
|
43 <p>For the Generic button API classes and header files, see Classes and Definitions.</p> |
|
44 <section><title>Constraints</title><p>This API is valid for all platforms |
|
45 running on Symbian OS 9.3 or later.</p></section> |
|
46 <section><title>Emulator support</title><p>This API is supported in the WINS/WINSCW |
|
47 emulator environment, with the following exception:</p><ul> |
|
48 <li><p>Tactile feedback is not supported.</p></li> |
|
49 </ul></section> |
|
50 </conbody></concept> |