uidesigner/com.nokia.sdt.series60.componentlibrary/components/transient/StylusPopupItem.component
author wpaul
Wed, 08 Apr 2009 10:40:18 -0500
branchRCL_2_0
changeset 77 e2b416032b5b
parent 2 d760517a8095
permissions -rw-r--r--
the rest of the fix for bug #8694
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
cawthron
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
cawthron
parents:
diff changeset
     2
<!-- Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -->
cawthron
parents:
diff changeset
     3
<!-- All rights reserved. -->
cawthron
parents:
diff changeset
     4
<!-- This component and the accompanying materials are made available -->
cawthron
parents:
diff changeset
     5
<!-- under the terms of the License "Eclipse Public License v1.0" -->
cawthron
parents:
diff changeset
     6
<!-- which accompanies this distribution, and is available -->
cawthron
parents:
diff changeset
     7
<!-- at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
cawthron
parents:
diff changeset
     8
cawthron
parents:
diff changeset
     9
<componentDefinition xmlns="http://www.nokia.com/sdt/emf/component" 
cawthron
parents:
diff changeset
    10
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
cawthron
parents:
diff changeset
    11
	
cawthron
parents:
diff changeset
    12
	<enumPropertyDeclaration qualifiedName="com.nokia.sdt.series60.StylusPopupMenuItemCommands">
cawthron
parents:
diff changeset
    13
		<enumElement value="UNIQUE"/>
cawthron
parents:
diff changeset
    14
	</enumPropertyDeclaration>
cawthron
parents:
diff changeset
    15
	
cawthron
parents:
diff changeset
    16
	<component baseComponent="com.nokia.sdt.series60.ControlBase" 
cawthron
parents:
diff changeset
    17
		friendlyName="%friendlyName" 
cawthron
parents:
diff changeset
    18
		qualifiedName="com.nokia.sdt.series60.StylusPopupItem" 
cawthron
parents:
diff changeset
    19
		category="Menu"
cawthron
parents:
diff changeset
    20
		instanceNameRoot="stylusPopupItem"
cawthron
parents:
diff changeset
    21
		version="1.0">
cawthron
parents:
diff changeset
    22
		
cawthron
parents:
diff changeset
    23
		<documentation>
cawthron
parents:
diff changeset
    24
			<information>%information</information>
cawthron
parents:
diff changeset
    25
		</documentation>
cawthron
parents:
diff changeset
    26
		
cawthron
parents:
diff changeset
    27
		<symbian sdkName="com.nokia.series60" minSDKVersion="3.2" 
cawthron
parents:
diff changeset
    28
			className="CAknStylusPopUpMenu" classHelpTopic=""
cawthron
parents:
diff changeset
    29
			resourceType="STYLUS_POPUP_MENU_ITEM" resourceHelpTopic="" />
cawthron
parents:
diff changeset
    30
		
cawthron
parents:
diff changeset
    31
		<designerImages 
cawthron
parents:
diff changeset
    32
			smallIconFile="StylusPopupItem_sm.png" 
cawthron
parents:
diff changeset
    33
			largeIconFile="StylusPopupItem.png" />
cawthron
parents:
diff changeset
    34
		
cawthron
parents:
diff changeset
    35
		<attributes>
cawthron
parents:
diff changeset
    36
			<attribute key="never-add-component">true</attribute>
cawthron
parents:
diff changeset
    37
		</attributes>
cawthron
parents:
diff changeset
    38
		
cawthron
parents:
diff changeset
    39
		<properties>
cawthron
parents:
diff changeset
    40
			<property category="Appearance" name="textItem" type="localizedString"
cawthron
parents:
diff changeset
    41
			     descriptionKey="textItemDescription" displayName="%menuItemText"/>
cawthron
parents:
diff changeset
    42
			<!-- no text property -->
cawthron
parents:
diff changeset
    43
			<enumProperty category="Hidden" name="command" 
cawthron
parents:
diff changeset
    44
				type="com.nokia.sdt.series60.StylusPopupMenuItemCommands" 
cawthron
parents:
diff changeset
    45
				descriptionKey="commandDescription" />
cawthron
parents:
diff changeset
    46
		</properties>
cawthron
parents:
diff changeset
    47
		
cawthron
parents:
diff changeset
    48
		<implementations>
cawthron
parents:
diff changeset
    49
			<implementation>
cawthron
parents:
diff changeset
    50
			    <interface id="com.nokia.sdt.datamodel.adapter.IVisualAppearance"/>
cawthron
parents:
diff changeset
    51
			    <interface id="com.nokia.sdt.datamodel.adapter.IDirectLabelEdit"/>
cawthron
parents:
diff changeset
    52
				<script file="StylusPopupItem.js" prototype="StylusPopupItem"/>
cawthron
parents:
diff changeset
    53
			</implementation>
cawthron
parents:
diff changeset
    54
		</implementations>
cawthron
parents:
diff changeset
    55
		
cawthron
parents:
diff changeset
    56
		<propertyOverrides>
cawthron
parents:
diff changeset
    57
				<propertyOverride name="size" category="Hidden"/>
cawthron
parents:
diff changeset
    58
				<propertyOverride name="location" category="Hidden"/>
cawthron
parents:
diff changeset
    59
		</propertyOverrides>
cawthron
parents:
diff changeset
    60
		
cawthron
parents:
diff changeset
    61
		<events defaultEventName="selected">
cawthron
parents:
diff changeset
    62
		<event name="selected" displayName="%selected" category="Menu" 
cawthron
parents:
diff changeset
    63
		    handlerNameTemplate="Handle{title(name)}SelectedL"
cawthron
parents:
diff changeset
    64
		    descriptionKey="selectedDescription"
cawthron
parents:
diff changeset
    65
		/>
cawthron
parents:
diff changeset
    66
		</events>
cawthron
parents:
diff changeset
    67
		
cawthron
parents:
diff changeset
    68
		<sourceMapping>
cawthron
parents:
diff changeset
    69
			<mapResource struct="STYLUS_POPUP_MENU_ITEM" headers="eikon.rh">
cawthron
parents:
diff changeset
    70
			<select property="[com.nokia.sdt.series60.StylusPopup]">
cawthron
parents:
diff changeset
    71
					<choice value="">
cawthron
parents:
diff changeset
    72
						<select property="command">
cawthron
parents:
diff changeset
    73
							<choice value="NONE" />
cawthron
parents:
diff changeset
    74
								<choice>
cawthron
parents:
diff changeset
    75
									<mapEnumMember property="command" member="command" uniqueValue="UNIQUE"
cawthron
parents:
diff changeset
    76
										nameAlgorithm="com.nokia.sdt.component.symbian.NAME_ALG_COMMANDS"/>
cawthron
parents:
diff changeset
    77
							</choice>
cawthron
parents:
diff changeset
    78
						</select>
cawthron
parents:
diff changeset
    79
					</choice>
cawthron
parents:
diff changeset
    80
			</select>
cawthron
parents:
diff changeset
    81
			<mapSimpleMember property="textItem" member="txt"/>
cawthron
parents:
diff changeset
    82
			</mapResource>
cawthron
parents:
diff changeset
    83
		</sourceMapping>
cawthron
parents:
diff changeset
    84
		
cawthron
parents:
diff changeset
    85
		<sourceGen>	
cawthron
parents:
diff changeset
    86
			
cawthron
parents:
diff changeset
    87
			<templateGroup id="HandleSelectedEvent" ifEvents="selected">
cawthron
parents:
diff changeset
    88
			<template id="0" phase="UserHandlers">
cawthron
parents:
diff changeset
    89
TBool ${event.handlerName}( TInt aCommand );
cawthron
parents:
diff changeset
    90
			</template>
cawthron
parents:
diff changeset
    91
cawthron
parents:
diff changeset
    92
			<defineLocation id="SelectedMethod" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
    93
					owned="false"
cawthron
parents:
diff changeset
    94
					isEventHandler="true"
cawthron
parents:
diff changeset
    95
					location="function(${handlerClassName}::${event.handlerName}(TInt))">
cawthron
parents:
diff changeset
    96
					<template id="2"><![CDATA[
cawthron
parents:
diff changeset
    97
/** 
cawthron
parents:
diff changeset
    98
 * Handle the ${event.eventName} event.
cawthron
parents:
diff changeset
    99
 * @param aCommand the command id invoked
cawthron
parents:
diff changeset
   100
 * @return ETrue if the command was handled, EFalse if not
cawthron
parents:
diff changeset
   101
 */
cawthron
parents:
diff changeset
   102
TBool ${handlerClassName}::${event.handlerName}( TInt aCommand )
cawthron
parents:
diff changeset
   103
	{
cawthron
parents:
diff changeset
   104
	// TODO: implement ${event.eventName} event handler
cawthron
parents:
diff changeset
   105
	return ETrue;
cawthron
parents:
diff changeset
   106
	}
cawthron
parents:
diff changeset
   107
]]>				
cawthron
parents:
diff changeset
   108
					</template>
cawthron
parents:
diff changeset
   109
				</defineLocation>
cawthron
parents:
diff changeset
   110
			
cawthron
parents:
diff changeset
   111
			<template id="3" location="SelectedMethod" />
cawthron
parents:
diff changeset
   112
	
cawthron
parents:
diff changeset
   113
			<template id="4" form="HandleCommandSwitchDispatch" phase="SwitchContents" ifEvents="selected"><![CDATA[
cawthron
parents:
diff changeset
   114
<% var commandId = Engine.findBuiltinOrGeneratedEnumeratorForAlgorithm(instance, "command", "com.nokia.sdt.component.symbian.NAME_ALG_COMMANDS");
cawthron
parents:
diff changeset
   115
	if (commandId != null) { 
cawthron
parents:
diff changeset
   116
%>	case ${commandId}:
cawthron
parents:
diff changeset
   117
		commandHandled = ${event.handlerName}( aCommand );
cawthron
parents:
diff changeset
   118
		break;
cawthron
parents:
diff changeset
   119
<% } %> ]]>	</template>
cawthron
parents:
diff changeset
   120
		</templateGroup>
cawthron
parents:
diff changeset
   121
			
cawthron
parents:
diff changeset
   122
		</sourceGen>
cawthron
parents:
diff changeset
   123
		
cawthron
parents:
diff changeset
   124
	</component>
cawthron
parents:
diff changeset
   125
	
cawthron
parents:
diff changeset
   126
	
cawthron
parents:
diff changeset
   127
</componentDefinition>