Symbian3/SDK/Source/GUID-405F7AB8-0F0E-4171-95E6-3524D76917DE.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Tue, 20 Jul 2010 12:00:49 +0100
changeset 13 48780e181b38
parent 8 ae94777fff8f
permissions -rw-r--r--
Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.

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