2
|
1 |
<!-- This component must have a child of type CBA -->
|
|
2 |
|
|
3 |
<sourceMapping>
|
|
4 |
<mapResource struct="AVKON_VIEW" headers="avkon.rsg avkon.rh">
|
|
5 |
<select property="[com.nokia.sdt.series60.CAknForm]">
|
|
6 |
<choice value="">
|
|
7 |
<select property="[com.nokia.sdt.series60.CBA]">
|
|
8 |
<choice value="">
|
|
9 |
<!-- no CBA -->
|
|
10 |
</choice>
|
|
11 |
<choice>
|
|
12 |
<select property="[com.nokia.sdt.series60.CBA].info">
|
|
13 |
<choice value="com.nokia.sdt.series60.CBA.Type.CUSTOM">
|
|
14 |
<!-- emit a reference to the resource generated -->
|
|
15 |
<mapReferenceMember property="[com.nokia.sdt.series60.CBA]" member="cba"/>
|
|
16 |
</choice>
|
|
17 |
<choice>
|
|
18 |
<!-- else, emit the builtin -->
|
|
19 |
<mapIdentifierMember property="[com.nokia.sdt.series60.CBA].info" member="cba" />
|
|
20 |
</choice>
|
|
21 |
</select>
|
|
22 |
</choice>
|
|
23 |
</select>
|
|
24 |
|
|
25 |
<!-- only emit menubar if child is not CAknForm -->
|
|
26 |
<mapReferenceMember property="optionsMenu" member="menubar" />
|
|
27 |
|
|
28 |
<select property="[com.nokia.sdt.series60.Toolbar]">
|
|
29 |
<choice value="">
|
|
30 |
<!-- no tool bar, default value is 0 -->
|
|
31 |
<mapFixedMember member="toolbar" value="0" />
|
|
32 |
</choice>
|
|
33 |
<choice>
|
|
34 |
<!-- emit a reference to the resource generated -->
|
|
35 |
<mapReferenceMember property="[com.nokia.sdt.series60.Toolbar]" member="toolbar"/>
|
|
36 |
</choice>
|
|
37 |
</select>
|
|
38 |
|
|
39 |
</choice>
|
|
40 |
<choice/> <!-- don't emit the CBA reference to the view resource, if child is CAknForm -->
|
|
41 |
</select>
|
|
42 |
</mapResource>
|
|
43 |
</sourceMapping>
|
|
44 |
|
|
45 |
<sourceGen forms="RootAppUi">
|
|
46 |
<inline scope="prototype">
|
|
47 |
include("../containers/containerLibrary.js")
|
|
48 |
include("../cba/cbaLibrary.js")
|
|
49 |
</inline>
|
|
50 |
|
|
51 |
<!-- HEADER FILE -->
|
|
52 |
|
|
53 |
<expandMacro name="HeaderFileTemplate"
|
|
54 |
LocationPrefix="HEADER"
|
|
55 |
OwnedSystemIncludesRegionName="Generated Includes"
|
|
56 |
RealizeOwnedUserIncludes="false"
|
|
57 |
RealizeOwnedTypedefs="false" />
|
|
58 |
|
|
59 |
<expandMacro name="AddCppIncludes"
|
|
60 |
Location="HEADER_OWNED_SYSTEM_INCLUDES"
|
|
61 |
Headers="aknview.h" />
|
|
62 |
|
|
63 |
<!-- we don't make custom types here -->
|
|
64 |
<expandMacro name="ClassTemplate"
|
|
65 |
BaseClassName="CAknView"
|
|
66 |
RealizePublicOwnedTypes="false"
|
|
67 |
RealizePrivateOwnedTypes="false">
|
|
68 |
|
|
69 |
<expandArgument name="ClassComment"><![CDATA[
|
|
70 |
/**
|
|
71 |
* Avkon view class for ${instanceName}. It is register with the view server
|
|
72 |
* by the AppUi. It owns the container control.
|
|
73 |
* @class ${className} ${instanceName}.h
|
|
74 |
*/
|
|
75 |
]]> </expandArgument>
|
|
76 |
|
|
77 |
<expandArgument name="InitialPublicHeadContent"><![CDATA[
|
|
78 |
// constructors and destructor
|
|
79 |
${className}();
|
|
80 |
static ${className}* NewL();
|
|
81 |
static ${className}* NewLC();
|
|
82 |
void ConstructL();
|
|
83 |
virtual ~${className}();
|
|
84 |
|
|
85 |
// from base class CAknView
|
|
86 |
TUid Id() const;
|
|
87 |
void HandleCommandL( TInt aCommand );
|
|
88 |
]]> </expandArgument>
|
|
89 |
|
|
90 |
<expandArgument name="InitialProtectedHeadContent"><![CDATA[
|
|
91 |
// from base class CAknView
|
|
92 |
void DoActivateL(
|
|
93 |
const TVwsViewId& aPrevViewId,
|
|
94 |
TUid aCustomMessageId,
|
|
95 |
const TDesC8& aCustomMessage );
|
|
96 |
void DoDeactivate();
|
|
97 |
void HandleStatusPaneSizeChange();
|
|
98 |
]]> </expandArgument>
|
|
99 |
|
|
100 |
<expandArgument name="InitialPrivateHeadContent"><![CDATA[
|
|
101 |
void SetupStatusPaneL();
|
|
102 |
void CleanupStatusPane();
|
|
103 |
]]> </expandArgument>
|
|
104 |
|
|
105 |
</expandMacro>
|
|
106 |
|
|
107 |
<!-- MAIN FILE -->
|
|
108 |
|
|
109 |
<!-- make the source file -->
|
|
110 |
|
|
111 |
<!-- don't automatically generate header #include since we need
|
|
112 |
to inject .hrh first -->
|
|
113 |
<expandMacro name="SourceFileTemplate"
|
|
114 |
LocationPrefix="MAIN"
|
|
115 |
HeaderFileName="" />
|
|
116 |
|
|
117 |
<expandMacro name="AddCppIncludes"
|
|
118 |
Location="MAIN_OWNED_SYSTEM_INCLUDES"
|
|
119 |
Headers="aknviewappui.h eikmenub.h avkon.hrh" />
|
|
120 |
|
|
121 |
<!-- forcibly include the app's hrh file since the ::Id() method is not owned -->
|
|
122 |
<template location="MAIN_OWNED_USER_INCLUDES">
|
|
123 |
#include "${getProjectName()}.hrh"
|
|
124 |
</template>
|
|
125 |
<template location="MAIN_OWNED_USER_INCLUDES">
|
|
126 |
#include "${instanceName}.h"
|
|
127 |
</template>
|
|
128 |
|
|
129 |
<!-- only define; declared above -->
|
|
130 |
<expandMacro name="DefineMethodWithOwnedBody"
|
|
131 |
DefnLocation="MAIN_FILE"
|
|
132 |
IsOwned="false"
|
|
133 |
FunctionLocationId="CONSTRUCTOR"
|
|
134 |
FunctionName="${className}"
|
|
135 |
ReturnType=""
|
|
136 |
FunctionArgs="">
|
|
137 |
<expandArgument name="FunctionComment">
|
|
138 |
/**
|
|
139 |
* First phase of Symbian two-phase construction. Should not contain any
|
|
140 |
* code that could leave.
|
|
141 |
*/
|
|
142 |
</expandArgument>
|
|
143 |
|
|
144 |
</expandMacro>
|
|
145 |
|
|
146 |
<!-- only define; declared above -->
|
|
147 |
<expandMacro name="DefineMethodWithOwnedBody"
|
|
148 |
DefnLocation="MAIN_FILE"
|
|
149 |
IsOwned="false"
|
|
150 |
FunctionLocationId="DESTRUCTOR"
|
|
151 |
FunctionName="~${className}"
|
|
152 |
ReturnType=""
|
|
153 |
FunctionArgs="">
|
|
154 |
<expandArgument name="FunctionComment">
|
|
155 |
/**
|
|
156 |
* The view's destructor removes the container from the control
|
|
157 |
* stack and destroys it.
|
|
158 |
*/
|
|
159 |
</expandArgument>
|
|
160 |
</expandMacro>
|
|
161 |
|
|
162 |
<!-- stock template code for one-time non-owned functions -->
|
|
163 |
<template location="MAIN_FILE"><![CDATA[
|
|
164 |
/**
|
|
165 |
* Symbian two-phase constructor.
|
|
166 |
* This creates an instance then calls the second-phase constructor
|
|
167 |
* without leaving the instance on the cleanup stack.
|
|
168 |
* @return new instance of ${className}
|
|
169 |
*/
|
|
170 |
${className}* ${className}::NewL()
|
|
171 |
{
|
|
172 |
${className}* self = ${className}::NewLC();
|
|
173 |
CleanupStack::Pop( self );
|
|
174 |
return self;
|
|
175 |
}
|
|
176 |
|
|
177 |
/**
|
|
178 |
* Symbian two-phase constructor.
|
|
179 |
* This creates an instance, pushes it on the cleanup stack,
|
|
180 |
* then calls the second-phase constructor.
|
|
181 |
* @return new instance of ${className}
|
|
182 |
*/
|
|
183 |
${className}* ${className}::NewLC()
|
|
184 |
{
|
|
185 |
${className}* self = new ( ELeave ) ${className}();
|
|
186 |
CleanupStack::PushL( self );
|
|
187 |
self->ConstructL();
|
|
188 |
return self;
|
|
189 |
}
|
|
190 |
|
|
191 |
]]>
|
|
192 |
</template>
|
|
193 |
|
|
194 |
<!-- only define; declared above -->
|
|
195 |
<expandMacro name="DefineMethodWithOwnedBody"
|
|
196 |
DefnLocation="MAIN_FILE"
|
|
197 |
IsOwned="false"
|
|
198 |
FunctionLocationId="CONSTRUCTL_METHOD"
|
|
199 |
FunctionName="ConstructL"
|
|
200 |
ReturnType="void"
|
|
201 |
FunctionArgs=""
|
|
202 |
OwnedRegionName="Generated Code">
|
|
203 |
<expandArgument name="FunctionComment">
|
|
204 |
/**
|
|
205 |
* Second-phase constructor for view.
|
|
206 |
* Initialize contents from resource.
|
|
207 |
*/
|
|
208 |
</expandArgument>
|
|
209 |
<expandArgument name="FunctionBody">
|
|
210 |
BaseConstructL( ${resourceName$upper} );
|
|
211 |
</expandArgument>
|
|
212 |
<expandArgument name="EndFunctionBody">
|
|
213 |
// add your own initialization code here
|
|
214 |
</expandArgument>
|
|
215 |
|
|
216 |
</expandMacro>
|
|
217 |
|
|
218 |
<!-- only define; declared above -->
|
|
219 |
<expandMacro name="DefineMethod"
|
|
220 |
DefnLocation="MAIN_FILE"
|
|
221 |
IsOwned="false"
|
|
222 |
FunctionLocationId="ID_METHOD"
|
|
223 |
FunctionName="Id"
|
|
224 |
ReturnType="TUid"
|
|
225 |
IsConst="true"
|
|
226 |
FunctionArgs="">
|
|
227 |
<expandArgument name="FunctionComment">
|
|
228 |
/**
|
|
229 |
* @return The UID for this view
|
|
230 |
*/
|
|
231 |
</expandArgument>
|
|
232 |
<expandArgument name="FunctionBody">
|
|
233 |
return TUid::Uid( ${getViewUidConstant(instance, contribs)} );
|
|
234 |
</expandArgument>
|
|
235 |
</expandMacro>
|
|
236 |
|
|
237 |
<!-- only define; declared above -->
|
|
238 |
<expandMacro name="DefineMethodWithOwnedBody"
|
|
239 |
DefnLocation="MAIN_FILE"
|
|
240 |
IsOwned="false"
|
|
241 |
FunctionLocationId="HANDLECOMMANDL"
|
|
242 |
FunctionName="HandleCommandL"
|
|
243 |
ReturnType="void"
|
|
244 |
FunctionArgs="TInt aCommand"
|
|
245 |
OwnedRegionName="Generated Code">
|
|
246 |
<expandArgument name="FunctionComment">
|
|
247 |
/**
|
|
248 |
* Handle a command for this view (override)
|
|
249 |
* @param aCommand command id to be handled
|
|
250 |
*/
|
|
251 |
</expandArgument>
|
|
252 |
<expandArgument name="FunctionBody" />
|
|
253 |
</expandMacro>
|
|
254 |
|
|
255 |
<template location="HANDLECOMMANDL_BODY"><![CDATA[
|
|
256 |
TBool commandHandled = EFalse;
|
|
257 |
switch ( aCommand )
|
|
258 |
{ // code to dispatch to the AknView's menu and CBA commands is generated here
|
|
259 |
<% var handlerContribs = Engine.generateChildContributions("HandleCommandSwitchDispatch");
|
|
260 |
// resolve the contents for switch to this method
|
|
261 |
var switchContribs = Engine.getContributionsForPhase(handlerContribs, "SwitchContents");
|
|
262 |
Engine.assignLocationsForPhase(switchContribs, "SwitchContents", "HANDLECOMMANDL_BODY")
|
|
263 |
contribs.addAll(switchContribs);
|
|
264 |
handlerContribs.removeAll(switchContribs);
|
|
265 |
%> default:
|
|
266 |
break;
|
|
267 |
}
|
|
268 |
|
|
269 |
<% // Handle any leftover handler contribs that occur after the switch here.
|
|
270 |
var postSwitchContribs = Engine.getContributionsForPhase(handlerContribs, "PostSwitchContents");
|
|
271 |
Engine.assignLocationsForPhase(postSwitchContribs, "PostSwitchContents", "HANDLECOMMANDL_BODY")
|
|
272 |
contribs.addAll(postSwitchContribs);
|
|
273 |
handlerContribs.removeAll(postSwitchContribs);
|
|
274 |
|
|
275 |
// Remaining ones go into this file
|
|
276 |
var includeContribs = Engine.getContributionsForPhase(handlerContribs, "MainSystemIncludes");
|
|
277 |
Engine.assignLocationsForPhase(includeContribs, "MainSystemIncludes", "MAIN_OWNED_SYSTEM_INCLUDES");
|
|
278 |
contribs.addAll(includeContribs);
|
|
279 |
%>
|
|
280 |
if ( !commandHandled )
|
|
281 |
{
|
|
282 |
<% // Handle 'handleCommand' event here. This is a special case for handler
|
|
283 |
// code since the HandleCommandL method is mostly entirely generated.
|
|
284 |
var event = instance.events['handleCommand'];
|
|
285 |
var hasFormChild = findAknFormChild(children) != null;
|
|
286 |
var childWantsExit = childWantsExitBehavior(children);
|
|
287 |
var id = findCbaRightId(children);
|
|
288 |
if (event) {
|
|
289 |
%> // dispatch to ${event.eventName} handler
|
|
290 |
commandHandled = ${event.handlerName}( aCommand );
|
|
291 |
<% if (!hasFormChild && childWantsExit && id != null && id != "") { %>
|
|
292 |
if ( !commandHandled )
|
|
293 |
{
|
|
294 |
if ( aCommand == ${id} )
|
|
295 |
{
|
|
296 |
AppUi()->HandleCommandL( EEikCmdExit );
|
|
297 |
}
|
|
298 |
}<%
|
|
299 |
}
|
|
300 |
} else if (!hasFormChild && childWantsExit && id != null && id != "") { %>
|
|
301 |
if ( aCommand == ${id} )
|
|
302 |
{
|
|
303 |
AppUi()->HandleCommandL( EEikCmdExit );
|
|
304 |
}
|
|
305 |
<% } %>
|
|
306 |
}
|
|
307 |
]]> </template>
|
|
308 |
<!-- only define; declared above -->
|
|
309 |
<expandMacro name="DefineMethodWithOwnedBody"
|
|
310 |
DefnLocation="MAIN_FILE"
|
|
311 |
IsOwned="false"
|
|
312 |
FunctionLocationId="DOACTIVATEL_METHOD"
|
|
313 |
FunctionName="DoActivateL"
|
|
314 |
ReturnType="void"
|
|
315 |
FunctionArgs="const TVwsViewId& /*aPrevViewId*/, TUid /*aCustomMessageId*/, const TDesC8& /*aCustomMessage*/">
|
|
316 |
<expandArgument name="FunctionComment">
|
|
317 |
/**
|
|
318 |
* Handles user actions during activation of the view,
|
|
319 |
* such as initializing the content.
|
|
320 |
*/
|
|
321 |
</expandArgument>
|
|
322 |
<expandArgument name="FunctionBody"><![CDATA[
|
|
323 |
SetupStatusPaneL();
|
|
324 |
<% var cba = findImmediateChildByComponentId(children, "com.nokia.sdt.series60.CBABase");
|
|
325 |
if (cba && getComponentVersions().getMajor() < 3) {%>
|
|
326 |
CEikButtonGroupContainer* cba = AppUi()->Cba();
|
|
327 |
if ( cba != NULL )
|
|
328 |
{
|
|
329 |
cba->MakeVisible( EFalse );
|
|
330 |
}
|
|
331 |
<% } %>
|
|
332 |
]]> </expandArgument>
|
|
333 |
</expandMacro>
|
|
334 |
|
|
335 |
<!-- only define; declared above -->
|
|
336 |
<expandMacro name="DefineMethodWithOwnedBody"
|
|
337 |
DefnLocation="MAIN_FILE"
|
|
338 |
IsOwned="false"
|
|
339 |
FunctionLocationId="DODEACTIVATE_METHOD"
|
|
340 |
FunctionName="DoDeactivate"
|
|
341 |
ReturnType="void"
|
|
342 |
FunctionArgs="">
|
|
343 |
<expandArgument name="FunctionComment">
|
|
344 |
/**
|
|
345 |
*/
|
|
346 |
</expandArgument>
|
|
347 |
</expandMacro>
|
|
348 |
|
|
349 |
|
|
350 |
<!-- START EVENT deactivated: placed here since it must precede standard code -->
|
|
351 |
|
|
352 |
<templateGroup ifEvents="deactivated">
|
|
353 |
<!-- API impl above -->
|
|
354 |
|
|
355 |
<expandMacro name="GenerateUserEventHandlerFunction"
|
|
356 |
DefnLocation="MAIN_FILE"
|
|
357 |
DeclLocation="CLASS_PROTECTED_USER_HANDLERS"
|
|
358 |
ReturnType="void"
|
|
359 |
FunctionArgs=""
|
|
360 |
FunctionLocationId="DeactivatedHandlerBody" />
|
|
361 |
|
|
362 |
<template location="DODEACTIVATE_METHOD_BODY">
|
|
363 |
${event.handlerName}();
|
|
364 |
</template>
|
|
365 |
|
|
366 |
<!--
|
|
367 |
<template phase="UserHandlers">
|
|
368 |
void ${event.handlerName}();
|
|
369 |
</template>
|
|
370 |
|
|
371 |
<defineLocation id="DeactivatedHandlerBody" baseLocation="MAIN_FILE"
|
|
372 |
owned="false"
|
|
373 |
isEventHandler="true"
|
|
374 |
location="function(${handlerClassName}::${event.handlerName}())">
|
|
375 |
<template><![CDATA[
|
|
376 |
/**
|
|
377 |
* Handle the ${event.eventName} event.
|
|
378 |
*/
|
|
379 |
void ${handlerClassName}::${event.handlerName}()
|
|
380 |
{
|
|
381 |
// TODO: implement ${event.eventName} event handler
|
|
382 |
}
|
|
383 |
]]>
|
|
384 |
</template>
|
|
385 |
</defineLocation>
|
|
386 |
|
|
387 |
<template location="DeactivatedHandlerBody" />
|
|
388 |
-->
|
|
389 |
</templateGroup>
|
|
390 |
|
|
391 |
<!-- END EVENT deactivated -->
|
|
392 |
|
|
393 |
<template location="DODEACTIVATE_METHOD_BODY"><![CDATA[
|
|
394 |
CleanupStatusPane();
|
|
395 |
<% var cba = findImmediateChildByComponentId(children, "com.nokia.sdt.series60.CBABase");
|
|
396 |
if (cba && getComponentVersions().getMajor() < 3) {%>
|
|
397 |
CEikButtonGroupContainer* cba = AppUi()->Cba();
|
|
398 |
if ( cba != NULL )
|
|
399 |
{
|
|
400 |
cba->MakeVisible( ETrue );
|
|
401 |
cba->DrawDeferred();
|
|
402 |
}
|
|
403 |
<% } %>
|
|
404 |
]]> </template>
|
|
405 |
|
|
406 |
<!-- only define; declared above -->
|
|
407 |
<!-- any navi container of StatusPane fills this in -->
|
|
408 |
<expandMacro name="DefineMethod"
|
|
409 |
DefnLocation="MAIN_FILE"
|
|
410 |
IsOwned="true"
|
|
411 |
FunctionLocationId="SETUPSTATUSPANEL_METHOD"
|
|
412 |
FunctionName="SetupStatusPaneL"
|
|
413 |
ReturnType="void"
|
|
414 |
FunctionArgs="">
|
|
415 |
<expandArgument name="FunctionComment">
|
|
416 |
</expandArgument>
|
|
417 |
</expandMacro>
|
|
418 |
|
|
419 |
<!-- only define; declared above -->
|
|
420 |
<!-- any navi container of StatusPane fills this in -->
|
|
421 |
<expandMacro name="DefineMethod"
|
|
422 |
DefnLocation="MAIN_FILE"
|
|
423 |
IsOwned="true"
|
|
424 |
FunctionLocationId="CLEANUPSTATUSPANE_METHOD"
|
|
425 |
FunctionName="CleanupStatusPane"
|
|
426 |
ReturnType="void"
|
|
427 |
FunctionArgs="">
|
|
428 |
<expandArgument name="FunctionComment">
|
|
429 |
</expandArgument>
|
|
430 |
</expandMacro>
|
|
431 |
|
|
432 |
<!-- only define; declared above -->
|
|
433 |
<expandMacro name="DefineMethodWithOwnedBody"
|
|
434 |
DefnLocation="MAIN_FILE"
|
|
435 |
IsOwned="false"
|
|
436 |
FunctionLocationId="HANDLESTATUSPANESIZECHANGE_METHOD"
|
|
437 |
FunctionName="HandleStatusPaneSizeChange"
|
|
438 |
ReturnType="void"
|
|
439 |
FunctionArgs=""
|
|
440 |
OwnedRegionName="Generated Code">
|
|
441 |
<expandArgument name="FunctionComment">
|
|
442 |
/**
|
|
443 |
* Handle status pane size change for this view (override)
|
|
444 |
*/
|
|
445 |
</expandArgument>
|
|
446 |
<expandArgument name="StartFunctionBody">
|
|
447 |
CAknView::HandleStatusPaneSizeChange();
|
|
448 |
|
|
449 |
// this may fail, but we're not able to propagate exceptions here
|
|
450 |
TVwsViewId view;
|
|
451 |
AppUi()->GetActiveViewId( view );
|
|
452 |
if ( view.iViewUid == Id() )
|
|
453 |
{
|
|
454 |
TInt result;
|
|
455 |
TRAP( result, SetupStatusPaneL() );
|
|
456 |
}
|
|
457 |
</expandArgument>
|
|
458 |
</expandMacro>
|
|
459 |
|
|
460 |
<template mode="upgrade(1.1,1.2)" location="HANDLESTATUSPANESIZECHANGE_METHOD">
|
|
461 |
@@@ Remove call to SetupStatusPaneL() from HandleStatusPaneSizeChange()
|
|
462 |
- TInt result;
|
|
463 |
- TRAP( result, SetupStatusPaneL() );
|
|
464 |
+ TVwsViewId view;
|
|
465 |
+ AppUi()->GetActiveViewId( view );
|
|
466 |
+ if ( view.iViewUid == Id() )
|
|
467 |
+ {
|
|
468 |
+ TInt result;
|
|
469 |
+ TRAP( result, SetupStatusPaneL() );
|
|
470 |
+ }
|
|
471 |
</template>
|
|
472 |
|
|
473 |
<!-- event handling code -->
|
|
474 |
|
|
475 |
<templateGroup ifEvents="handleCommand">
|
|
476 |
|
|
477 |
<!-- API half and invocation in HandleCommandL code above -->
|
|
478 |
|
|
479 |
<expandMacro name="GenerateUserEventHandlerFunction"
|
|
480 |
FunctionLocationId="CommandHandlerMethod"
|
|
481 |
FunctionArgs="TInt aCommand"
|
|
482 |
ReturnType="TBool"
|
|
483 |
DefaultReturn="EFalse"
|
|
484 |
DeclLocation="CLASS_PROTECTED_USER_HANDLERS"
|
|
485 |
DefnLocation="MAIN_FILE">
|
|
486 |
<expandArgument name="FunctionComment">
|
|
487 |
/**
|
|
488 |
* Handle the ${event.eventName} event.
|
|
489 |
* @return ETrue if event was handled, EFalse if not
|
|
490 |
*/
|
|
491 |
</expandArgument>
|
|
492 |
</expandMacro>
|
|
493 |
|
|
494 |
</templateGroup>
|
|
495 |
|
|
496 |
<!-- START EVENT handleStatusPaneSizeChange -->
|
|
497 |
|
|
498 |
<templateGroup ifEvents="handleStatusPaneSizeChange">
|
|
499 |
|
|
500 |
<!-- API impl above -->
|
|
501 |
|
|
502 |
<expandMacro name="GenerateUserEventHandlerFunction"
|
|
503 |
FunctionLocationId="StatusPaneSizeChangeHandlerMethod"
|
|
504 |
FunctionArgs=""
|
|
505 |
DeclLocation="CLASS_PROTECTED_USER_HANDLERS"
|
|
506 |
DefnLocation="MAIN_FILE">
|
|
507 |
</expandMacro>
|
|
508 |
|
|
509 |
<template location="HANDLESTATUSPANESIZECHANGE_METHOD_BODY">
|
|
510 |
${event.handlerName}();
|
|
511 |
</template>
|
|
512 |
|
|
513 |
</templateGroup>
|
|
514 |
|
|
515 |
<!-- END EVENT handleStatusPaneSizeChange -->
|
|
516 |
|
|
517 |
<inline>
|
|
518 |
if (!Engine.formMatches(form, ["RootAppUi"])) {
|
|
519 |
this.getHrhFiles(contribs);
|
|
520 |
}
|
|
521 |
</inline>
|
|
522 |
|
|
523 |
<!-- child contributions -->
|
|
524 |
|
|
525 |
<inline scope="prototype">
|
|
526 |
include("../srcgenLibrary.js");
|
|
527 |
</inline>
|
|
528 |
|
|
529 |
<inline>
|
|
530 |
|
|
531 |
if (!Engine.formMatches(form, ["RootAppUi"])) {
|
|
532 |
// clear out any image stuff
|
|
533 |
resetImagePropertyState(instance);
|
|
534 |
|
|
535 |
// We expect one container child to supply the contents
|
|
536 |
// for the phases below.
|
|
537 |
|
|
538 |
// gather default and view-specific contributions
|
|
539 |
contribs.addAll(Engine.generateChildContributions("|AknView"))
|
|
540 |
}
|
|
541 |
|
|
542 |
</inline>
|
|
543 |
|
|
544 |
<!-- START EVENT activated: handle here to ensure it's the last call -->
|
|
545 |
|
|
546 |
<templateGroup ifEvents="activated">
|
|
547 |
|
|
548 |
<!-- API impl above -->
|
|
549 |
|
|
550 |
<expandMacro name="GenerateUserEventHandlerFunction"
|
|
551 |
FunctionLocationId="ActivatedHandlerBody"
|
|
552 |
FunctionArgs=""
|
|
553 |
DeclLocation="CLASS_PROTECTED_USER_HANDLERS"
|
|
554 |
DefnLocation="MAIN_FILE">
|
|
555 |
</expandMacro>
|
|
556 |
|
|
557 |
<template location="DOACTIVATEL_METHOD_BODY">
|
|
558 |
${event.handlerName}();
|
|
559 |
</template>
|
|
560 |
</templateGroup>
|
|
561 |
|
|
562 |
<!-- END EVENT activated -->
|
|
563 |
|
|
564 |
|
|
565 |
<inline>
|
|
566 |
|
|
567 |
if (!Engine.formMatches(form, ["RootAppUi"])) {
|
|
568 |
// fix up the phases so they point to real locations
|
|
569 |
Engine.assignLocationsForPhase(contribs, "ClassSource", "MAIN_FILE");
|
|
570 |
Engine.assignLocationsForPhase(contribs, "ClassHeader", "HEADER_FILE");
|
|
571 |
|
|
572 |
Engine.assignLocationsForPhase(contribs, "MainConstants", "MAIN_OWNED_CONSTANTS");
|
|
573 |
Engine.assignLocationsForPhase(contribs, "MainSystemIncludes", "MAIN_OWNED_SYSTEM_INCLUDES");
|
|
574 |
Engine.assignLocationsForPhase(contribs, "MainUserIncludes", "MAIN_OWNED_USER_INCLUDES");
|
|
575 |
Engine.assignLocationsForPhase(contribs, "Construct", "CONSTRUCTOR_BODY");
|
|
576 |
Engine.assignLocationsForPhase(contribs, "Initialize", "CONSTRUCTL_METHOD_BODY");
|
|
577 |
Engine.assignLocationsForPhase(contribs, "Destroy", "DESTRUCTOR_BODY");
|
|
578 |
Engine.assignLocationsForPhase(contribs, "DoActivateL", "DOACTIVATEL_METHOD_BODY");
|
|
579 |
Engine.assignLocationsForPhase(contribs, "DoDeactivate", "DODEACTIVATE_METHOD_BODY");
|
|
580 |
|
|
581 |
Engine.assignLocationsForPhase(contribs, "HeaderIncludes", "HEADER_OWNED_SYSTEM_INCLUDES");
|
|
582 |
Engine.assignLocationsForPhase(contribs, "ForwardDeclarations", "HEADER_OWNED_FORWARD_DECLARATIONS");
|
|
583 |
Engine.assignLocationsForPhase(contribs, "InstanceVariables", "CLASS_PRIVATE_OWNED_INSTANCE_VARIABLES");
|
|
584 |
Engine.assignLocationsForPhase(contribs, "ClassMethods", "CLASS_PUBLIC_OWNED_METHODS");
|
|
585 |
|
|
586 |
Engine.assignLocationsForPhase(contribs, "SetupStatusPane", "SETUPSTATUSPANEL_METHOD");
|
|
587 |
Engine.assignLocationsForPhase(contribs, "CleanupStatusPane", "CLEANUPSTATUSPANE_METHOD");
|
|
588 |
|
|
589 |
Engine.assignLocationsForPhase(contribs, "OverriddenMethods", "CLASS_PROTECTED_OVERRIDDEN_METHODS");
|
|
590 |
Engine.assignLocationsForPhase(contribs, "UserHandlers", "CLASS_PROTECTED_USER_HANDLERS");
|
|
591 |
Engine.assignLocationsForPhase(contribs, "EventIncludes", "HEADER_EVENT_HANDLER_INCLUDES");
|
|
592 |
Engine.assignLocationsForPhase(contribs, "BaseClassList", "CLASS_BASES");
|
|
593 |
|
|
594 |
Engine.assignLocationsForPhase(contribs, "ClassPublic", "CLASS_PUBLIC");
|
|
595 |
Engine.assignLocationsForPhase(contribs, "ClassProtected", "CLASS_PROTECTED");
|
|
596 |
Engine.assignLocationsForPhase(contribs, "ClassPrivate", "CLASS_PRIVATE");
|
|
597 |
}
|
|
598 |
|
|
599 |
</inline>
|
|
600 |
|
|
601 |
<template id="IncludeRsgFile" location="MAIN_OWNED_SYSTEM_INCLUDES"><![CDATA[
|
|
602 |
#include <${resourceFileNameBase}.rsg>
|
|
603 |
]]> </template>
|
|
604 |
|
|
605 |
<!-- contributions as child -->
|
|
606 |
|
|
607 |
<template phase="MainUserIncludes" form="RootAppUi">
|
|
608 |
#include "${instanceName}.h"
|
|
609 |
</template>
|
|
610 |
|
|
611 |
<template phase="ForwardDeclarations" form="RootAppUi"><![CDATA[
|
|
612 |
class ${className};
|
|
613 |
]]> </template>
|
|
614 |
|
|
615 |
<template phase="InstanceVariables" form="RootAppUi"><![CDATA[
|
|
616 |
${className}* ${instanceMemberName};
|
|
617 |
]]> </template>
|
|
618 |
|
|
619 |
<template phase="Initialize" form="RootAppUi"><![CDATA[
|
|
620 |
${instanceMemberName} = ${className}::NewL();
|
|
621 |
AddViewL( ${instanceMemberName} );
|
|
622 |
]]> </template>
|
|
623 |
|
|
624 |
<template phase="Initialize" form="RootAppUi_InitialView"><![CDATA[
|
|
625 |
SetDefaultViewL( *${instanceMemberName} );
|
|
626 |
]]> </template>
|
|
627 |
|
|
628 |
<template phase="Initialize" form="RootAppUi_SetActiveTab"><![CDATA[
|
|
629 |
SetActiveTabByViewId( ${instanceMemberName}->Id() );
|
|
630 |
]]> </template>
|
|
631 |
|
|
632 |
<!-- patch from Carbide.c++ 1.2 by adding the regions -->
|
|
633 |
|
|
634 |
<!-- note: these patches are kind of ugly.
|
|
635 |
Since we can't unindent the access specifiers, we have to
|
|
636 |
add the patches to the main file. -->
|
|
637 |
<template mode="upgrade(1.0,1.1)" location="HEADER_FILE"><![CDATA[
|
|
638 |
@@@ Update class region comments to include public/protected/private section
|
|
639 |
- // [[[ begin generated region: do not modify [Generated Methods]
|
|
640 |
+ // [[[ begin [Public Section]
|
|
641 |
+ public:
|
|
642 |
+ // [[[ begin generated region: do not modify [Generated Methods]
|
|
643 |
- public:
|
|
644 |
]]> </template>
|
|
645 |
|
|
646 |
<template mode="upgrade(1.0,1.1)" location="HEADER_FILE"><![CDATA[
|
|
647 |
@@@ Update class region comments to include public/protected/private section
|
|
648 |
- // [[[ begin [Overridden Methods]
|
|
649 |
+
|
|
650 |
+ // ]]] end [Public Section]
|
|
651 |
+
|
|
652 |
+ // [[[ begin [Protected Section]
|
|
653 |
+ protected:
|
|
654 |
+ // [[[ begin [Overridden Methods]
|
|
655 |
- protected:
|
|
656 |
]]> </template>
|
|
657 |
|
|
658 |
<template mode="upgrade(1.0,1.1)" location="HEADER_FILE"><![CDATA[
|
|
659 |
@@@ Update class region comments to include public/protected/private section
|
|
660 |
- // [[[ begin generated region: do not modify [Generated Instance Variables]
|
|
661 |
+
|
|
662 |
+ // ]]] end [Protected Section]
|
|
663 |
+
|
|
664 |
+ // [[[ begin [Private Section]
|
|
665 |
+ private:
|
|
666 |
+ // [[[ begin generated region: do not modify [Generated Instance Variables]
|
|
667 |
- private:
|
|
668 |
]]> </template>
|
|
669 |
|
|
670 |
<template mode="upgrade(1.0,1.1)" location="HEADER_FILE"><![CDATA[
|
|
671 |
@@@ Update class region comments to include public/protected/private section
|
|
672 |
- // ]]] end generated region [Generated Instance Variables]
|
|
673 |
+ // ]]] end generated region [Generated Instance Variables]
|
|
674 |
+
|
|
675 |
+ // ]]] end [Private Section]
|
|
676 |
]]> </template>
|
|
677 |
|
|
678 |
</sourceGen>
|