|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-7B863846-7666-4FBF-90B2-52F847710C45" xml:lang="en"><title>Adding |
|
13 and removing menu items</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <p>Add items to the menu by either:</p> |
|
15 <ul> |
|
16 <li><p>Calling the method <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknStylusPopUpMenu.html#7199d833dc81124c5f84684b7981ad0d" format="application/java-archive"><codeph>AddMenuItemL()</codeph></xref> in the class <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknStylusPopUpMenu.html" format="application/java-archive"><codeph>CAknStylusPopUpMenu</codeph></xref> for each menu item to be added or</p></li> |
|
17 <li><p>Creating the entire menu instance from a resource by calling <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknStylusPopUpMenu.html#75cd95c35a6ed4734b93713596bb51d5" format="application/java-archive"><codeph>CAknStylusPopUpMenu::ConstructFromResourceL()</codeph></xref>. This requires a <codeph>STYLUS_POPUP_MENU</codeph> resource structure |
|
18 that contains the items in the structure <codeph>STYLUS_POPUP_MENU_ITEM</codeph>.</p></li> |
|
19 </ul> |
|
20 <note><p>If the menu already contains the maximum number of items, <codeph>CAknStylusPopUpMenu::AddMenuItemL()</codeph> will |
|
21 do nothing. The same applies to <codeph>CAknStylusPopUpMenu::ConstructFromResourceL()</codeph>: |
|
22 it will only add the maximum number of menu items even if there were more |
|
23 items defined in the resource.</p><p><draft-comment time="2008-05-15T11:15" translate="no">What's |
|
24 the maximum here: six according to UI Style Guide, no mention in <codeph>aknstyluspopupmenu.h</codeph> in |
|
25 Kevlar. Or can this be set by app developer somehow?</draft-comment></p></note> |
|
26 <p>To remove items, use the method <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknStylusPopUpMenu.html#3ae9fb001d266da3fff2e82692d45e27" format="application/java-archive"><codeph>CAknStylusPopUpMenu::RemoveItem()</codeph></xref>.</p> |
|
27 <p><draft-comment time="2008-05-15T13:32" translate="no">Add sample code on adding and removing |
|
28 menu items here</draft-comment></p> |
|
29 </conbody></concept> |