|
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 --> |
|
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-405F7AB8-0F0E-4171-95E6-3524D76917DE" xml:lang="en"><title>Handling |
|
13 stylus pop-up menu events and commands</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <p>At the construction phase, <codeph>CAknStylusPopUpMenu</codeph> is given |
|
15 a <codeph>MEikMenuObserver</codeph> object, which is usually a pointer to |
|
16 the application’s UI (<xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknAppUi.html" format="application/java-archive"><codeph>CAknAppUi</codeph></xref>) |
|
17 or another class that implements the interface. The stylus pop up menu will |
|
18 grab the stylus event when one of its items is tapped on and it will then |
|
19 report the item’s command ID to the menu observer. It is then up to the application |
|
20 to handle the command in the implementation of <codeph>MEikMenuObserver::HandleCommandL()</codeph>. </p> |
|
21 <p>When an item is tapped, the menu calls its observer's (iMenuObserver) |
|
22 ProcessCommandL. Typically the observer is application's AppUi. It is then |
|
23 the observer's responsibility to handle the command appropriately. The observer |
|
24 is informed with KErrCancel if the menu is closed without making a selection.</p> |
|
25 <p><draft-comment time="2008-05-15T15:38" translate="no">Add sample code on event and command |
|
26 handling here.</draft-comment></p> |
|
27 </conbody></concept> |