Symbian3/SDK/Source/GUID-405F7AB8-0F0E-4171-95E6-3524D76917DE.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Thu, 21 Jan 2010 18:18:20 +0000
changeset 0 89d6a7a84779
child 8 ae94777fff8f
permissions -rw-r--r--
Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385

<?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>