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 |
<!DOCTYPE componentDefinition [
|
|
10 |
<!ENTITY CommonMacros SYSTEM "../CommonMacros.inc">
|
|
11 |
]>
|
|
12 |
|
|
13 |
<componentDefinition xmlns="http://www.nokia.com/sdt/emf/component"
|
|
14 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
15 |
|
|
16 |
<!-- This component is the abstract base component for
|
|
17 |
all Series 60 container components
|
|
18 |
-->
|
|
19 |
|
|
20 |
<component
|
|
21 |
friendlyName=""
|
|
22 |
qualifiedName="com.nokia.sdt.series60.ContainerBase"
|
|
23 |
baseComponent="com.nokia.sdt.series60.CommonBase"
|
|
24 |
abstract="true"
|
|
25 |
version="1.0">
|
|
26 |
<symbian sdkName="com.nokia.series60" minSDKVersion="2.0"/>
|
|
27 |
<attributes>
|
|
28 |
<attribute key="is-layout-object">true</attribute>
|
|
29 |
<attribute key="is-layout-container">true</attribute>
|
|
30 |
<attribute key="display-model-class">com.nokia.sdt.component.symbian/com.nokia.sdt.component.symbian.displaymodel.DisplayModelS60</attribute>
|
|
31 |
<attribute key="not-in-toolbox">true</attribute>
|
|
32 |
<attribute key="is-non-resizable-or-moveable-layout-object">true</attribute>
|
|
33 |
<attribute key="container-background-color">EEikColorWindowBackground</attribute>
|
|
34 |
</attributes>
|
|
35 |
<properties>
|
|
36 |
<property category="Design" name="className" type="string" readOnly="true"
|
|
37 |
descriptionKey="classDescription"/>
|
|
38 |
<compoundProperty category="Layout" name="location" type="com.nokia.sdt.series60.locationProperty"
|
|
39 |
editorClass="com.nokia.sdt.symbian.ui.editors.ReadOnlySummaryEditorFactory" readOnly="true"
|
|
40 |
descriptionKey="locationDescription"/>
|
|
41 |
<compoundProperty category="Layout" name="size" type="com.nokia.sdt.series60.sizeProperty"
|
|
42 |
editorClass="com.nokia.sdt.symbian.ui.editors.ReadOnlySummaryEditorFactory" readOnly="true"
|
|
43 |
descriptionKey="sizeDescription"/>
|
|
44 |
</properties>
|
|
45 |
<propertyOverrides>
|
|
46 |
<propertyOverride name="name" readOnly="true" />
|
|
47 |
</propertyOverrides>
|
|
48 |
|
|
49 |
<events>
|
|
50 |
<!-- CCoeControl virtual function events -->
|
|
51 |
<!-- Event groups:
|
|
52 |
CCoeControl: anything in CCoeControl which is normally overridable
|
|
53 |
CustomCCoeControl: anything in CCoeControl intended for direct
|
|
54 |
CCoeControl customization; such events may not be overridable
|
|
55 |
in CCoeControl-derived classes due to changes in method access
|
|
56 |
-->
|
|
57 |
<event name="resourceChanged" category="Container"
|
|
58 |
group="CCoeControl"
|
|
59 |
handlerNameTemplate="Handle{title(name)}ResourceChanged"
|
|
60 |
descriptionKey="resourceChangedDescription"
|
|
61 |
/>
|
|
62 |
<event name="focusChanged" category="Container"
|
|
63 |
group="CCoeControl"
|
|
64 |
handlerNameTemplate="Handle{title(name)}FocusChanged"
|
|
65 |
descriptionKey="focusChangedDescription"
|
|
66 |
/>
|
|
67 |
<event name="sizeChanged" category="Container"
|
|
68 |
group="CCoeControl"
|
|
69 |
descriptionKey="sizeChangedDescription"
|
|
70 |
handlerNameTemplate="Handle{title(name)}SizeChanged"
|
|
71 |
/>
|
|
72 |
<event name="draw" category="Container"
|
|
73 |
group="CustomCCoeControl"
|
|
74 |
handlerNameTemplate="Handle{title(name)}Draw"
|
|
75 |
descriptionKey="drawDescription"
|
|
76 |
/>
|
|
77 |
<event name="positionChanged" category="Container"
|
|
78 |
group="CCoeControl"
|
|
79 |
handlerNameTemplate="Handle{title(name)}PositionChanged"
|
|
80 |
descriptionKey="positionChangedDescription"
|
|
81 |
/>
|
|
82 |
<event name="offerKeyEvent" category="Container"
|
|
83 |
group="CCoeControl"
|
|
84 |
handlerNameTemplate="Handle{title(name)}OfferKeyEventL"
|
|
85 |
descriptionKey="offerKeyEventDescription"
|
|
86 |
/>
|
|
87 |
<event name="prepareForFocusLoss" category="Container"
|
|
88 |
group="CCoeControl"
|
|
89 |
handlerNameTemplate="Handle{title(name)}PrepareForFocusLossL"
|
|
90 |
descriptionKey="prepareForFocusLossDescription"
|
|
91 |
/>
|
|
92 |
<event name="prepareForFocusGain" category="Container"
|
|
93 |
group="CCoeControl"
|
|
94 |
handlerNameTemplate="Handle{title(name)}PrepareForFocusGainL"
|
|
95 |
descriptionKey="prepareForFocusGainDescription"
|
|
96 |
/>
|
|
97 |
<event name="handlePointerEvent" category="Container"
|
|
98 |
group="TouchUIEvent"
|
|
99 |
handlerNameTemplate="Handle{title(name)}PointerEventL"
|
|
100 |
descriptionKey="handlePointerEventDescription"
|
|
101 |
/>
|
|
102 |
<event name="handleLongTapEvent" category="Container"
|
|
103 |
group="TouchUIEvent"
|
|
104 |
handlerNameTemplate="Handle{title(name)}LongTapEventL"
|
|
105 |
descriptionKey="handleLongTapEventDescription"
|
|
106 |
/>
|
|
107 |
</events>
|
|
108 |
<sourceGen>
|
|
109 |
&CommonMacros;
|
|
110 |
|
|
111 |
<inline scope="prototype">
|
|
112 |
// utility
|
|
113 |
${jsObject}.prototype.getBackgroundColorRgb = function(properties) {
|
|
114 |
if (properties.backColor.indexOf(',') > 0)
|
|
115 |
return "( " + properties.backColor + " )";
|
|
116 |
else
|
|
117 |
return " = iEikonEnv->Color( ( TLogicalColor ) " + properties.backColor + " )";
|
|
118 |
}
|
|
119 |
</inline>
|
|
120 |
|
|
121 |
<template id="DrawBodyBgColor" location="DRAW_BODY"><![CDATA[
|
|
122 |
CWindowGc& gc = SystemGc();
|
|
123 |
<%if (properties.backColor == "") {%>gc.Clear( aRect );
|
|
124 |
<%} else {%>gc.SetPenStyle( CGraphicsContext::ENullPen );
|
|
125 |
TRgb backColor${this.getBackgroundColorRgb(properties)};
|
|
126 |
gc.SetBrushColor( backColor );
|
|
127 |
gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
|
|
128 |
gc.DrawRect( aRect );
|
|
129 |
<%}%>
|
|
130 |
]]> </template>
|
|
131 |
|
|
132 |
<inline scope="prototype"><![CDATA[
|
|
133 |
${jsObject}.prototype.getHrhFiles = function(contribs) {
|
|
134 |
// get the generated files matching this pattern and include them
|
|
135 |
var files = Engine.findGeneratedRssFiles(".*\\.hrh");
|
|
136 |
for (idx in files) {
|
|
137 |
var file = files[idx];
|
|
138 |
var mycontrib = Engine.createContributionForLocation("MAIN_USER_INCLUDES")
|
|
139 |
mycontrib.setText("#include \"" + file + "\"\n");
|
|
140 |
contribs.add(mycontrib);
|
|
141 |
}
|
|
142 |
}
|
|
143 |
]]> </inline>
|
|
144 |
|
|
145 |
<!-- BEGIN EVENT focusChanged -->
|
|
146 |
<templateGroup id="GenerateFocusChanged" ifEvents="focusChanged">
|
|
147 |
<template id="DeclareFocusChangedOverride" phase="OverriddenMethods"><![CDATA[
|
|
148 |
void FocusChanged( TDrawNow aDrawNow );
|
|
149 |
]]> </template>
|
|
150 |
|
|
151 |
<defineLocation id="FocusChangedOverride" baseLocation="MAIN_FILE"
|
|
152 |
owned="false"
|
|
153 |
location="function(${handlerClassName}::FocusChanged(TDrawNow))">
|
|
154 |
<template><![CDATA[
|
|
155 |
/**
|
|
156 |
* Handle focus change (override)
|
|
157 |
*/
|
|
158 |
void ${handlerClassName}::FocusChanged( TDrawNow aDrawNow )
|
|
159 |
{
|
|
160 |
${instance.attributes["base-container-class"]}::FocusChanged( aDrawNow );
|
|
161 |
}
|
|
162 |
]]>
|
|
163 |
</template>
|
|
164 |
</defineLocation>
|
|
165 |
|
|
166 |
<defineLocation id="FocusChangedBody" baseLocation="FocusChangedOverride"
|
|
167 |
location="region(Generated Contents)">
|
|
168 |
<template/>
|
|
169 |
</defineLocation>
|
|
170 |
|
|
171 |
<template id="InvokeFocusChangedHandler" location="FocusChangedBody">
|
|
172 |
${event.handlerName}( aDrawNow );
|
|
173 |
</template>
|
|
174 |
|
|
175 |
<template id="DeclareFocusChangedHandler" phase="UserHandlers">
|
|
176 |
void ${event.handlerName}( TDrawNow aDrawNow );
|
|
177 |
</template>
|
|
178 |
|
|
179 |
<defineLocation id="FocusChangedHandlerMethod" baseLocation="MAIN_FILE"
|
|
180 |
owned="false"
|
|
181 |
isEventHandler="true"
|
|
182 |
location="function(${handlerClassName}::${event.handlerName}(TDrawNow))">
|
|
183 |
<template><![CDATA[
|
|
184 |
/**
|
|
185 |
* Handle the ${event.eventName} event.
|
|
186 |
*/
|
|
187 |
void ${handlerClassName}::${event.handlerName}( TDrawNow aDrawNow )
|
|
188 |
{
|
|
189 |
// TODO: implement ${event.eventName} event handler
|
|
190 |
}
|
|
191 |
]]>
|
|
192 |
</template>
|
|
193 |
</defineLocation>
|
|
194 |
|
|
195 |
<template id="RealizeFocusChangedHandler" location="FocusChangedHandlerMethod" />
|
|
196 |
</templateGroup>
|
|
197 |
<!-- END EVENT focusChanged -->
|
|
198 |
|
|
199 |
<!-- ****************************** -->
|
|
200 |
<!-- BEGIN EVENT handlePointerEvent -->
|
|
201 |
<templateGroup id="HandlePointerEvent" ifEvents="handlePointerEvent handleLongTapEvent">
|
|
202 |
|
|
203 |
<expandMacro name="GenerateMethodWithOwnedBody"
|
|
204 |
IsOwned="false"
|
|
205 |
FunctionLocationId="HANDLEPOINTEREVENTL_METHOD"
|
|
206 |
FunctionArgs="const TPointerEvent& aPointerEvent"
|
|
207 |
FunctionName="HandlePointerEventL"
|
|
208 |
DeclPhase="OverriddenMethods"
|
|
209 |
DefnLocation="MAIN_FILE">
|
|
210 |
<expandArgument name="FunctionComment">
|
|
211 |
/**
|
|
212 |
* Handle pointer events (override)
|
|
213 |
*/
|
|
214 |
</expandArgument>
|
|
215 |
<expandArgument name="StartFunctionBody">
|
|
216 |
CCoeControl::HandlePointerEventL( aPointerEvent );
|
|
217 |
</expandArgument>
|
|
218 |
</expandMacro>
|
|
219 |
|
|
220 |
</templateGroup>
|
|
221 |
|
|
222 |
<templateGroup id="HandlePointerEventHandler" ifEvents="handlePointerEvent">
|
|
223 |
|
|
224 |
<template id="InvokeHandlePointerEventHandler" location="HANDLEPOINTEREVENTL_METHOD_BODY">
|
|
225 |
${event.handlerName}( aPointerEvent );
|
|
226 |
</template>
|
|
227 |
|
|
228 |
<expandMacro name="GenerateUserEventHandlerFunction"
|
|
229 |
FunctionLocationId="HANDLEPOINTEREVENTL_EVENTHANDLER"
|
|
230 |
FunctionArgs="const TPointerEvent& aPointerEvent"
|
|
231 |
DeclPhase="UserHandlers"
|
|
232 |
DefnLocation="MAIN_FILE">
|
|
233 |
</expandMacro>
|
|
234 |
|
|
235 |
</templateGroup>
|
|
236 |
<!-- END EVENT handlePointerEvent -->
|
|
237 |
<!-- **************************** -->
|
|
238 |
|
|
239 |
|
|
240 |
<!-- BEGIN EVENT sizeChanged -->
|
|
241 |
<templateGroup id="GenerateSizeChanged" ifEvents="sizeChanged">
|
|
242 |
<template id="DeclareSizeChangedOverride" phase="OverriddenMethods"><![CDATA[
|
|
243 |
void SizeChanged();
|
|
244 |
]]> </template>
|
|
245 |
|
|
246 |
<defineLocation id="SIZECHANGED" baseLocation="MAIN_FILE"
|
|
247 |
owned="false"
|
|
248 |
location="function(${handlerClassName}::SizeChanged())">
|
|
249 |
<template><![CDATA[
|
|
250 |
/**
|
|
251 |
* Handle size change (override)
|
|
252 |
*/
|
|
253 |
void ${handlerClassName}::SizeChanged()
|
|
254 |
{
|
|
255 |
${instance.attributes["base-container-class"]}::SizeChanged();
|
|
256 |
}
|
|
257 |
]]>
|
|
258 |
</template>
|
|
259 |
</defineLocation>
|
|
260 |
|
|
261 |
<defineLocation id="SIZECHANGED_BODY" baseLocation="SIZECHANGED"
|
|
262 |
location="region(Generated Contents)">
|
|
263 |
<template/>
|
|
264 |
</defineLocation>
|
|
265 |
|
|
266 |
<template id="InvokeSizeChangedHandler" location="SIZECHANGED_BODY">
|
|
267 |
${event.handlerName}();
|
|
268 |
</template>
|
|
269 |
|
|
270 |
<template id="DeclareSizeChangedHandler" phase="UserHandlers">
|
|
271 |
void ${event.handlerName}();
|
|
272 |
</template>
|
|
273 |
|
|
274 |
<defineLocation id="SizeChangedHandlerMethod" baseLocation="MAIN_FILE"
|
|
275 |
owned="false"
|
|
276 |
isEventHandler="true"
|
|
277 |
location="function(${handlerClassName}::${event.handlerName}())">
|
|
278 |
<template><![CDATA[
|
|
279 |
/**
|
|
280 |
* Handle the ${event.eventName} event.
|
|
281 |
*/
|
|
282 |
void ${handlerClassName}::${event.handlerName}()
|
|
283 |
{
|
|
284 |
// TODO: implement ${event.eventName} event handler
|
|
285 |
}
|
|
286 |
]]>
|
|
287 |
</template>
|
|
288 |
</defineLocation>
|
|
289 |
|
|
290 |
<template id="RealizeSizeChangedHandler" location="SizeChangedHandlerMethod" />
|
|
291 |
</templateGroup>
|
|
292 |
<!-- END EVENT sizeChanged -->
|
|
293 |
|
|
294 |
<!-- BEGIN EVENT positionChanged -->
|
|
295 |
<templateGroup id="GeneratePositionChanged" ifEvents="positionChanged">
|
|
296 |
<template id="DeclarePositionChangedOverride" phase="OverriddenMethods"><![CDATA[
|
|
297 |
void PositionChanged();
|
|
298 |
]]> </template>
|
|
299 |
|
|
300 |
<defineLocation id="PositionChangedOverride" baseLocation="MAIN_FILE"
|
|
301 |
owned="false"
|
|
302 |
location="function(${handlerClassName}::PositionChanged())">
|
|
303 |
<template><![CDATA[
|
|
304 |
/**
|
|
305 |
* Handle position change (override)
|
|
306 |
*/
|
|
307 |
void ${handlerClassName}::PositionChanged()
|
|
308 |
{
|
|
309 |
${instance.attributes["base-container-class"]}::PositionChanged();
|
|
310 |
}
|
|
311 |
]]>
|
|
312 |
</template>
|
|
313 |
</defineLocation>
|
|
314 |
|
|
315 |
<defineLocation id="PositionChangedBody" baseLocation="PositionChangedOverride"
|
|
316 |
location="region(Generated Contents)">
|
|
317 |
<template/>
|
|
318 |
</defineLocation>
|
|
319 |
|
|
320 |
<template id="InvokePositionChangedHandler" location="PositionChangedBody">
|
|
321 |
${event.handlerName}();
|
|
322 |
</template>
|
|
323 |
|
|
324 |
<template id="DeclarePositionChangedHandler" phase="UserHandlers">
|
|
325 |
void ${event.handlerName}();
|
|
326 |
</template>
|
|
327 |
|
|
328 |
<defineLocation id="PositionChangedHandlerMethod" baseLocation="MAIN_FILE"
|
|
329 |
owned="false"
|
|
330 |
isEventHandler="true"
|
|
331 |
location="function(${handlerClassName}::${event.handlerName}())">
|
|
332 |
<template><![CDATA[
|
|
333 |
/**
|
|
334 |
* Handle the ${event.eventName} event.
|
|
335 |
*/
|
|
336 |
void ${handlerClassName}::${event.handlerName}()
|
|
337 |
{
|
|
338 |
// TODO: implement ${event.eventName} event handler
|
|
339 |
}
|
|
340 |
]]>
|
|
341 |
</template>
|
|
342 |
</defineLocation>
|
|
343 |
|
|
344 |
<template id="RealizePositionChangedHandler" location="PositionChangedHandlerMethod" />
|
|
345 |
</templateGroup>
|
|
346 |
<!-- END EVENT positionChanged -->
|
|
347 |
|
|
348 |
<!-- BEGIN EVENT draw -->
|
|
349 |
<templateGroup id="GenerateDraw" ifEvents="draw">
|
|
350 |
<template id="DeclareDrawOverride" phase="OverriddenMethods"><![CDATA[
|
|
351 |
void Draw( const TRect& aRect ) const;
|
|
352 |
]]> </template>
|
|
353 |
|
|
354 |
<defineLocation id="DRAW" baseLocation="MAIN_FILE"
|
|
355 |
owned="false"
|
|
356 |
location="function(${handlerClassName}::Draw(const TRect&))">
|
|
357 |
<template><![CDATA[
|
|
358 |
/**
|
|
359 |
* Draw container contents (override)
|
|
360 |
*/
|
|
361 |
void ${handlerClassName}::Draw( const TRect& aRect ) const
|
|
362 |
{
|
|
363 |
${instance.attributes["base-container-class"]}::Draw( aRect );
|
|
364 |
}
|
|
365 |
]]>
|
|
366 |
</template>
|
|
367 |
</defineLocation>
|
|
368 |
|
|
369 |
<defineLocation id="DRAW_BODY" baseLocation="DRAW"
|
|
370 |
location="region(Generated Contents)">
|
|
371 |
<template/>
|
|
372 |
</defineLocation>
|
|
373 |
|
|
374 |
<template id="InvokeDrawHandler" location="DRAW_BODY">
|
|
375 |
${event.handlerName}( aRect );
|
|
376 |
</template>
|
|
377 |
|
|
378 |
<template id="DeclareDrawHandler" phase="UserHandlers"><![CDATA[
|
|
379 |
void ${event.handlerName}( const TRect& aRect ) const;
|
|
380 |
]]> </template>
|
|
381 |
|
|
382 |
<defineLocation id="DrawHandlerMethod" baseLocation="MAIN_FILE"
|
|
383 |
owned="false"
|
|
384 |
isEventHandler="true"
|
|
385 |
location="function(${handlerClassName}::${event.handlerName}(const TRect&))">
|
|
386 |
<template><![CDATA[
|
|
387 |
/**
|
|
388 |
* Handle the ${event.eventName} event.
|
|
389 |
*/
|
|
390 |
void ${handlerClassName}::${event.handlerName}( const TRect& aRect ) const
|
|
391 |
{
|
|
392 |
// TODO: implement ${event.eventName} event handler
|
|
393 |
}
|
|
394 |
]]>
|
|
395 |
</template>
|
|
396 |
</defineLocation>
|
|
397 |
|
|
398 |
<template id="RealizeDrawHandler" location="DrawHandlerMethod" />
|
|
399 |
</templateGroup>
|
|
400 |
<!-- END EVENT draw -->
|
|
401 |
|
|
402 |
<!-- BEGIN EVENT offerKeyEvent -->
|
|
403 |
<templateGroup id="GenerateOfferKeyEvent" ifEvents="offerKeyEvent">
|
|
404 |
<template id="DeclareOfferKeyEventOverride" phase="OverriddenMethods"><![CDATA[
|
|
405 |
TKeyResponse OfferKeyEventL(
|
|
406 |
const TKeyEvent& aKeyEvent,
|
|
407 |
TEventCode aType );
|
|
408 |
]]> </template>
|
|
409 |
|
|
410 |
<defineLocation id="OFFER_KEYEVENTL" baseLocation="MAIN_FILE"
|
|
411 |
owned="false"
|
|
412 |
location="function(${handlerClassName}::OfferKeyEventL(const TKeyEvent&,TEventCode))">
|
|
413 |
<template><![CDATA[
|
|
414 |
/**
|
|
415 |
* Handle key event (override)
|
|
416 |
*/
|
|
417 |
TKeyResponse ${handlerClassName}::OfferKeyEventL(
|
|
418 |
const TKeyEvent& aKeyEvent,
|
|
419 |
TEventCode aType )
|
|
420 |
{
|
|
421 |
}
|
|
422 |
]]>
|
|
423 |
</template>
|
|
424 |
</defineLocation>
|
|
425 |
|
|
426 |
<defineLocation id="OFFER_KEYEVENTL_BODY" baseLocation="OFFER_KEYEVENTL"
|
|
427 |
location="region(Generated Contents)">
|
|
428 |
<template/>
|
|
429 |
</defineLocation>
|
|
430 |
|
|
431 |
<template id="InvokeOfferKeyEventHandler" location="OFFER_KEYEVENTL_BODY"><![CDATA[
|
|
432 |
if ( ${event.handlerName}( aKeyEvent, aType ) == EKeyWasConsumed )
|
|
433 |
{
|
|
434 |
return EKeyWasConsumed;
|
|
435 |
}
|
|
436 |
]]> </template>
|
|
437 |
|
|
438 |
<template id="OfferKeyEventOverrideContents" location="OFFER_KEYEVENTL"><![CDATA[
|
|
439 |
return ${instance.attributes["base-container-class"]}::OfferKeyEventL( aKeyEvent, aType );
|
|
440 |
]]> </template>
|
|
441 |
|
|
442 |
<template id="DeclareOfferKeyEventHandler" phase="UserHandlers"><![CDATA[
|
|
443 |
TKeyResponse ${event.handlerName}(
|
|
444 |
const TKeyEvent& aKeyEvent,
|
|
445 |
TEventCode aType );
|
|
446 |
]]> </template>
|
|
447 |
|
|
448 |
<defineLocation id="OfferKeyEventHandlerMethod" baseLocation="MAIN_FILE"
|
|
449 |
owned="false"
|
|
450 |
isEventHandler="true"
|
|
451 |
location="function(${handlerClassName}::${event.handlerName}(const TKeyEvent&, TEventCode))">
|
|
452 |
<template><![CDATA[
|
|
453 |
/**
|
|
454 |
* Handle the ${event.eventName} event.
|
|
455 |
*/
|
|
456 |
TKeyResponse ${handlerClassName}::${event.handlerName}(
|
|
457 |
const TKeyEvent& aKeyEvent,
|
|
458 |
TEventCode aType )
|
|
459 |
{
|
|
460 |
// TODO: implement ${event.eventName} event handler
|
|
461 |
return EKeyWasNotConsumed;
|
|
462 |
}
|
|
463 |
]]>
|
|
464 |
</template>
|
|
465 |
</defineLocation>
|
|
466 |
|
|
467 |
<template id="RealizeOfferKeyEventHandler" location="OfferKeyEventHandlerMethod" />
|
|
468 |
</templateGroup>
|
|
469 |
<!-- END EVENT offerKeyEvent -->
|
|
470 |
|
|
471 |
<!-- BEGIN EVENT prepareForFocusLoss -->
|
|
472 |
<templateGroup id="GeneratePrepareForFocusLoss" ifEvents="prepareForFocusLoss">
|
|
473 |
<template id="DeclarePrepareForFocusLossOverride" phase="OverriddenMethods"><![CDATA[
|
|
474 |
void PrepareForFocusLossL();
|
|
475 |
]]> </template>
|
|
476 |
|
|
477 |
<defineLocation id="PrepareForFocusLossOverride" baseLocation="MAIN_FILE"
|
|
478 |
owned="false"
|
|
479 |
location="function(${handlerClassName}::PrepareForFocusLossL())">
|
|
480 |
<template><![CDATA[
|
|
481 |
/**
|
|
482 |
* Handle focus change (override)
|
|
483 |
*/
|
|
484 |
void ${handlerClassName}::PrepareForFocusLossL()
|
|
485 |
{
|
|
486 |
${instance.attributes["base-container-class"]}::PrepareForFocusLossL();
|
|
487 |
}
|
|
488 |
]]>
|
|
489 |
</template>
|
|
490 |
</defineLocation>
|
|
491 |
|
|
492 |
<defineLocation id="PrepareForFocusLossBody" baseLocation="PrepareForFocusLossOverride"
|
|
493 |
location="region(Generated Contents)">
|
|
494 |
<template/>
|
|
495 |
</defineLocation>
|
|
496 |
|
|
497 |
<template id="InvokePrepareForFocusLossHandler" location="PrepareForFocusLossBody">
|
|
498 |
${event.handlerName}();
|
|
499 |
</template>
|
|
500 |
|
|
501 |
<template id="DeclarePrepareForFocusLossHandler" phase="UserHandlers">
|
|
502 |
void ${event.handlerName}();
|
|
503 |
</template>
|
|
504 |
|
|
505 |
<defineLocation id="PrepareForFocusLossHandlerMethod" baseLocation="MAIN_FILE"
|
|
506 |
owned="false"
|
|
507 |
isEventHandler="true"
|
|
508 |
location="function(${handlerClassName}::${event.handlerName}())">
|
|
509 |
<template><![CDATA[
|
|
510 |
/**
|
|
511 |
* Handle the ${event.eventName} event.
|
|
512 |
*/
|
|
513 |
void ${handlerClassName}::${event.handlerName}()
|
|
514 |
{
|
|
515 |
// TODO: implement ${event.eventName} event handler
|
|
516 |
}
|
|
517 |
]]>
|
|
518 |
</template>
|
|
519 |
</defineLocation>
|
|
520 |
|
|
521 |
<template id="RealizePrepareForFocusLossHandler" location="PrepareForFocusLossHandlerMethod" />
|
|
522 |
</templateGroup>
|
|
523 |
<!-- END EVENT prepareForFocusLoss -->
|
|
524 |
|
|
525 |
<!-- BEGIN EVENT prepareForFocusGain -->
|
|
526 |
<templateGroup id="GeneratePrepareForFocusGain" ifEvents="prepareForFocusGain">
|
|
527 |
<template id="DeclarePrepareForFocusGainOverride" phase="OverriddenMethods"><![CDATA[
|
|
528 |
void PrepareForFocusGainL();
|
|
529 |
]]> </template>
|
|
530 |
|
|
531 |
<defineLocation id="PrepareForFocusGainOverride" baseLocation="MAIN_FILE"
|
|
532 |
owned="false"
|
|
533 |
location="function(${handlerClassName}::PrepareForFocusGainL())">
|
|
534 |
<template><![CDATA[
|
|
535 |
/**
|
|
536 |
* Handle focus change (override)
|
|
537 |
*/
|
|
538 |
void ${handlerClassName}::PrepareForFocusGainL()
|
|
539 |
{
|
|
540 |
${instance.attributes["base-container-class"]}::PrepareForFocusGainL();
|
|
541 |
}
|
|
542 |
]]>
|
|
543 |
</template>
|
|
544 |
</defineLocation>
|
|
545 |
|
|
546 |
<defineLocation id="PrepareForFocusGainBody" baseLocation="PrepareForFocusGainOverride"
|
|
547 |
location="region(Generated Contents)">
|
|
548 |
<template/>
|
|
549 |
</defineLocation>
|
|
550 |
|
|
551 |
<template id="InvokePrepareForFocusGainHandler" location="PrepareForFocusGainBody">
|
|
552 |
${event.handlerName}();
|
|
553 |
</template>
|
|
554 |
|
|
555 |
<template id="DeclarePrepareForFocusGainHandler" phase="UserHandlers">
|
|
556 |
void ${event.handlerName}();
|
|
557 |
</template>
|
|
558 |
|
|
559 |
<defineLocation id="PrepareForFocusGainHandlerMethod" baseLocation="MAIN_FILE"
|
|
560 |
owned="false"
|
|
561 |
isEventHandler="true"
|
|
562 |
location="function(${handlerClassName}::${event.handlerName}())">
|
|
563 |
<template><![CDATA[
|
|
564 |
/**
|
|
565 |
* Handle the ${event.eventName} event.
|
|
566 |
*/
|
|
567 |
void ${handlerClassName}::${event.handlerName}()
|
|
568 |
{
|
|
569 |
// TODO: implement ${event.eventName} event handler
|
|
570 |
}
|
|
571 |
]]>
|
|
572 |
</template>
|
|
573 |
</defineLocation>
|
|
574 |
|
|
575 |
<template id="RealizePrepareForFocusGainHandler" location="PrepareForFocusGainHandlerMethod" />
|
|
576 |
</templateGroup>
|
|
577 |
<!-- END EVENT prepareForFocusGain -->
|
|
578 |
|
|
579 |
<!-- BEGIN EVENT resourceChanged -->
|
|
580 |
<templateGroup id="GenerateResourceChanged" ifEvents="resourceChanged">
|
|
581 |
<template id="DeclareResourceChangedOverride" phase="OverriddenMethods"><![CDATA[
|
|
582 |
void HandleResourceChange( TInt aType );
|
|
583 |
]]> </template>
|
|
584 |
|
|
585 |
<defineLocation id="ResourceChangedOverride" baseLocation="MAIN_FILE"
|
|
586 |
owned="false"
|
|
587 |
location="function(${handlerClassName}::HandleResourceChange(TInt))">
|
|
588 |
<template><![CDATA[
|
|
589 |
/**
|
|
590 |
* Handle global resource changes, such as scalable UI or skin events (override)
|
|
591 |
*/
|
|
592 |
void ${handlerClassName}::HandleResourceChange( TInt aType )
|
|
593 |
{
|
|
594 |
${instance.attributes["base-container-class"]}::HandleResourceChange( aType );
|
|
595 |
}
|
|
596 |
]]>
|
|
597 |
</template>
|
|
598 |
</defineLocation>
|
|
599 |
|
|
600 |
<defineLocation id="ResourceChangedBody" baseLocation="ResourceChangedOverride"
|
|
601 |
location="region(Generated Contents)">
|
|
602 |
<template/>
|
|
603 |
</defineLocation>
|
|
604 |
|
|
605 |
<template id="InvokeResourceChangedHandler" location="ResourceChangedBody">
|
|
606 |
${event.handlerName}( aType );
|
|
607 |
</template>
|
|
608 |
|
|
609 |
<template id="DeclareResourceChangedHandler" phase="UserHandlers">
|
|
610 |
void ${event.handlerName}( TInt aType );
|
|
611 |
</template>
|
|
612 |
|
|
613 |
<defineLocation id="ResourceChangedHandlerMethod" baseLocation="MAIN_FILE"
|
|
614 |
owned="false"
|
|
615 |
isEventHandler="true"
|
|
616 |
location="function(${handlerClassName}::${event.handlerName}(TInt))">
|
|
617 |
<template><![CDATA[
|
|
618 |
/**
|
|
619 |
* Handle the ${event.eventName} event.
|
|
620 |
*/
|
|
621 |
void ${handlerClassName}::${event.handlerName}( TInt aType )
|
|
622 |
{
|
|
623 |
// TODO: implement ${event.eventName} event handler
|
|
624 |
}
|
|
625 |
]]>
|
|
626 |
</template>
|
|
627 |
</defineLocation>
|
|
628 |
|
|
629 |
<template id="RealizeResourceChangedHandler" location="ResourceChangedHandlerMethod" />
|
|
630 |
</templateGroup>
|
|
631 |
<!-- END EVENT resourceChanged -->
|
|
632 |
|
|
633 |
<!-- BEGIN EVENT handleLongTapEvent -->
|
|
634 |
<templateGroup id="HandleLongTapEvent" ifEvents="handleLongTapEvent">
|
|
635 |
|
|
636 |
<template id="EventIncludes" phase="EventIncludes"><![CDATA[
|
|
637 |
#include <AknLongTapDetector.h>
|
|
638 |
]]> </template>
|
|
639 |
|
|
640 |
<template id="EventInterface" phase="BaseClassList">, MAknLongTapDetectorCallBack</template>
|
|
641 |
|
|
642 |
<template id="CallDetectorWithPointerEvent" location="HANDLEPOINTEREVENTL_METHOD_BODY"><![CDATA[
|
|
643 |
iLongTapDetector->PointerEventL( aPointerEvent );
|
|
644 |
]]> </template>
|
|
645 |
|
|
646 |
<expandMacro name="GenerateVirtualMethodOverrideForEventHandler"
|
|
647 |
IsOwned="false"
|
|
648 |
FunctionLocationId="HANDLELONGTAPEVENTL_METHOD"
|
|
649 |
FunctionArgs="const TPoint& aPenEventLocation, const TPoint& aPenEventScreenLocation"
|
|
650 |
FunctionName="HandleLongTapEventL"
|
|
651 |
DeclPhase="OverriddenMethods"
|
|
652 |
DefnLocation="MAIN_FILE">
|
|
653 |
<expandArgument name="FunctionComment">
|
|
654 |
/**
|
|
655 |
* Implement the HandleLongTapEventL method of MAknLongTapDetectorCallBack
|
|
656 |
*/
|
|
657 |
</expandArgument>
|
|
658 |
</expandMacro>
|
|
659 |
|
|
660 |
<expandMacro name="GenerateUserEventHandlerFunction"
|
|
661 |
FunctionLocationId="HANDLELONGTAP_EVENTHANDLER"
|
|
662 |
FunctionArgs="const TPoint& aPenEventLocation, const TPoint& aPenEventScreenLocation"
|
|
663 |
DeclPhase="UserHandlers"
|
|
664 |
DefnLocation="MAIN_FILE">
|
|
665 |
</expandMacro>
|
|
666 |
|
|
667 |
<template id="DeclareDetectorMember" phase="InstanceVariables">
|
|
668 |
CAknLongTapDetector* iLongTapDetector;
|
|
669 |
</template>
|
|
670 |
|
|
671 |
<template id="MainSystemIncludes" phase="MainSystemIncludes"><![CDATA[
|
|
672 |
#include <AknLongTapDetector.h>
|
|
673 |
]]> </template>
|
|
674 |
|
|
675 |
<template id="ClearDetectorMember" phase="Construct">
|
|
676 |
iLongTapDetector = NULL;
|
|
677 |
</template>
|
|
678 |
|
|
679 |
<template id="DestroyDetectorMember" phase="Destroy">
|
|
680 |
delete iLongTapDetector;
|
|
681 |
iLongTapDetector = NULL;
|
|
682 |
</template>
|
|
683 |
|
|
684 |
<template id="ConstructDetectorMember" phase="PostActivateL">
|
|
685 |
iLongTapDetector = CAknLongTapDetector::NewL( this );
|
|
686 |
</template>
|
|
687 |
|
|
688 |
</templateGroup>
|
|
689 |
<!-- END EVENT handleLongTapEvent -->
|
|
690 |
|
|
691 |
</sourceGen>
|
|
692 |
|
|
693 |
</component>
|
|
694 |
</componentDefinition>
|