Symbian3/SDK/Source/GUID-405F7AB8-0F0E-4171-95E6-3524D76917DE.dita
changeset 13 48780e181b38
parent 8 ae94777fff8f
--- a/Symbian3/SDK/Source/GUID-405F7AB8-0F0E-4171-95E6-3524D76917DE.dita	Fri Jul 16 17:23:46 2010 +0100
+++ b/Symbian3/SDK/Source/GUID-405F7AB8-0F0E-4171-95E6-3524D76917DE.dita	Tue Jul 20 12:00:49 2010 +0100
@@ -9,36 +9,19 @@
 -->
 <!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="GUID-77329067-34D9-3698-B764-294535E660EB.dita"><apiname>CAknAppUi</apiname></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 <xref href="GUID-CDB32ABA-F567-395D-9A00-2AC518BD5F3B.dita#GUID-CDB32ABA-F567-395D-9A00-2AC518BD5F3B/GUID-5A200511-9E99-3E2F-8E1B-B4A724BD2704"><apiname>MEikMenuObserver::HandleCommandL()</apiname></xref>. </p>
-<p>When an item is  tapped, the menu calls its observer's (<codeph>iMenuObserver</codeph>) <codeph>ProcessCommandL()</codeph> using:<codeblock xml:space="preserve">void ProcessCommandL(TInt aCommandId);</codeblock> where, <codeph>aCommandID</codeph> parameter is the command number recorded in 
-the resource file. You can also add it using <codeph>AddMenuItemL()</codeph> function as shown in the following code snippet:<codeblock xml:space="preserve">void AddMenuItemL( const TDesC&amp; aItem, const TInt aCommandId );</codeblock></p>
-<p>The following code snippet illustrates how to handle the command:<codeblock xml:space="preserve">switch( aCommandId )
-		{
-		case StylusMenuCommand1:
-			break;
-		case StylusMenuCommand2:
-			break;
-		case StylusMenuCommand3:
-			break;
-		case StylusMenuCommand4:
-			break;
-		case KErrCancel:
-			break;
-		default:
-			break;
-		}
-</codeblock> </p>
-<p>Typically the observer is application's AppUi. It is then the observer's
-responsibility to handle the command appropriately. The observer is
-informed with <codeph>KErrCancel</codeph> if the menu is closed without
-making a selection.</p>
-<p>Use the <xref href="GUID-FB7D03CC-6FE6-3B2E-997F-A220A92BF5E8.dita#GUID-FB7D03CC-6FE6-3B2E-997F-A220A92BF5E8/GUID-100C0AE9-D134-3409-8620-7343033DF5BA"><apiname>CAknStylusPopUpMenu::HandleControlEventL()</apiname></xref> method to handle events that occur when user selects a menu item.</p>
-<codeblock xml:space="preserve"/>
+<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>
\ No newline at end of file