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