Symbian3/PDK/Source/GUID-405F7AB8-0F0E-4171-95E6-3524D76917DE.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Tue, 30 Mar 2010 11:56:28 +0100
changeset 5 f345bda72bc4
parent 3 46218c8b8afa
child 9 59758314f811
permissions -rw-r--r--
Week 12 contribution of PDK documentation_content. See release notes for details. Fixes Bug 2054, Bug 1583, Bug 381, Bug 390, Bug 463, Bug 1897, Bug 344, Bug 1319, Bug 394, Bug 1520, Bug 1522, Bug 1892"

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