Symbian3/PDK/Source/GUID-405F7AB8-0F0E-4171-95E6-3524D76917DE.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-405F7AB8-0F0E-4171-95E6-3524D76917DE" xml:lang="en"><title>Handling
stylus pop-up menu events and commands</title><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>At the construction phase, <codeph>CAknStylusPopUpMenu</codeph> is given
a <codeph>MEikMenuObserver</codeph> object, which is usually a pointer to
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>)
or another class that implements the interface. The stylus pop up menu will
grab the stylus event when one of its items is tapped on and it will then
report the item’s command ID to the menu observer. It is then up to the application
to handle the command in the implementation of <codeph>MEikMenuObserver::HandleCommandL()</codeph>. </p>
<p>When an item is  tapped, the menu calls its observer's (iMenuObserver)
ProcessCommandL. Typically the observer is application's AppUi. It is then
the observer's responsibility to handle the command appropriately. The observer
is informed with KErrCancel if the menu is closed without making a selection.</p>
<p><draft-comment time="2008-05-15T15:38" translate="no">Add sample code on event and command
handling here.</draft-comment></p>
</conbody></concept>