2
|
1 |
<templateGroup ifEvents="leftSoftKeyPressed">
|
|
2 |
|
|
3 |
<template phase="UserHandlers">
|
|
4 |
TBool ${event.handlerName}( TInt aCommand );
|
|
5 |
</template>
|
|
6 |
|
|
7 |
<defineLocation id="LeftSoftKeyPressedMethod" baseLocation="MAIN_FILE"
|
|
8 |
owned="false"
|
|
9 |
isEventHandler="true"
|
|
10 |
location="function(${handlerClassName}::${event.handlerName}(TInt))">
|
|
11 |
<template><![CDATA[
|
|
12 |
/**
|
|
13 |
* Handle the ${event.eventName} event.
|
|
14 |
* @return ETrue if the command was handled, EFalse if not
|
|
15 |
*/
|
|
16 |
TBool ${handlerClassName}::${event.handlerName}( TInt aCommand )
|
|
17 |
{
|
|
18 |
// TODO: implement ${event.eventName} event handler
|
|
19 |
return EFalse;
|
|
20 |
}
|
|
21 |
]]>
|
|
22 |
</template>
|
|
23 |
</defineLocation>
|
|
24 |
|
|
25 |
<template location="LeftSoftKeyPressedMethod" />
|
|
26 |
|
|
27 |
<template form="HandleCommandSwitchDispatch" phase="SwitchContents"
|
|
28 |
ifEvents="leftSoftKeyPressed"><![CDATA[<%
|
|
29 |
var leftId = getCbaLeftId(instance);
|
|
30 |
if (leftId == "EAknSoftkeyOptions") {
|
|
31 |
// S60 explicitly stops further processing when Options is caught by the
|
|
32 |
// AknView::HandleCommandL() or AknAppUi::ProcessCommandL() routines
|
|
33 |
warning(formatString(lookupString("maskedLeftSoftKeyEventHandler"),
|
|
34 |
instance.name));
|
|
35 |
}
|
|
36 |
if (leftId != null && leftId != "") { %>
|
|
37 |
case ${leftId}:
|
|
38 |
commandHandled = ${event.handlerName}( aCommand );
|
|
39 |
break;
|
|
40 |
<% } %>]]> </template>
|
|
41 |
</templateGroup>
|
|
42 |
|
|
43 |
<templateGroup ifEvents="rightSoftKeyPressed">
|
|
44 |
|
|
45 |
<template phase="UserHandlers">
|
|
46 |
TBool ${event.handlerName}( TInt aCommand );
|
|
47 |
</template>
|
|
48 |
|
|
49 |
<defineLocation id="RightSoftKeyPressedMethod" baseLocation="MAIN_FILE"
|
|
50 |
owned="false"
|
|
51 |
isEventHandler="true"
|
|
52 |
location="function(${handlerClassName}::${event.handlerName}(TInt))">
|
|
53 |
<template><![CDATA[
|
|
54 |
/**
|
|
55 |
* Handle the ${event.eventName} event.
|
|
56 |
* @return ETrue if the command was handled, EFalse if not
|
|
57 |
*/
|
|
58 |
TBool ${handlerClassName}::${event.handlerName}( TInt aCommand )
|
|
59 |
{
|
|
60 |
// TODO: implement ${event.eventName} event handler
|
|
61 |
return EFalse;
|
|
62 |
}
|
|
63 |
]]>
|
|
64 |
</template>
|
|
65 |
</defineLocation>
|
|
66 |
|
|
67 |
<template location="RightSoftKeyPressedMethod" />
|
|
68 |
|
|
69 |
<template form="HandleCommandSwitchDispatch" phase="SwitchContents"
|
|
70 |
ifEvents="rightSoftKeyPressed"><![CDATA[<%
|
|
71 |
var rightId = getCbaRightId(instance);
|
|
72 |
if (rightId != null && rightId != "") { %>
|
|
73 |
case ${rightId}:
|
|
74 |
commandHandled = ${event.handlerName}( aCommand );
|
|
75 |
break;
|
|
76 |
<% } %>]]> </template>
|
|
77 |
</templateGroup> |