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 |
<component baseComponent="com.nokia.sdt.series60.NonLayoutBase"
|
|
13 |
friendlyName="%friendlyName"
|
|
14 |
qualifiedName="com.nokia.sdt.series60.StylusPopup"
|
|
15 |
category="Menu"
|
|
16 |
instanceNameRoot="stylusPopup"
|
|
17 |
version="1.0">
|
|
18 |
|
|
19 |
<documentation>
|
|
20 |
<information>%information</information>
|
|
21 |
</documentation>
|
|
22 |
|
|
23 |
<symbian sdkName="com.nokia.series60" minSDKVersion="5.0"
|
|
24 |
className="CAknStylusPopUpMenu" classHelpTopic=""
|
|
25 |
resourceType="STYLUS_POPUP_MENU" resourceHelpTopic="" />
|
|
26 |
|
|
27 |
<designerImages smallIconFile="StylusPopup_sm.png"
|
|
28 |
largeIconFile="StylusPopup.png" />
|
|
29 |
|
|
30 |
<attributes>
|
|
31 |
<attribute key="cpp-class-name">CAknStylusPopUpMenu</attribute>
|
|
32 |
<attribute key="is-ccoecontrol-content">true</attribute>
|
|
33 |
<attribute key="is-layout-container">true</attribute>
|
|
34 |
<attribute key="is-transient-object">true</attribute>
|
|
35 |
<attribute key="layout-type">ordered</attribute>
|
|
36 |
<attribute key="ordered-layout-type">vertical-row</attribute>
|
|
37 |
<attribute key="is-non-resizable-or-moveable-layout-object">true</attribute>
|
|
38 |
</attributes>
|
|
39 |
|
|
40 |
<properties>
|
|
41 |
<compoundProperty category="Hidden" name="location" type="com.nokia.sdt.series60.locationProperty"
|
|
42 |
editorClass="com.nokia.sdt.symbian.ui.editors.ReadOnlySummaryEditorFactory"/>
|
|
43 |
<compoundProperty category="Hidden" name="size" type="com.nokia.sdt.series60.sizeProperty"
|
|
44 |
editorClass="com.nokia.sdt.symbian.ui.editors.ReadOnlySummaryEditorFactory"/>
|
|
45 |
</properties>
|
|
46 |
|
|
47 |
<implementations>
|
|
48 |
<implementation>
|
|
49 |
<interface id="com.nokia.sdt.datamodel.adapter.IVisualAppearance"/>
|
|
50 |
<interface id="com.nokia.sdt.datamodel.adapter.ILayout"/>
|
|
51 |
<interface id="com.nokia.sdt.datamodel.adapter.IDirectLabelEdit"/>
|
|
52 |
<interface id="com.nokia.sdt.datamodel.adapter.IQueryContainment"/>
|
|
53 |
<script file="StylusPopup.js" prototype="CAknStylusPopUpMenu"/>
|
|
54 |
</implementation>
|
|
55 |
</implementations>
|
|
56 |
|
|
57 |
<sourceMapping>
|
|
58 |
<mapResource struct="STYLUS_POPUP_MENU" headers="eikon.rh">
|
|
59 |
<mapArrayMember property="." member="items"/>
|
|
60 |
</mapResource>
|
|
61 |
</sourceMapping>
|
|
62 |
|
|
63 |
<sourceGen>
|
|
64 |
|
|
65 |
<template phase="HeaderIncludes"><![CDATA[
|
|
66 |
#include <AknStylusPopUpMenu.h>
|
|
67 |
]]> </template>
|
|
68 |
|
|
69 |
<template phase="InstanceVariables">
|
|
70 |
CAknStylusPopUpMenu* ${instanceMemberName};
|
|
71 |
</template>
|
|
72 |
|
|
73 |
<template phase="ClassMethods">
|
|
74 |
void Show${instanceName$title}L( const TPoint& point );
|
|
75 |
</template>
|
|
76 |
|
|
77 |
<template phase="Construct">
|
|
78 |
${instanceMemberName} = NULL;
|
|
79 |
</template>
|
|
80 |
|
|
81 |
<template phase="Destroy">
|
|
82 |
delete ${instanceMemberName};
|
|
83 |
${instanceMemberName} = NULL;
|
|
84 |
</template>
|
|
85 |
|
|
86 |
<inline scope="prototype">
|
|
87 |
${jsObject}.prototype.getCppClassName = function(instance) {
|
|
88 |
return instance.properties.style;
|
|
89 |
}
|
|
90 |
</inline>
|
|
91 |
|
|
92 |
<template phase="ForwardDeclarations">
|
|
93 |
class CAknStylusPopUpMenu;
|
|
94 |
</template>
|
|
95 |
|
|
96 |
<defineLocation id="SHOW_STYLUS_MENU_METHOD" baseLocation="MAIN_FILE"
|
|
97 |
realize="true"
|
|
98 |
owned="true"
|
|
99 |
location="function(${className}::Show${instanceName$title}L(const TPoint&))">
|
|
100 |
<template><![CDATA[
|
|
101 |
/**
|
|
102 |
* Display the stylus popup menu for ${instanceName}. This method can be invoked
|
|
103 |
* by your CCoeControl::HandlePointerEventL( const TPointerEvent& aPointerEvent ) function.
|
|
104 |
*
|
|
105 |
* For example:
|
|
106 |
* static_cast<${className}*>( iCommandObserver )->Show${instanceName$title}L( aPointerEvent.iParentPosition );
|
|
107 |
*
|
|
108 |
* @param The location where the stylus was touched on the screen.
|
|
109 |
*/
|
|
110 |
void ${className}::Show${instanceName$title}L( const TPoint& point )
|
|
111 |
{
|
|
112 |
if ( ${instanceMemberName} == NULL )
|
|
113 |
{
|
|
114 |
// Construct the menu from resources
|
|
115 |
${instanceMemberName} = CAknStylusPopUpMenu::NewL( ( MEikMenuObserver* )this,
|
|
116 |
point, NULL );
|
|
117 |
TInt resourceReaderId = 0;
|
|
118 |
resourceReaderId = ${resourceName$upper};
|
|
119 |
TResourceReader reader;
|
|
120 |
iCoeEnv->CreateResourceReaderLC( reader , resourceReaderId );
|
|
121 |
${instanceMemberName}->ConstructFromResourceL( reader );
|
|
122 |
CleanupStack::PopAndDestroy(); // reader
|
|
123 |
}
|
|
124 |
${instanceMemberName}->SetPosition( point );
|
|
125 |
${instanceMemberName}->ShowMenu();
|
|
126 |
}
|
|
127 |
]]>
|
|
128 |
</template>
|
|
129 |
</defineLocation>
|
|
130 |
|
|
131 |
<inline >
|
|
132 |
contribs.addAll(Engine.generateChildContributions(form))
|
|
133 |
</inline>
|
|
134 |
|
|
135 |
|
|
136 |
</sourceGen>
|
|
137 |
|
|
138 |
</component>
|
|
139 |
|
|
140 |
</componentDefinition> |