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