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:ecore="http://www.eclipse.org/emf/2002/Ecore"
|
|
11 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
|
|
12 |
<component baseComponent="com.nokia.sdt.series60.DialogBase"
|
|
13 |
friendlyName="%friendlyName"
|
|
14 |
qualifiedName="com.nokia.sdt.series60.CAknDialog"
|
|
15 |
abstract="true"
|
|
16 |
version="1.0">
|
|
17 |
<documentation>
|
|
18 |
<information>%information</information>
|
|
19 |
<wizardDescription>%information</wizardDescription>
|
|
20 |
</documentation>
|
|
21 |
<symbian sdkName="com.nokia.series60" minSDKVersion="2.0"
|
|
22 |
className="CAknDialog" classHelpTopic="" />
|
|
23 |
<designerImages
|
|
24 |
smallIconFile="CAknDialog_sm.png"
|
|
25 |
largeIconFile="CAknDialog.png"/>
|
|
26 |
|
|
27 |
<attributes>
|
|
28 |
<attribute key="options-menu-property-name">optionsMenu</attribute>
|
|
29 |
<attribute key="event-handler-target">true</attribute>
|
|
30 |
<attribute key="base-container-class">CAknDialog</attribute>
|
|
31 |
</attributes>
|
|
32 |
<properties>
|
|
33 |
<property category="Appearance" name="backColor" type="string"
|
|
34 |
editorClass="com.nokia.sdt.symbian.ui.editors.RGBEditorFactoryWithSystemColorCombo"/>
|
|
35 |
<property category="Appearance" name="fillRect" type="boolean" default="true"/>
|
|
36 |
<!-- corresponds to flag EEikDialogFlagFillAppClientRect 0x1000 -->
|
|
37 |
<componentReferenceProperty category="Dialog" scope="children" constraint="com.nokia.sdt.series60.MenuBar" name="optionsMenu"/>
|
|
38 |
</properties>
|
|
39 |
<implementations>
|
|
40 |
<implementation>
|
|
41 |
<interface id="com.nokia.sdt.datamodel.adapter.IVisualAppearance"/>
|
|
42 |
<interface id="com.nokia.sdt.datamodel.adapter.ILayout"/>
|
|
43 |
<code class="com.nokia.sdt.series60.component.AknDialogVisualAndLayoutImplFactory"/>
|
|
44 |
</implementation>
|
|
45 |
<implementation>
|
|
46 |
<interface id="com.nokia.sdt.datamodel.adapter.IQueryContainment"/>
|
|
47 |
<script file="CAknDialog_queryContainment.js" prototype="CAknDialogQueryContainment"/>
|
|
48 |
</implementation>
|
|
49 |
</implementations>
|
|
50 |
|
|
51 |
<sourceMapping>
|
|
52 |
<mapResource struct="DIALOG" headers="avkon.rsg avkon.rh eikon.rh">
|
|
53 |
<!-- TODO: flags -->
|
|
54 |
<mapBitmaskMember property="." member="flags"
|
|
55 |
includedProperties="fillRect wait notifyEsc modeless">
|
|
56 |
<!-- initial blank entries force bits on -->
|
|
57 |
<mapBitmaskValue properties="" value="EEikDialogFlagNoDrag" />
|
|
58 |
<mapBitmaskValue properties="" value="EEikDialogFlagNoTitleBar" />
|
|
59 |
<mapBitmaskValue properties="" value="EEikDialogFlagCbaButtons" />
|
|
60 |
|
|
61 |
<mapBitmaskValue properties="notifyEsc" value="EEikDialogFlagNotifyEsc" />
|
|
62 |
<mapBitmaskValue properties="modeless" value="EEikDialogFlagModeless" />
|
|
63 |
<mapBitmaskValue properties="fillRect" value="EEikDialogFlagFillAppClientRect" />
|
|
64 |
<mapBitmaskValue properties="wait" value="EEikDialogFlagWait" />
|
|
65 |
</mapBitmaskMember>
|
|
66 |
<select property="[parent].[com.nokia.sdt.series60.CBA]">
|
|
67 |
<choice value="">
|
|
68 |
<!-- no CBA -->
|
|
69 |
</choice>
|
|
70 |
<choice>
|
|
71 |
<select property="[parent].[com.nokia.sdt.series60.CBA].info">
|
|
72 |
<choice value="com.nokia.sdt.series60.CBA.Type.CUSTOM">
|
|
73 |
<!-- emit a reference to the resource generated -->
|
|
74 |
<mapReferenceMember property="[parent].[com.nokia.sdt.series60.CBA]" member="buttons"/>
|
|
75 |
</choice>
|
|
76 |
<choice>
|
|
77 |
<!-- else, emit the builtin -->
|
|
78 |
<mapIdentifierMember property="[parent].[com.nokia.sdt.series60.CBA].info" member="buttons" />
|
|
79 |
</choice>
|
|
80 |
</select>
|
|
81 |
</choice>
|
|
82 |
</select>
|
|
83 |
<mapArrayMember property="." member="items">
|
|
84 |
<select attribute="is-dialog-content">
|
|
85 |
<!-- only map visible items, not menu bars, etc. -->
|
|
86 |
<choice value="true">
|
|
87 |
<mapResourceElement struct="DLG_LINE" headers="avkon.rh"
|
|
88 |
instanceIdentifyingMember="id" id="dialog_line">
|
|
89 |
<!-- looking at the current array element, always
|
|
90 |
create a unique value from the dialog and instance name -->
|
|
91 |
<mapEnumMember property="." member="id"
|
|
92 |
uniqueValue="*"
|
|
93 |
nameAlgorithm="com.nokia.sdt.component.symbian.NAME_ALG_DIALOG_LINE_ID"
|
|
94 |
/>
|
|
95 |
<!-- looking at the current array element, get the
|
|
96 |
enumerator for the instance's control type -->
|
|
97 |
<mapEnumMember property="." member="type"
|
|
98 |
nameAlgorithm="com.nokia.sdt.component.symbian.NAME_ALG_CONTROL_TYPE"
|
|
99 |
/>
|
|
100 |
<mapResourceMember property="." member="control"/>
|
|
101 |
</mapResourceElement>
|
|
102 |
</choice>
|
|
103 |
<!-- default case does nothing -->
|
|
104 |
<choice/>
|
|
105 |
</select>
|
|
106 |
</mapArrayMember>
|
|
107 |
|
|
108 |
</mapResource>
|
|
109 |
</sourceMapping>
|
|
110 |
|
|
111 |
<sourceGen forms="AppUi AknView RootAppUi">
|
|
112 |
|
|
113 |
<!-- contributions as dialog -->
|
|
114 |
|
|
115 |
<defineLocation id="HEADER_FILE" domain="cpp" dir="${inc}"
|
|
116 |
file="${instanceName}.h"
|
|
117 |
owned="false"
|
|
118 |
location="">
|
|
119 |
</defineLocation>
|
|
120 |
|
|
121 |
<template location="HEADER_FILE">
|
|
122 |
#ifndef ${instanceName.toUpperCase()}_H
|
|
123 |
#define ${instanceName.toUpperCase()}_H
|
|
124 |
|
|
125 |
</template>
|
|
126 |
|
|
127 |
<defineLocation id="HEADER_INCLUDES" baseLocation="HEADER_FILE"
|
|
128 |
location="region(Generated Includes)"
|
|
129 |
filter="unique-includes">
|
|
130 |
</defineLocation>
|
|
131 |
|
|
132 |
<template location="HEADER_INCLUDES"><![CDATA[
|
|
133 |
#include <akndialog.h>
|
|
134 |
]]> </template>
|
|
135 |
|
|
136 |
<defineLocation id="EVENT_INCLUDES" baseLocation="HEADER_FILE"
|
|
137 |
owned="false"
|
|
138 |
filter="unique-includes"
|
|
139 |
location="region(Event Handler Includes)">
|
|
140 |
</defineLocation>
|
|
141 |
|
|
142 |
<template location="EVENT_INCLUDES" />
|
|
143 |
|
|
144 |
<defineLocation id="HEADER_FORWARD_DECLARATIONS" baseLocation="HEADER_FILE"
|
|
145 |
location="region(Generated Forward Declarations)">
|
|
146 |
</defineLocation>
|
|
147 |
|
|
148 |
<template location="HEADER_FORWARD_DECLARATIONS"/>
|
|
149 |
|
|
150 |
|
|
151 |
<defineLocation id="CLASS" baseLocation="HEADER_FILE"
|
|
152 |
owned="false"
|
|
153 |
location="class(${className})">
|
|
154 |
<template><![CDATA[
|
|
155 |
/**
|
|
156 |
* @class ${className} ${instanceName}.h
|
|
157 |
*/
|
|
158 |
class ${className} : public CAknDialog
|
|
159 |
{
|
|
160 |
public:
|
|
161 |
// constructors and destructor
|
|
162 |
${className}();
|
|
163 |
virtual ~${className}();
|
|
164 |
void ConstructL();
|
|
165 |
|
|
166 |
static TBool RunDlgLD();
|
|
167 |
void LoadFromResourceL();
|
|
168 |
|
|
169 |
protected:
|
|
170 |
// from CAknDialog
|
|
171 |
void Draw( const TRect& aRect ) const;
|
|
172 |
TBool OkToExitL( TInt aButtonId );
|
|
173 |
void PreLayoutDynInitL();
|
|
174 |
};
|
|
175 |
]]>
|
|
176 |
</template>
|
|
177 |
</defineLocation>
|
|
178 |
|
|
179 |
<template location="CLASS"/>
|
|
180 |
|
|
181 |
<defineLocation id="CLASS_IVARS" baseLocation="CLASS"
|
|
182 |
location="region(Generated Instance Variables)">
|
|
183 |
<template><![CDATA[
|
|
184 |
private: <% contrib.indentAdjust(-1); %>
|
|
185 |
]]> </template>
|
|
186 |
</defineLocation>
|
|
187 |
|
|
188 |
<template location="CLASS_IVARS"/>
|
|
189 |
|
|
190 |
<template location="HEADER_FILE">
|
|
191 |
#endif // ${instanceName.toUpperCase()}_H
|
|
192 |
</template>
|
|
193 |
|
|
194 |
<defineLocation id="MAIN_FILE" domain="cpp" dir="${src}"
|
|
195 |
file="${instanceName}.cpp"
|
|
196 |
owned="false"
|
|
197 |
location="">
|
|
198 |
</defineLocation>
|
|
199 |
|
|
200 |
<template location="MAIN_FILE"/>
|
|
201 |
|
|
202 |
<defineLocation id="MAIN_SYSTEM_INCLUDES" baseLocation="MAIN_FILE"
|
|
203 |
location="region(Generated System Includes)"
|
|
204 |
filter="unique-includes">
|
|
205 |
<template><![CDATA[
|
|
206 |
#include <aknappui.h>
|
|
207 |
]]> </template>
|
|
208 |
<template><![CDATA[
|
|
209 |
#include <avkon.hrh>
|
|
210 |
]]> </template>
|
|
211 |
</defineLocation>
|
|
212 |
|
|
213 |
<template location="MAIN_SYSTEM_INCLUDES"/>
|
|
214 |
|
|
215 |
<defineLocation id="MAIN_USER_INCLUDES" baseLocation="MAIN_FILE"
|
|
216 |
location="region(Generated User Includes)"
|
|
217 |
filter="unique-includes">
|
|
218 |
<template><![CDATA[
|
|
219 |
#include "${instanceName}.h"
|
|
220 |
]]> </template>
|
|
221 |
</defineLocation>
|
|
222 |
|
|
223 |
<template location="MAIN_USER_INCLUDES"/>
|
|
224 |
|
|
225 |
<inline>
|
|
226 |
if (Engine.formMatches(form, [""])) {
|
|
227 |
this.getHrhFiles(contribs);
|
|
228 |
}
|
|
229 |
</inline>
|
|
230 |
|
|
231 |
<defineLocation id="CONSTANTS" baseLocation="MAIN_FILE"
|
|
232 |
location="region(Generated Constants)">
|
|
233 |
</defineLocation>
|
|
234 |
|
|
235 |
<template location="CONSTANTS" />
|
|
236 |
|
|
237 |
<defineLocation id="CONSTRUCTOR" baseLocation="MAIN_FILE"
|
|
238 |
owned="false"
|
|
239 |
location="function(${className}::${className}())">
|
|
240 |
<template><![CDATA[
|
|
241 |
/**
|
|
242 |
* Construct the ${className} instance
|
|
243 |
*/
|
|
244 |
${className}::${className}()
|
|
245 |
{
|
|
246 |
}
|
|
247 |
]]>
|
|
248 |
</template>
|
|
249 |
</defineLocation>
|
|
250 |
|
|
251 |
<template location="CONSTRUCTOR"/>
|
|
252 |
|
|
253 |
<defineLocation id="CONSTRUCTOR_BODY" baseLocation="CONSTRUCTOR"
|
|
254 |
location="region(Generated Contents)">
|
|
255 |
<template>
|
|
256 |
iContextMenuCommandObserver = NULL;
|
|
257 |
</template>
|
|
258 |
</defineLocation>
|
|
259 |
|
|
260 |
|
|
261 |
<defineLocation id="CONSTRUCTL" baseLocation="MAIN_FILE"
|
|
262 |
owned="false"
|
|
263 |
location="function(${className}::ConstructL())">
|
|
264 |
<template><![CDATA[
|
|
265 |
/**
|
|
266 |
* @brief Completes the second phase of Symbian object construction.
|
|
267 |
* Put initialization code that could leave here.
|
|
268 |
*/
|
|
269 |
void ${className}::ConstructL()
|
|
270 |
{
|
|
271 |
}
|
|
272 |
]]>
|
|
273 |
</template>
|
|
274 |
</defineLocation>
|
|
275 |
|
|
276 |
<template location="CONSTRUCTL"/>
|
|
277 |
|
|
278 |
<defineLocation id="CONSTRUCTL_BODY" baseLocation="CONSTRUCTL"
|
|
279 |
location="region(Generated Contents)">
|
|
280 |
</defineLocation>
|
|
281 |
|
|
282 |
<inline scope="prototype">
|
|
283 |
include("containerLibrary.js")
|
|
284 |
</inline>
|
|
285 |
|
|
286 |
<template location="CONSTRUCTL_BODY"><![CDATA[
|
|
287 |
<% var menuBarId =
|
|
288 |
Engine.getGeneratedResource(getInstanceFromChildName(children, properties.optionsMenu));
|
|
289 |
// TODO children are not yet generated, so can't get the generated resource name for menuBar!
|
|
290 |
if (menuBarId != null) { %>
|
|
291 |
CAknDialog::ConstructL( ${menuBarId.toUpperCase()} );
|
|
292 |
<% } %>
|
|
293 |
]]> </template>
|
|
294 |
|
|
295 |
|
|
296 |
<defineLocation id="DESTRUCTOR" baseLocation="MAIN_FILE"
|
|
297 |
owned="false"
|
|
298 |
location="function(${className}::~${className}())">
|
|
299 |
<template><![CDATA[
|
|
300 |
/**
|
|
301 |
* The dialog's destructor removes the container from the control
|
|
302 |
* stack and destroys it.
|
|
303 |
*/
|
|
304 |
${className}::~${className}()
|
|
305 |
{
|
|
306 |
}
|
|
307 |
]]>
|
|
308 |
</template>
|
|
309 |
</defineLocation>
|
|
310 |
|
|
311 |
<template location="DESTRUCTOR"/>
|
|
312 |
|
|
313 |
<defineLocation id="DESTRUCTOR_BODY" baseLocation="DESTRUCTOR"
|
|
314 |
location="region(Generated Contents)">
|
|
315 |
</defineLocation>
|
|
316 |
|
|
317 |
<defineLocation id="RUNDLGLD" baseLocation="MAIN_FILE"
|
|
318 |
owned="false"
|
|
319 |
location="function(${className}::RunDlgLD())">
|
|
320 |
<template><![CDATA[
|
|
321 |
/**
|
|
322 |
* Static construction and execution of the dialog.
|
|
323 |
* @return ETrue if the dialog is accepted, EFalse if canceled
|
|
324 |
*/
|
|
325 |
TBool ${className}::RunDlgLD()
|
|
326 |
{
|
|
327 |
${className}* ${instanceName} = new ( ELeave ) ${className}();
|
|
328 |
return ${instanceName}->ExecuteLD( ${resourceName$upper} );
|
|
329 |
}
|
|
330 |
]]>
|
|
331 |
</template>
|
|
332 |
</defineLocation>
|
|
333 |
|
|
334 |
<template location="RUNDLGLD"/>
|
|
335 |
|
|
336 |
|
|
337 |
<defineLocation id="DRAW_BODY" baseLocation="DRAW"
|
|
338 |
location="region(Generated Contents)">
|
|
339 |
</defineLocation>
|
|
340 |
|
|
341 |
<useTemplate ids="DrawBodyBgColor"/>
|
|
342 |
|
|
343 |
<defineLocation id="OKTOEXITL" baseLocation="MAIN_FILE"
|
|
344 |
owned="false"
|
|
345 |
location="function(${className}::OkToExitL(TInt))">
|
|
346 |
<template><![CDATA[
|
|
347 |
/**
|
|
348 |
* Handle a button press and tell whether it closes the dialog. (override)
|
|
349 |
* @param aButtonId the identifier for the button (avkon.hrh)
|
|
350 |
*/
|
|
351 |
TBool ${className}::OkToExitL( TInt aButtonId )
|
|
352 |
{
|
|
353 |
}
|
|
354 |
]]>
|
|
355 |
</template>
|
|
356 |
</defineLocation>
|
|
357 |
|
|
358 |
<template location="OKTOEXITL"/>
|
|
359 |
|
|
360 |
<defineLocation id="OKTOEXITL_BODY" baseLocation="OKTOEXITL"
|
|
361 |
location="region(Generated Contents)">
|
|
362 |
</defineLocation>
|
|
363 |
|
|
364 |
<!-- TODO: need to check for CBA overrides -->
|
|
365 |
<template location="OKTOEXITL_BODY" form="AppUi"><![CDATA[
|
|
366 |
switch ( aButtonId )
|
|
367 |
{
|
|
368 |
case EAknSoftkeyOptions:
|
|
369 |
iAvkonAppUi->ProcessCommandL( EAknSoftkeyOptions );
|
|
370 |
break;
|
|
371 |
case EAknSoftkeyBack:
|
|
372 |
iAvkonAppUi->ProcessCommandL( EEikCmdExit );
|
|
373 |
break;
|
|
374 |
}
|
|
375 |
|
|
376 |
// Do not exit the application; this is the main window.
|
|
377 |
// AppUi determines when to exit based on the EEikCmdExit command above.
|
|
378 |
return EFalse;
|
|
379 |
]]> </template>
|
|
380 |
|
|
381 |
<inline scope="prototype">
|
|
382 |
include("../cba/cbaLibrary.js")
|
|
383 |
</inline>
|
|
384 |
|
|
385 |
<template location="OKTOEXITL_BODY" form="AknView"><![CDATA[
|
|
386 |
switch ( aButtonId )
|
|
387 |
{
|
|
388 |
<% // "handle" left command id
|
|
389 |
var id = findCbaLeftId(children);
|
|
390 |
if (id != null && id != "") {
|
|
391 |
%> case ${id}:
|
|
392 |
{
|
|
393 |
// handle left button
|
|
394 |
break;
|
|
395 |
}
|
|
396 |
<% } // "handle" right command id
|
|
397 |
id = findCbaRightId(children);
|
|
398 |
if (id == null)
|
|
399 |
id = "EAknSoftkeyExit";
|
|
400 |
var rightShouldExit = (id == null || id == "EAknSoftkeyExit" || id == "EAknSoftkeyBack");
|
|
401 |
%> case ${id}:
|
|
402 |
{
|
|
403 |
// handle right button<% if (rightShouldExit) { %>
|
|
404 |
iAvkonAppUi->ProcessCommandL( EEikCmdExit );<% } %>
|
|
405 |
break;
|
|
406 |
}
|
|
407 |
}
|
|
408 |
return EFalse;
|
|
409 |
]]> </template>
|
|
410 |
|
|
411 |
|
|
412 |
|
|
413 |
|
|
414 |
<defineLocation id="PRELAYOUTDYNINITL" baseLocation="MAIN_FILE"
|
|
415 |
owned="false"
|
|
416 |
location="function(${className}::PreLayoutDynInitL())">
|
|
417 |
<template><![CDATA[
|
|
418 |
/**
|
|
419 |
* Initialize controls and settings before a dialog is laid out. (override)
|
|
420 |
*/
|
|
421 |
void ${className}::PreLayoutDynInitL()
|
|
422 |
{
|
|
423 |
}
|
|
424 |
]]>
|
|
425 |
</template>
|
|
426 |
</defineLocation>
|
|
427 |
|
|
428 |
<template location="PRELAYOUTDYNINITL"/>
|
|
429 |
|
|
430 |
<defineLocation id="PRELAYOUTDYNINITL_BODY" baseLocation="PRELAYOUTDYNINITL"
|
|
431 |
location="region(Generated Contents)">
|
|
432 |
</defineLocation>
|
|
433 |
|
|
434 |
<template location="PRELAYOUTDYNINITL_BODY"/>
|
|
435 |
|
|
436 |
<defineLocation id="DRAW" baseLocation="MAIN_FILE"
|
|
437 |
owned="false"
|
|
438 |
location="function(${className}::Draw(const TRect&))">
|
|
439 |
<template><![CDATA[
|
|
440 |
void ${className}::Draw( const TRect& aRect ) const
|
|
441 |
{
|
|
442 |
}
|
|
443 |
]]>
|
|
444 |
</template>
|
|
445 |
</defineLocation>
|
|
446 |
|
|
447 |
|
|
448 |
<defineLocation id="LOADFROMRESOURCEL" baseLocation="MAIN_FILE"
|
|
449 |
location="function(${className}::LoadFromResourceL())">
|
|
450 |
<template>
|
|
451 |
void ${className}::LoadFromResourceL()
|
|
452 |
{
|
|
453 |
}
|
|
454 |
</template>
|
|
455 |
</defineLocation>
|
|
456 |
|
|
457 |
<template form="AppUi" location="LOADFROMRESOURCEL">
|
|
458 |
ExecuteLD( ${resourceName.toUpperCase()} );
|
|
459 |
</template>
|
|
460 |
|
|
461 |
<!-- gather child contributions -->
|
|
462 |
|
|
463 |
<inline scope="prototype">
|
|
464 |
include("../srcgenLibrary.js");
|
|
465 |
</inline>
|
|
466 |
|
|
467 |
<inline>
|
|
468 |
|
|
469 |
if (form != 'RootAppUi') {
|
|
470 |
if (Engine.formMatches(form, [ "AknView", "AppUi" ])) {
|
|
471 |
// clear out any image stuff
|
|
472 |
resetImagePropertyState(instance);
|
|
473 |
|
|
474 |
// get default and dialog-specific contributions
|
|
475 |
contribs.addAll(Engine.generateChildContributions(form+"|Dialog"))
|
|
476 |
} else {
|
|
477 |
// get specific desired contributions
|
|
478 |
contribs.addAll(Engine.generateChildContributions(form))
|
|
479 |
}
|
|
480 |
|
|
481 |
// fix up the phases so they point to real locations
|
|
482 |
Engine.assignLocationsForPhase(contribs, "ClassSource", "MAIN_FILE");
|
|
483 |
Engine.assignLocationsForPhase(contribs, "ClassHeader", "HEADER_FILE");
|
|
484 |
|
|
485 |
Engine.assignLocationsForPhase(contribs, "MainConstants", "CONSTANTS");
|
|
486 |
Engine.assignLocationsForPhase(contribs, "MainSystemIncludes", "MAIN_SYSTEM_INCLUDES");
|
|
487 |
Engine.assignLocationsForPhase(contribs, "MainUserIncludes", "MAIN_USER_INCLUDES");
|
|
488 |
Engine.assignLocationsForPhase(contribs, "Construct", "CONSTRUCTOR_BODY");
|
|
489 |
Engine.assignLocationsForPhase(contribs, "Initialize", "PRELAYOUTDYNINITL_BODY");
|
|
490 |
Engine.assignLocationsForPhase(contribs, "HeaderIncludes", "HEADER_INCLUDES");
|
|
491 |
Engine.assignLocationsForPhase(contribs, "EventIncludes", "EVENT_INCLUDES");
|
|
492 |
Engine.assignLocationsForPhase(contribs, "ForwardDeclarations", "HEADER_FORWARD_DECLARATIONS");
|
|
493 |
Engine.assignLocationsForPhase(contribs, "InstanceVariables", "CLASS_IVARS");
|
|
494 |
|
|
495 |
//Engine.removeDuplicateContributionsForLocation(contribs, "HEADER_INCLUDES");
|
|
496 |
Engine.removeDuplicateContributionsForLocation(contribs, "HEADER_FORWARD_DECLARATIONS");
|
|
497 |
//Engine.removeDuplicateContributionsForLocation(contribs, "MAIN_SYSTEM_INCLUDES");
|
|
498 |
//Engine.removeDuplicateContributionsForLocation(contribs, "MAIN_USER_INCLUDES");
|
|
499 |
}
|
|
500 |
|
|
501 |
</inline>
|
|
502 |
|
|
503 |
<template id="IncludeRsgFile" location="MAIN_SYSTEM_INCLUDES"><![CDATA[
|
|
504 |
#include <${resourceFileNameBase}.rsg>
|
|
505 |
]]> </template>
|
|
506 |
|
|
507 |
<!-- contributions as child -->
|
|
508 |
|
|
509 |
<template form="AknView" phase="MainUserIncludes">
|
|
510 |
#include "${instanceName}.h"
|
|
511 |
</template>
|
|
512 |
|
|
513 |
<template form="AknView" phase="ForwardDeclarations">
|
|
514 |
class ${className};
|
|
515 |
</template>
|
|
516 |
|
|
517 |
<template form="AknView" phase="InstanceVariables">
|
|
518 |
${className}* ${instanceMemberName};
|
|
519 |
</template>
|
|
520 |
|
|
521 |
<template form="AknView" phase="DoActivateL"><![CDATA[
|
|
522 |
if ( ${instanceMemberName} == NULL )
|
|
523 |
{
|
|
524 |
${instanceMemberName} = new ${className}();
|
|
525 |
${instanceMemberName}->SetMopParent( this ); <%
|
|
526 |
if ( properties.wait ) {
|
|
527 |
var sb = newStatusBuilder();
|
|
528 |
sb.add(IStatus.ERROR, lookupString("waitPropertySetInView"), [ instanceName ]);
|
|
529 |
logStatus(sb.createStatus("", null));
|
|
530 |
} %>
|
|
531 |
${instanceMemberName}->ExecuteLD( ${resourceName.toUpperCase()} );
|
|
532 |
AppUi()->AddToStackL( *this, ${instanceMemberName} );
|
|
533 |
}
|
|
534 |
]]> </template>
|
|
535 |
|
|
536 |
<template form="AknView" phase="DoDeactivate">
|
|
537 |
if ( ${instanceMemberName} != NULL )
|
|
538 |
{
|
|
539 |
AppUi()->RemoveFromViewStack( *this, ${instanceMemberName} );
|
|
540 |
delete ${instanceMemberName};
|
|
541 |
${instanceMemberName} = NULL;
|
|
542 |
}
|
|
543 |
</template>
|
|
544 |
|
|
545 |
|
|
546 |
<template form="RootAppUi" phase="MainUserIncludes">
|
|
547 |
#include "${instanceName}.h"
|
|
548 |
</template>
|
|
549 |
|
|
550 |
<template form="RootAppUi" phase="ForwardDeclarations">
|
|
551 |
class ${className};
|
|
552 |
</template>
|
|
553 |
|
|
554 |
<template form="RootAppUi" phase="InstanceVariables">
|
|
555 |
${className}* ${instanceMemberName};
|
|
556 |
</template>
|
|
557 |
|
|
558 |
|
|
559 |
<!-- NOTE: this only makes sense when this is the initial view -->
|
|
560 |
<template form="RootAppUi" phase="Initialize">
|
|
561 |
${instanceMemberName} = new ( ELeave ) ${className};
|
|
562 |
${instanceMemberName}->ConstructL();
|
|
563 |
${instanceMemberName}->SetMopParent( this );
|
|
564 |
${instanceMemberName}->LoadFromResourceL();
|
|
565 |
AddToStackL( ${instanceMemberName} );
|
|
566 |
</template>
|
|
567 |
|
|
568 |
<template form="RootAppUi" phase="Destroy">
|
|
569 |
if ( ${instanceMemberName} != NULL )
|
|
570 |
{
|
|
571 |
RemoveFromStack( ${instanceMemberName} );
|
|
572 |
delete ${instanceMemberName};
|
|
573 |
${instanceMemberName} = NULL;
|
|
574 |
}
|
|
575 |
</template>
|
|
576 |
|
|
577 |
<useTemplateGroup ids="GeneratePrepareForFocusTransition GeneratePageChanged GenerateLineChanged"/>
|
|
578 |
<useTemplateGroup ids="GenerateProcessCommand GenerateOfferKeyToApp"/>
|
|
579 |
<useTemplateGroup ids="GenerateFocusChanged"/>
|
|
580 |
<useTemplateGroup ids="GenerateSizeChanged GeneratePositionChanged"/>
|
|
581 |
<useTemplateGroup ids="GenerateDraw GenerateOfferKeyEvent"/>
|
|
582 |
<useTemplateGroup ids="GeneratePrepareForFocusLoss GeneratePrepareForFocusGain"/>
|
|
583 |
|
|
584 |
</sourceGen>
|
|
585 |
</component>
|
|
586 |
</componentDefinition>
|