uidesigner/com.nokia.sdt.series60.componentlibrary/components/containers/CAknForm.component
author dan.podwall@nokia.com
Mon, 06 Apr 2009 14:00:50 -0500
changeset 50 9107fae37cee
parent 2 d760517a8095
permissions -rw-r--r--
merge on RCL_2_0
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
<componentDefinition xmlns="http://www.nokia.com/sdt/emf/component" 
cawthron
parents:
diff changeset
    10
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" 
cawthron
parents:
diff changeset
    11
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
cawthron
parents:
diff changeset
    12
	<component baseComponent="com.nokia.sdt.series60.DialogBase" 
cawthron
parents:
diff changeset
    13
			friendlyName="%friendlyName" 
cawthron
parents:
diff changeset
    14
			qualifiedName="com.nokia.sdt.series60.CAknForm" 
cawthron
parents:
diff changeset
    15
			category="Basic"
cawthron
parents:
diff changeset
    16
			instanceNameRoot="form"
cawthron
parents:
diff changeset
    17
			version="1.0">
cawthron
parents:
diff changeset
    18
		<documentation>
cawthron
parents:
diff changeset
    19
			<information>%information</information>
cawthron
parents:
diff changeset
    20
			<wizardDescription>%information</wizardDescription>
cawthron
parents:
diff changeset
    21
		</documentation>
cawthron
parents:
diff changeset
    22
		<symbian sdkName="com.nokia.series60" minSDKVersion="2.0" 
cawthron
parents:
diff changeset
    23
			className="CAknForm" classHelpTopic="" />
cawthron
parents:
diff changeset
    24
		<designerImages 
cawthron
parents:
diff changeset
    25
			smallIconFile="CAknForm_sm.png" 
cawthron
parents:
diff changeset
    26
			largeIconFile="CAknForm.png" 
cawthron
parents:
diff changeset
    27
			thumbnailFile="form_tn.png"/>
cawthron
parents:
diff changeset
    28
			
cawthron
parents:
diff changeset
    29
		<attributes>
cawthron
parents:
diff changeset
    30
			<attribute key="is-initial-content">true</attribute>
cawthron
parents:
diff changeset
    31
			<attribute key="has-builtin-options-menu">true</attribute>
cawthron
parents:
diff changeset
    32
			<attribute key="event-handler-target">true</attribute>
cawthron
parents:
diff changeset
    33
			<attribute key="base-container-class">CAknForm</attribute>
cawthron
parents:
diff changeset
    34
			<attribute key="base-control-observer-class">CAknForm</attribute>
cawthron
parents:
diff changeset
    35
			<attribute key="default-cba-value">R_AVKON_SOFTKEYS_OPTIONS_BACK</attribute>
cawthron
parents:
diff changeset
    36
			<attribute key="use-restricted-cba">true</attribute>
cawthron
parents:
diff changeset
    37
			<attribute key="associated-palette-drawer">Editors</attribute>
cawthron
parents:
diff changeset
    38
		</attributes>
cawthron
parents:
diff changeset
    39
cawthron
parents:
diff changeset
    40
		<properties>
cawthron
parents:
diff changeset
    41
			<property category="Form" name="EEikFormHideEmptyFields" type="boolean" default="false"
cawthron
parents:
diff changeset
    42
				descriptionKey="EEikFormHideEmptyFieldsKey" />
cawthron
parents:
diff changeset
    43
			<property category="Form" name="EEikFormShowBitmaps" type="boolean" default="false"
cawthron
parents:
diff changeset
    44
				descriptionKey="EEikFormShowBitmapsKey" />
cawthron
parents:
diff changeset
    45
			<property category="Form" name="EEikFormEditModeOnly" type="boolean" default="false"
cawthron
parents:
diff changeset
    46
				descriptionKey="EEikFormEditModeOnlyKey" />
cawthron
parents:
diff changeset
    47
			<property category="Form" name="EEikFormUseDoubleSpacedFormat" type="boolean" default="false"
cawthron
parents:
diff changeset
    48
				descriptionKey="EEikFormUseDoubleSpacedFormat" />
cawthron
parents:
diff changeset
    49
			<property category="Behavior" name="exitsApp" type="boolean" default="true"
cawthron
parents:
diff changeset
    50
				descriptionKey="exitsAppKey" />
cawthron
parents:
diff changeset
    51
		</properties>
cawthron
parents:
diff changeset
    52
		
cawthron
parents:
diff changeset
    53
		<extensionProperties name="default">
cawthron
parents:
diff changeset
    54
			<property category="Item" name="prompt" type="localizedString" default="prompt"
cawthron
parents:
diff changeset
    55
				descriptionKey="promptDescription"
cawthron
parents:
diff changeset
    56
				editorClass="com.nokia.sdt.symbian.ui.editors.ScalableTextEditorFactory" />
cawthron
parents:
diff changeset
    57
			<property category="Item" name="EEikDlgItemTakesEnterKey" 
cawthron
parents:
diff changeset
    58
				type="boolean" default="false"
cawthron
parents:
diff changeset
    59
				descriptionKey="EEikDlgItemTakesEnterKeyDescription" />
cawthron
parents:
diff changeset
    60
			<property category="Item" name="EEikDlgItemOfferAllHotKeys" 
cawthron
parents:
diff changeset
    61
				type="boolean" default="false"
cawthron
parents:
diff changeset
    62
				descriptionKey="EEikDlgItemOfferAllHotKeysDescription" />
cawthron
parents:
diff changeset
    63
			<property category="Item" name="EEikDlgItemSeparatorBefore" 
cawthron
parents:
diff changeset
    64
				type="boolean" default="false"
cawthron
parents:
diff changeset
    65
				descriptionKey="EEikDlgItemSeparatorBeforeDescription" /> 
cawthron
parents:
diff changeset
    66
			<compoundProperty category="Item" name="promptImage" 
cawthron
parents:
diff changeset
    67
				type="com.nokia.sdt.symbian.imageProperty"
cawthron
parents:
diff changeset
    68
				descriptionKey="promptImageDescription" />
cawthron
parents:
diff changeset
    69
		</extensionProperties>
cawthron
parents:
diff changeset
    70
	
cawthron
parents:
diff changeset
    71
		<implementations>
cawthron
parents:
diff changeset
    72
			<implementation>
cawthron
parents:
diff changeset
    73
				<interface id="com.nokia.sdt.datamodel.adapter.IVisualAppearance"/>
cawthron
parents:
diff changeset
    74
				<interface id="com.nokia.sdt.datamodel.adapter.ILayout"/>
cawthron
parents:
diff changeset
    75
				<interface id="com.nokia.sdt.datamodel.adapter.IScrollBoundsProvider"/>
cawthron
parents:
diff changeset
    76
				<code class="com.nokia.sdt.series60.component.AknFormVisualAndLayoutImplFactory"/>
cawthron
parents:
diff changeset
    77
			</implementation>
cawthron
parents:
diff changeset
    78
			<implementation>
cawthron
parents:
diff changeset
    79
				<interface id="com.nokia.sdt.datamodel.adapter.IPropertyExtenders"/>
cawthron
parents:
diff changeset
    80
				<script file="CAknForm_propertyExtenders.js" prototype="CAknFormPropertyExtenders"/>
cawthron
parents:
diff changeset
    81
			</implementation>
cawthron
parents:
diff changeset
    82
			<implementation>
cawthron
parents:
diff changeset
    83
				<interface id="com.nokia.sdt.datamodel.adapter.IQueryContainment"/>
cawthron
parents:
diff changeset
    84
				<script file="CAknForm_queryContainment.js" prototype="CAknFormQueryContainment"/>
cawthron
parents:
diff changeset
    85
			</implementation>
cawthron
parents:
diff changeset
    86
			</implementations>
cawthron
parents:
diff changeset
    87
	
cawthron
parents:
diff changeset
    88
		<sourceMapping>
cawthron
parents:
diff changeset
    89
			<mapResource struct="DIALOG" headers="avkon.rsg avkon.rh eikon.rh">
cawthron
parents:
diff changeset
    90
				<mapBitmaskMember property="." member="flags"
cawthron
parents:
diff changeset
    91
					includedProperties="wait notifyEsc modeless">
cawthron
parents:
diff changeset
    92
					<!-- initial blank entries force bits on -->
cawthron
parents:
diff changeset
    93
					<mapBitmaskValue properties="" value="EEikDialogFlagNoDrag" />
cawthron
parents:
diff changeset
    94
					<mapBitmaskValue properties="" value="EEikDialogFlagNoTitleBar" />
cawthron
parents:
diff changeset
    95
					<mapBitmaskValue properties="" value="EEikDialogFlagCbaButtons" />
cawthron
parents:
diff changeset
    96
					<mapBitmaskValue properties="" value="EEikDialogFlagFillAppClientRect" />
cawthron
parents:
diff changeset
    97
					
cawthron
parents:
diff changeset
    98
					<mapBitmaskValue properties="notifyEsc" value="EEikDialogFlagNotifyEsc" />
cawthron
parents:
diff changeset
    99
					<mapBitmaskValue properties="modeless" value="EEikDialogFlagModeless" />
cawthron
parents:
diff changeset
   100
					<mapBitmaskValue properties="wait" value="EEikDialogFlagWait" />
cawthron
parents:
diff changeset
   101
				</mapBitmaskMember>
cawthron
parents:
diff changeset
   102
	  		    <select property="[parent].[com.nokia.sdt.series60.CBARestricted]">
cawthron
parents:
diff changeset
   103
	   		        <choice value="">
cawthron
parents:
diff changeset
   104
	  		          <!-- no CBA -->
cawthron
parents:
diff changeset
   105
	  		        </choice>
cawthron
parents:
diff changeset
   106
	  		        <choice>
cawthron
parents:
diff changeset
   107
						<mapIdentifierMember property="[parent].[com.nokia.sdt.series60.CBARestricted].info" member="buttons" />
cawthron
parents:
diff changeset
   108
					</choice>
cawthron
parents:
diff changeset
   109
				</select>
cawthron
parents:
diff changeset
   110
				<mapResourceMember struct="FORM" property="." member="form" headers="eikon.rh">
cawthron
parents:
diff changeset
   111
				<mapBitmaskMember property="." member="flags"
cawthron
parents:
diff changeset
   112
					includedProperties="EEikFormHideEmptyFields EEikFormShowBitmaps EEikFormEditModeOnly EEikFormUseDoubleSpacedFormat">
cawthron
parents:
diff changeset
   113
					<mapBitmaskValue properties="EEikFormHideEmptyFields" value="EEikFormHideEmptyFields" />
cawthron
parents:
diff changeset
   114
					<mapBitmaskValue properties="EEikFormShowBitmaps" value="EEikFormShowBitmaps" />
cawthron
parents:
diff changeset
   115
					<mapBitmaskValue properties="EEikFormEditModeOnly" value="EEikFormEditModeOnly" />
cawthron
parents:
diff changeset
   116
					<mapBitmaskValue properties="EEikFormUseDoubleSpacedFormat" value="EEikFormUseDoubleSpacedFormat" />
cawthron
parents:
diff changeset
   117
				</mapBitmaskMember>
cawthron
parents:
diff changeset
   118
					<mapArrayMember property="." member="items">
cawthron
parents:
diff changeset
   119
						<select attribute="is-form-content">
cawthron
parents:
diff changeset
   120
							<!-- only map visible items, not menu bars, etc. -->
cawthron
parents:
diff changeset
   121
							<choice value="true">
cawthron
parents:
diff changeset
   122
								<mapResourceElement struct="DLG_LINE" headers="avkon.rh"
cawthron
parents:
diff changeset
   123
									instanceIdentifyingMember="id">
cawthron
parents:
diff changeset
   124
									<!-- looking at the current array element, always
cawthron
parents:
diff changeset
   125
										create a unique value from the dialog and instance name -->
cawthron
parents:
diff changeset
   126
									<mapEnumMember property="." member="type"
cawthron
parents:
diff changeset
   127
										nameAlgorithm="com.nokia.sdt.component.symbian.NAME_ALG_CONTROL_TYPE"
cawthron
parents:
diff changeset
   128
									/>
cawthron
parents:
diff changeset
   129
									<mapSimpleMember property="prompt" member="prompt"/>
cawthron
parents:
diff changeset
   130
									<mapEnumMember property="." member="id"
cawthron
parents:
diff changeset
   131
										uniqueValue="*"
cawthron
parents:
diff changeset
   132
										nameAlgorithm="com.nokia.sdt.component.symbian.NAME_ALG_DIALOG_LINE_ID"
cawthron
parents:
diff changeset
   133
									/>
cawthron
parents:
diff changeset
   134
									<!-- looking at the current array element, get the
cawthron
parents:
diff changeset
   135
										enumerator for the instance's control type -->
cawthron
parents:
diff changeset
   136
									<mapBitmaskMember property="." member="itemflags"
cawthron
parents:
diff changeset
   137
										includedProperties="EEikDlgItemTakesEnterKey EEikDlgItemOfferAllHotKeys EEikDlgItemSeparatorBefore">
cawthron
parents:
diff changeset
   138
										<mapBitmaskValue properties="EEikDlgItemTakesEnterKey" value="EEikDlgItemTakesEnterKey" />
cawthron
parents:
diff changeset
   139
										<mapBitmaskValue properties="EEikDlgItemOfferAllHotKeys" value="EEikDlgItemOfferAllHotKeys" />
cawthron
parents:
diff changeset
   140
										<mapBitmaskValue properties="EEikDlgItemSeparatorBefore" value="EEikDlgItemSeparatorBefore" />
cawthron
parents:
diff changeset
   141
									</mapBitmaskMember>
cawthron
parents:
diff changeset
   142
									<mapResourceMember property="." member="control"/>
cawthron
parents:
diff changeset
   143
								<!-- initialized in code for SVG support
cawthron
parents:
diff changeset
   144
									<mapSimpleMember property="promptImage.bmpfile" member="bmpfile"/>
cawthron
parents:
diff changeset
   145
									<mapIdentifierMember property="promptImage.bmpid" member="bmpid"/>
cawthron
parents:
diff changeset
   146
									// stupid header doesn't initialize bmpmask to -1
cawthron
parents:
diff changeset
   147
									<select property="promptImage.bmpmask">
cawthron
parents:
diff changeset
   148
										<choice value="">
cawthron
parents:
diff changeset
   149
											<mapFixedMember member="bmpmask" value="-1"/>
cawthron
parents:
diff changeset
   150
										</choice>
cawthron
parents:
diff changeset
   151
										<choice>
cawthron
parents:
diff changeset
   152
											<mapIdentifierMember property="promptImage.bmpmask" member="bmpmask"/>
cawthron
parents:
diff changeset
   153
										</choice>
cawthron
parents:
diff changeset
   154
									</select>
cawthron
parents:
diff changeset
   155
								-->
cawthron
parents:
diff changeset
   156
								</mapResourceElement>
cawthron
parents:
diff changeset
   157
							</choice>
cawthron
parents:
diff changeset
   158
							<!-- default case does nothing -->
cawthron
parents:
diff changeset
   159
							<choice/>
cawthron
parents:
diff changeset
   160
						</select>						
cawthron
parents:
diff changeset
   161
					</mapArrayMember>
cawthron
parents:
diff changeset
   162
				</mapResourceMember>
cawthron
parents:
diff changeset
   163
			</mapResource>
cawthron
parents:
diff changeset
   164
		</sourceMapping>
cawthron
parents:
diff changeset
   165
		
cawthron
parents:
diff changeset
   166
		<sourceGen forms="AppUi AknView RootAppUi">
cawthron
parents:
diff changeset
   167
		
cawthron
parents:
diff changeset
   168
			<!-- contributions as Form -->
cawthron
parents:
diff changeset
   169
cawthron
parents:
diff changeset
   170
			<defineLocation id="HEADER_FILE" domain="cpp" dir="${inc}" 
cawthron
parents:
diff changeset
   171
				file="${instanceName}.h"
cawthron
parents:
diff changeset
   172
				owned="false"
cawthron
parents:
diff changeset
   173
				location="">
cawthron
parents:
diff changeset
   174
			</defineLocation>
cawthron
parents:
diff changeset
   175
			
cawthron
parents:
diff changeset
   176
			<template location="HEADER_FILE">
cawthron
parents:
diff changeset
   177
#ifndef ${instanceName.toUpperCase()}_H
cawthron
parents:
diff changeset
   178
#define ${instanceName.toUpperCase()}_H
cawthron
parents:
diff changeset
   179
cawthron
parents:
diff changeset
   180
			</template>
cawthron
parents:
diff changeset
   181
			
cawthron
parents:
diff changeset
   182
			<defineLocation id="HEADER_INCLUDES" baseLocation="HEADER_FILE"
cawthron
parents:
diff changeset
   183
				location="region(Generated Includes)"
cawthron
parents:
diff changeset
   184
				filter="unique-includes">
cawthron
parents:
diff changeset
   185
			</defineLocation>
cawthron
parents:
diff changeset
   186
			
cawthron
parents:
diff changeset
   187
			<template location="HEADER_INCLUDES"><![CDATA[
cawthron
parents:
diff changeset
   188
#include <aknform.h>
cawthron
parents:
diff changeset
   189
]]>			</template>
cawthron
parents:
diff changeset
   190
cawthron
parents:
diff changeset
   191
			<defineLocation id="EVENT_INCLUDES" baseLocation="HEADER_FILE"
cawthron
parents:
diff changeset
   192
				owned="false"
cawthron
parents:
diff changeset
   193
				filter="unique-includes"
cawthron
parents:
diff changeset
   194
				location="region(Event Handler Includes)">
cawthron
parents:
diff changeset
   195
			</defineLocation>
cawthron
parents:
diff changeset
   196
			
cawthron
parents:
diff changeset
   197
			<template location="EVENT_INCLUDES" />
cawthron
parents:
diff changeset
   198
		
cawthron
parents:
diff changeset
   199
			<defineLocation id="HEADER_FORWARD_DECLARATIONS" baseLocation="HEADER_FILE"
cawthron
parents:
diff changeset
   200
				location="region(Generated Forward Declarations)">
cawthron
parents:
diff changeset
   201
				<template><![CDATA[
cawthron
parents:
diff changeset
   202
class MEikCommandObserver;		
cawthron
parents:
diff changeset
   203
]]>				</template>
cawthron
parents:
diff changeset
   204
			</defineLocation>	
cawthron
parents:
diff changeset
   205
				
cawthron
parents:
diff changeset
   206
			<template location="HEADER_FORWARD_DECLARATIONS"/>
cawthron
parents:
diff changeset
   207
			
cawthron
parents:
diff changeset
   208
	
cawthron
parents:
diff changeset
   209
			<defineLocation id="CLASS" baseLocation="HEADER_FILE"
cawthron
parents:
diff changeset
   210
				owned="false"
cawthron
parents:
diff changeset
   211
				location="class(${className})">
cawthron
parents:
diff changeset
   212
				<template><![CDATA[
cawthron
parents:
diff changeset
   213
/**
cawthron
parents:
diff changeset
   214
 * @class	${className} ${instanceName}.h
cawthron
parents:
diff changeset
   215
 */
cawthron
parents:
diff changeset
   216
class ${className} : public CAknForm
cawthron
parents:
diff changeset
   217
	{
cawthron
parents:
diff changeset
   218
public: // constructors and destructor
cawthron
parents:
diff changeset
   219
cawthron
parents:
diff changeset
   220
	${className}( MEikCommandObserver* aCommandObserver );
cawthron
parents:
diff changeset
   221
	static ${className}* NewL( MEikCommandObserver* aCommandObserver );
cawthron
parents:
diff changeset
   222
	static ${className}* NewLC( MEikCommandObserver* aCommandObserver );
cawthron
parents:
diff changeset
   223
	virtual ~${className}();
cawthron
parents:
diff changeset
   224
	
cawthron
parents:
diff changeset
   225
	// from CEikDialog
cawthron
parents:
diff changeset
   226
	TKeyResponse OfferKeyEventL( 
cawthron
parents:
diff changeset
   227
			const TKeyEvent& aKeyEvent, 
cawthron
parents:
diff changeset
   228
			TEventCode aType );
cawthron
parents:
diff changeset
   229
	
cawthron
parents:
diff changeset
   230
protected: 
cawthron
parents:
diff changeset
   231
	// from CAknDialog	
cawthron
parents:
diff changeset
   232
	void PreLayoutDynInitL();
cawthron
parents:
diff changeset
   233
	TBool OkToExitL( TInt aButtonId );
cawthron
parents:
diff changeset
   234
cawthron
parents:
diff changeset
   235
	// from CAknForm
cawthron
parents:
diff changeset
   236
	void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
cawthron
parents:
diff changeset
   237
	TBool QuerySaveChangesL();
cawthron
parents:
diff changeset
   238
	TBool SaveFormDataL(); 
cawthron
parents:
diff changeset
   239
	void DoNotSaveFormDataL();
cawthron
parents:
diff changeset
   240
cawthron
parents:
diff changeset
   241
private:
cawthron
parents:
diff changeset
   242
	void LoadFromDataL();
cawthron
parents:
diff changeset
   243
	MEikCommandObserver* iCommandObserver;
cawthron
parents:
diff changeset
   244
	};
cawthron
parents:
diff changeset
   245
]]>
cawthron
parents:
diff changeset
   246
				</template>
cawthron
parents:
diff changeset
   247
			</defineLocation>
cawthron
parents:
diff changeset
   248
			
cawthron
parents:
diff changeset
   249
			<template location="CLASS"/>
cawthron
parents:
diff changeset
   250
cawthron
parents:
diff changeset
   251
			<defineLocation id="CLASS_METHODS" baseLocation="CLASS"
cawthron
parents:
diff changeset
   252
				filter="unique-prototypes"
cawthron
parents:
diff changeset
   253
				location="region(Generated Methods)">
cawthron
parents:
diff changeset
   254
				<template><![CDATA[
cawthron
parents:
diff changeset
   255
public: <% contrib.indentAdjust(-1); %>
cawthron
parents:
diff changeset
   256
]]>				</template>
cawthron
parents:
diff changeset
   257
			</defineLocation>
cawthron
parents:
diff changeset
   258
			
cawthron
parents:
diff changeset
   259
			<template location="CLASS_METHODS"/>
cawthron
parents:
diff changeset
   260
cawthron
parents:
diff changeset
   261
		<defineLocation id="CLASS_TYPES" baseLocation="CLASS"
cawthron
parents:
diff changeset
   262
			location="region(Generated Type Declarations)">
cawthron
parents:
diff changeset
   263
				<template><![CDATA[
cawthron
parents:
diff changeset
   264
public: <% contrib.indentAdjust(-1); %>
cawthron
parents:
diff changeset
   265
]]>				</template>
cawthron
parents:
diff changeset
   266
			</defineLocation>
cawthron
parents:
diff changeset
   267
cawthron
parents:
diff changeset
   268
			<template location="CLASS_TYPES"/>
cawthron
parents:
diff changeset
   269
cawthron
parents:
diff changeset
   270
			<defineLocation id="CLASS_IVARS" baseLocation="CLASS"
cawthron
parents:
diff changeset
   271
			location="region(Generated Instance Variables)">
cawthron
parents:
diff changeset
   272
				<template><![CDATA[
cawthron
parents:
diff changeset
   273
private: <% contrib.indentAdjust(-1); %>
cawthron
parents:
diff changeset
   274
]]>				</template>
cawthron
parents:
diff changeset
   275
			</defineLocation>
cawthron
parents:
diff changeset
   276
cawthron
parents:
diff changeset
   277
			<template location="CLASS_IVARS"/>
cawthron
parents:
diff changeset
   278
cawthron
parents:
diff changeset
   279
			<defineLocation id="BASE_CLASS_LIST" baseLocation="CLASS"
cawthron
parents:
diff changeset
   280
				owned="false"
cawthron
parents:
diff changeset
   281
				filter="unique-bases"
cawthron
parents:
diff changeset
   282
				location="bases()">
cawthron
parents:
diff changeset
   283
			</defineLocation>
cawthron
parents:
diff changeset
   284
			
cawthron
parents:
diff changeset
   285
			<template location="BASE_CLASS_LIST" />
cawthron
parents:
diff changeset
   286
			
cawthron
parents:
diff changeset
   287
			<defineLocation id="CLASS_OVERRIDES" baseLocation="CLASS"
cawthron
parents:
diff changeset
   288
				owned="false"
cawthron
parents:
diff changeset
   289
				filter="unique-prototypes"
cawthron
parents:
diff changeset
   290
				location="region(Overridden Methods)">
cawthron
parents:
diff changeset
   291
				<template><![CDATA[
cawthron
parents:
diff changeset
   292
protected: <% contrib.indentAdjust(-1); %>
cawthron
parents:
diff changeset
   293
]]>				</template>
cawthron
parents:
diff changeset
   294
				
cawthron
parents:
diff changeset
   295
			</defineLocation>			
cawthron
parents:
diff changeset
   296
				
cawthron
parents:
diff changeset
   297
			<template location="CLASS_OVERRIDES"/>
cawthron
parents:
diff changeset
   298
			
cawthron
parents:
diff changeset
   299
			<defineLocation id="CLASS_USERHANDLERS" baseLocation="CLASS"
cawthron
parents:
diff changeset
   300
				owned="false"
cawthron
parents:
diff changeset
   301
				filter="unique-prototypes"
cawthron
parents:
diff changeset
   302
				location="region(User Handlers)">
cawthron
parents:
diff changeset
   303
				<template><![CDATA[
cawthron
parents:
diff changeset
   304
protected: <% contrib.indentAdjust(-1); %>
cawthron
parents:
diff changeset
   305
]]>				</template>
cawthron
parents:
diff changeset
   306
				
cawthron
parents:
diff changeset
   307
			</defineLocation>				
cawthron
parents:
diff changeset
   308
			
cawthron
parents:
diff changeset
   309
			<template location="CLASS_USERHANDLERS"/>
cawthron
parents:
diff changeset
   310
cawthron
parents:
diff changeset
   311
			<template location="HEADER_FILE">
cawthron
parents:
diff changeset
   312
#endif // ${instanceName.toUpperCase()}_H
cawthron
parents:
diff changeset
   313
			</template>
cawthron
parents:
diff changeset
   314
							
cawthron
parents:
diff changeset
   315
			<defineLocation id="MAIN_FILE" domain="cpp" dir="${src}" 
cawthron
parents:
diff changeset
   316
				file="${instanceName}.cpp"
cawthron
parents:
diff changeset
   317
				owned="false"
cawthron
parents:
diff changeset
   318
				location="">
cawthron
parents:
diff changeset
   319
			</defineLocation>
cawthron
parents:
diff changeset
   320
cawthron
parents:
diff changeset
   321
			<template location="MAIN_FILE"/>
cawthron
parents:
diff changeset
   322
			
cawthron
parents:
diff changeset
   323
			<defineLocation id="MAIN_SYSTEM_INCLUDES" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   324
				location="region(Generated System Includes)"
cawthron
parents:
diff changeset
   325
				filter="unique-includes">
cawthron
parents:
diff changeset
   326
				<template><![CDATA[
cawthron
parents:
diff changeset
   327
#include <avkon.hrh>
cawthron
parents:
diff changeset
   328
]]>				</template>
cawthron
parents:
diff changeset
   329
				<template><![CDATA[
cawthron
parents:
diff changeset
   330
#include <avkon.rsg>
cawthron
parents:
diff changeset
   331
]]>				</template>
cawthron
parents:
diff changeset
   332
				<template><![CDATA[
cawthron
parents:
diff changeset
   333
#include <eikmenup.h>
cawthron
parents:
diff changeset
   334
]]>				</template>
cawthron
parents:
diff changeset
   335
				<template><![CDATA[
cawthron
parents:
diff changeset
   336
#include <aknappui.h>
cawthron
parents:
diff changeset
   337
]]>				</template>
cawthron
parents:
diff changeset
   338
				<template><![CDATA[
cawthron
parents:
diff changeset
   339
#include <eikcmobs.h>
cawthron
parents:
diff changeset
   340
]]>				</template>
cawthron
parents:
diff changeset
   341
			</defineLocation>
cawthron
parents:
diff changeset
   342
cawthron
parents:
diff changeset
   343
			<template location="MAIN_SYSTEM_INCLUDES"/>
cawthron
parents:
diff changeset
   344
	
cawthron
parents:
diff changeset
   345
			<defineLocation id="MAIN_USER_INCLUDES" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   346
				location="region(Generated User Includes)"
cawthron
parents:
diff changeset
   347
				filter="unique-includes">
cawthron
parents:
diff changeset
   348
				<template><![CDATA[
cawthron
parents:
diff changeset
   349
#include "${instanceName}.h"
cawthron
parents:
diff changeset
   350
]]>				</template>
cawthron
parents:
diff changeset
   351
			</defineLocation>		
cawthron
parents:
diff changeset
   352
cawthron
parents:
diff changeset
   353
			<template location="MAIN_USER_INCLUDES"/>
cawthron
parents:
diff changeset
   354
			
cawthron
parents:
diff changeset
   355
			<inline>
cawthron
parents:
diff changeset
   356
if (Engine.formMatches(form, [""])) {
cawthron
parents:
diff changeset
   357
	this.getHrhFiles(contribs);
cawthron
parents:
diff changeset
   358
}
cawthron
parents:
diff changeset
   359
			</inline>
cawthron
parents:
diff changeset
   360
			
cawthron
parents:
diff changeset
   361
			<defineLocation id="CONSTANTS" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   362
				location="region(Generated Constants)">
cawthron
parents:
diff changeset
   363
			</defineLocation>
cawthron
parents:
diff changeset
   364
cawthron
parents:
diff changeset
   365
			<template location="CONSTANTS" />
cawthron
parents:
diff changeset
   366
cawthron
parents:
diff changeset
   367
			<defineLocation id="CONSTRUCTOR" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   368
				owned="false"
cawthron
parents:
diff changeset
   369
				location="function(${className}::${className}(MEikCommandObserver*))">
cawthron
parents:
diff changeset
   370
				<template><![CDATA[
cawthron
parents:
diff changeset
   371
/**
cawthron
parents:
diff changeset
   372
 * Construct the ${className} instance
cawthron
parents:
diff changeset
   373
 * @param aCommandObserver command observer
cawthron
parents:
diff changeset
   374
 */ 
cawthron
parents:
diff changeset
   375
${className}::${className}( MEikCommandObserver* aCommandObserver )
cawthron
parents:
diff changeset
   376
	{
cawthron
parents:
diff changeset
   377
	iCommandObserver = aCommandObserver;
cawthron
parents:
diff changeset
   378
	}
cawthron
parents:
diff changeset
   379
]]>
cawthron
parents:
diff changeset
   380
				</template>			
cawthron
parents:
diff changeset
   381
			</defineLocation>
cawthron
parents:
diff changeset
   382
			
cawthron
parents:
diff changeset
   383
			<template location="CONSTRUCTOR"/>
cawthron
parents:
diff changeset
   384
cawthron
parents:
diff changeset
   385
			<defineLocation id="CONSTRUCTOR_BODY" baseLocation="CONSTRUCTOR"
cawthron
parents:
diff changeset
   386
				location="region(Generated Contents)">
cawthron
parents:
diff changeset
   387
			</defineLocation>
cawthron
parents:
diff changeset
   388
cawthron
parents:
diff changeset
   389
			<template location="CONSTRUCTOR_BODY"/>
cawthron
parents:
diff changeset
   390
			
cawthron
parents:
diff changeset
   391
			<template location="MAIN_FILE"><![CDATA[
cawthron
parents:
diff changeset
   392
/**
cawthron
parents:
diff changeset
   393
 *  Creates an instance and initializes it.
cawthron
parents:
diff changeset
   394
 *  Instance is not left on cleanup stack.
cawthron
parents:
diff changeset
   395
 * @param aCommandObserver command observer
cawthron
parents:
diff changeset
   396
 * @return initialized instance of ${className}
cawthron
parents:
diff changeset
   397
 */
cawthron
parents:
diff changeset
   398
${className}* ${className}::NewL( MEikCommandObserver* aCommandObserver )
cawthron
parents:
diff changeset
   399
	{
cawthron
parents:
diff changeset
   400
	${className}* self = ${className}::NewLC( aCommandObserver );
cawthron
parents:
diff changeset
   401
	CleanupStack::Pop( self );
cawthron
parents:
diff changeset
   402
	return self;
cawthron
parents:
diff changeset
   403
	}
cawthron
parents:
diff changeset
   404
cawthron
parents:
diff changeset
   405
/**
cawthron
parents:
diff changeset
   406
 *  Creates an instance and initializes it.
cawthron
parents:
diff changeset
   407
 *  Instance is left on cleanup stack.
cawthron
parents:
diff changeset
   408
 * @param aCommandObserver command observer
cawthron
parents:
diff changeset
   409
 * @return new instance of ${className}
cawthron
parents:
diff changeset
   410
 */
cawthron
parents:
diff changeset
   411
${className}* ${className}::NewLC( MEikCommandObserver* aCommandObserver )
cawthron
parents:
diff changeset
   412
	{
cawthron
parents:
diff changeset
   413
	${className}* self = new ( ELeave ) ${className}( aCommandObserver );
cawthron
parents:
diff changeset
   414
	CleanupStack::PushL( self );
cawthron
parents:
diff changeset
   415
	self->ConstructL();
cawthron
parents:
diff changeset
   416
	return self;
cawthron
parents:
diff changeset
   417
	}
cawthron
parents:
diff changeset
   418
]]>			
cawthron
parents:
diff changeset
   419
			</template>
cawthron
parents:
diff changeset
   420
cawthron
parents:
diff changeset
   421
				<defineLocation id="OFFER_KEYEVENTL" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   422
					owned="false"
cawthron
parents:
diff changeset
   423
					location="function(${handlerClassName}::OfferKeyEventL(const TKeyEvent&amp;,TEventCode))">
cawthron
parents:
diff changeset
   424
					<template><![CDATA[
cawthron
parents:
diff changeset
   425
/** 
cawthron
parents:
diff changeset
   426
 * Handle key event (override)
cawthron
parents:
diff changeset
   427
 * @param aKeyEvent key event
cawthron
parents:
diff changeset
   428
 * @param aType event code
cawthron
parents:
diff changeset
   429
 * @return EKeyWasConsumed if the event was handled, else EKeyWasNotConsumed
cawthron
parents:
diff changeset
   430
 */
cawthron
parents:
diff changeset
   431
TKeyResponse ${className}::OfferKeyEventL( 
cawthron
parents:
diff changeset
   432
		const TKeyEvent& aKeyEvent, 
cawthron
parents:
diff changeset
   433
		TEventCode aType )
cawthron
parents:
diff changeset
   434
	{
cawthron
parents:
diff changeset
   435
	}
cawthron
parents:
diff changeset
   436
]]>				
cawthron
parents:
diff changeset
   437
					</template>
cawthron
parents:
diff changeset
   438
				</defineLocation>
cawthron
parents:
diff changeset
   439
				
cawthron
parents:
diff changeset
   440
			<defineLocation id="OFFER_KEYEVENTL_BODY" baseLocation="OFFER_KEYEVENTL"
cawthron
parents:
diff changeset
   441
				location="region(Generated Contents)"/>
cawthron
parents:
diff changeset
   442
cawthron
parents:
diff changeset
   443
		<template location="OFFER_KEYEVENTL_BODY"/>
cawthron
parents:
diff changeset
   444
			
cawthron
parents:
diff changeset
   445
		<template location="OFFER_KEYEVENTL"><![CDATA[
cawthron
parents:
diff changeset
   446
<% if (instance.rootContainer.isInstanceOf("com.nokia.sdt.series60.CAknView")) { 
cawthron
parents:
diff changeset
   447
%>if ( ( aKeyEvent.iCode == EKeyLeftArrow 
cawthron
parents:
diff changeset
   448
	|| aKeyEvent.iCode == EKeyRightArrow )
cawthron
parents:
diff changeset
   449
	&& !IsEditable() )
cawthron
parents:
diff changeset
   450
	{
cawthron
parents:
diff changeset
   451
	// allow the tab control to get the arrow keys
cawthron
parents:
diff changeset
   452
	return EKeyWasNotConsumed;
cawthron
parents:
diff changeset
   453
	}
cawthron
parents:
diff changeset
   454
<% } %>
cawthron
parents:
diff changeset
   455
]]>		</template>
cawthron
parents:
diff changeset
   456
cawthron
parents:
diff changeset
   457
			<!-- this is the same template emitted as an event include
cawthron
parents:
diff changeset
   458
			from ContainerBase; we need to omit to reduce duplicates -->
cawthron
parents:
diff changeset
   459
			<template id="OfferKeyEventOverrideContents" location="OFFER_KEYEVENTL"><![CDATA[
cawthron
parents:
diff changeset
   460
<% if (!instance.events["offerKeyEvent"]) {
cawthron
parents:
diff changeset
   461
%>return ${instance.attributes["base-container-class"]}::OfferKeyEventL( aKeyEvent, aType );
cawthron
parents:
diff changeset
   462
<%}%> ]]>	</template>
cawthron
parents:
diff changeset
   463
cawthron
parents:
diff changeset
   464
cawthron
parents:
diff changeset
   465
			<defineLocation id="DESTRUCTOR" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   466
				owned="false"
cawthron
parents:
diff changeset
   467
				location="function(${className}::~${className}())">
cawthron
parents:
diff changeset
   468
				<template><![CDATA[
cawthron
parents:
diff changeset
   469
/** 
cawthron
parents:
diff changeset
   470
 * Destroy any instance variables
cawthron
parents:
diff changeset
   471
 */
cawthron
parents:
diff changeset
   472
${className}::~${className}()
cawthron
parents:
diff changeset
   473
	{
cawthron
parents:
diff changeset
   474
	}
cawthron
parents:
diff changeset
   475
]]>
cawthron
parents:
diff changeset
   476
				</template>			
cawthron
parents:
diff changeset
   477
			</defineLocation>
cawthron
parents:
diff changeset
   478
			
cawthron
parents:
diff changeset
   479
			<template location="DESTRUCTOR"/>
cawthron
parents:
diff changeset
   480
cawthron
parents:
diff changeset
   481
			<defineLocation id="DESTRUCTOR_BODY" baseLocation="DESTRUCTOR"
cawthron
parents:
diff changeset
   482
				location="region(Generated Contents)">
cawthron
parents:
diff changeset
   483
			</defineLocation>
cawthron
parents:
diff changeset
   484
			
cawthron
parents:
diff changeset
   485
			<template location="DESTRUCTOR_BODY"/>
cawthron
parents:
diff changeset
   486
cawthron
parents:
diff changeset
   487
			
cawthron
parents:
diff changeset
   488
			<template location="MAIN_FILE"><![CDATA[
cawthron
parents:
diff changeset
   489
/**
cawthron
parents:
diff changeset
   490
 * Called to handle "Save" menu item. Displays save query.
cawthron
parents:
diff changeset
   491
 * @return TBool ETrue if the form data is to be saved, EFalse otherwise
cawthron
parents:
diff changeset
   492
 */
cawthron
parents:
diff changeset
   493
TBool ${className}::QuerySaveChangesL()
cawthron
parents:
diff changeset
   494
	{
cawthron
parents:
diff changeset
   495
	TBool isAnsYes( CAknForm::QuerySaveChangesL() );
cawthron
parents:
diff changeset
   496
	
cawthron
parents:
diff changeset
   497
	if ( isAnsYes )
cawthron
parents:
diff changeset
   498
		{
cawthron
parents:
diff changeset
   499
		SaveFormDataL();
cawthron
parents:
diff changeset
   500
		}
cawthron
parents:
diff changeset
   501
	else
cawthron
parents:
diff changeset
   502
		{
cawthron
parents:
diff changeset
   503
		DoNotSaveFormDataL();
cawthron
parents:
diff changeset
   504
		}
cawthron
parents:
diff changeset
   505
cawthron
parents:
diff changeset
   506
	return isAnsYes;
cawthron
parents:
diff changeset
   507
	}
cawthron
parents:
diff changeset
   508
cawthron
parents:
diff changeset
   509
/**
cawthron
parents:
diff changeset
   510
 * Called from QuerySaveChangesL when changes made to the form are to be saved.
cawthron
parents:
diff changeset
   511
 * @return TBool ETrue if the form data has been saved, EFalse otherwise
cawthron
parents:
diff changeset
   512
 */
cawthron
parents:
diff changeset
   513
TBool ${className}::SaveFormDataL()
cawthron
parents:
diff changeset
   514
	{
cawthron
parents:
diff changeset
   515
	// TODO save values
cawthron
parents:
diff changeset
   516
	return ETrue;
cawthron
parents:
diff changeset
   517
	}
cawthron
parents:
diff changeset
   518
cawthron
parents:
diff changeset
   519
/**
cawthron
parents:
diff changeset
   520
 * Called from QuerySaveChangesL when changes made to the form are discarded.
cawthron
parents:
diff changeset
   521
 */
cawthron
parents:
diff changeset
   522
void ${className}::DoNotSaveFormDataL()
cawthron
parents:
diff changeset
   523
	{
cawthron
parents:
diff changeset
   524
	LoadFromDataL();
cawthron
parents:
diff changeset
   525
	}
cawthron
parents:
diff changeset
   526
cawthron
parents:
diff changeset
   527
/**
cawthron
parents:
diff changeset
   528
 * Called from DoNotSaveFormDataL when changes are cancelled.
cawthron
parents:
diff changeset
   529
 * Called from PreLayoutDynInitL to load initial values if needed.
cawthron
parents:
diff changeset
   530
 */
cawthron
parents:
diff changeset
   531
void ${className}::LoadFromDataL()
cawthron
parents:
diff changeset
   532
	{
cawthron
parents:
diff changeset
   533
	// TODO load saved values	
cawthron
parents:
diff changeset
   534
cawthron
parents:
diff changeset
   535
	}
cawthron
parents:
diff changeset
   536
]]>
cawthron
parents:
diff changeset
   537
				</template>			
cawthron
parents:
diff changeset
   538
			
cawthron
parents:
diff changeset
   539
			<defineLocation id="PRELAYOUTDYNINITL" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   540
				owned="false"
cawthron
parents:
diff changeset
   541
				location="function(${className}::PreLayoutDynInitL())">
cawthron
parents:
diff changeset
   542
				<template><![CDATA[
cawthron
parents:
diff changeset
   543
/**
cawthron
parents:
diff changeset
   544
 * Initialize controls and settings before a Form is laid out.  (override)
cawthron
parents:
diff changeset
   545
 */
cawthron
parents:
diff changeset
   546
void ${className}::PreLayoutDynInitL()
cawthron
parents:
diff changeset
   547
	{
cawthron
parents:
diff changeset
   548
	}
cawthron
parents:
diff changeset
   549
]]>				
cawthron
parents:
diff changeset
   550
				</template>			
cawthron
parents:
diff changeset
   551
			</defineLocation>
cawthron
parents:
diff changeset
   552
			
cawthron
parents:
diff changeset
   553
			<template location="PRELAYOUTDYNINITL"/>
cawthron
parents:
diff changeset
   554
			
cawthron
parents:
diff changeset
   555
			<defineLocation id="PRELAYOUTDYNINITL_BODY" baseLocation="PRELAYOUTDYNINITL"
cawthron
parents:
diff changeset
   556
				location="region(Generated Contents)">
cawthron
parents:
diff changeset
   557
			</defineLocation>
cawthron
parents:
diff changeset
   558
cawthron
parents:
diff changeset
   559
			<template location="PRELAYOUTDYNINITL_BODY"/>
cawthron
parents:
diff changeset
   560
cawthron
parents:
diff changeset
   561
			<template location="PRELAYOUTDYNINITL">
cawthron
parents:
diff changeset
   562
LoadFromDataL();
cawthron
parents:
diff changeset
   563
			</template>
cawthron
parents:
diff changeset
   564
cawthron
parents:
diff changeset
   565
			<defineLocation id="DYNINITMENUPANEL" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   566
				owned="false"
cawthron
parents:
diff changeset
   567
				location="function(${className}::DynInitMenuPaneL(TInt, CEikMenuPane*))">
cawthron
parents:
diff changeset
   568
				<template><![CDATA[
cawthron
parents:
diff changeset
   569
/**
cawthron
parents:
diff changeset
   570
 * Called when built-in menu is displayed.  (override)
cawthron
parents:
diff changeset
   571
 * CAknForm has a built-in menu. In view mode, the only menu item is "Edit" that switches the form to edit mode.
cawthron
parents:
diff changeset
   572
 * In edit mode, the items are "Add field" "Save" "Edit label" and "Delete field"
cawthron
parents:
diff changeset
   573
 * The code below removes all edit mode items except for "Save"
cawthron
parents:
diff changeset
   574
 * To use these items, remove the appropriate lines and override the appropriate CAknForm methods.
cawthron
parents:
diff changeset
   575
 * (E.g., to handle "Add field" remove the line for EAknFormCmdAdd and override CAknForm::AddItemL())
cawthron
parents:
diff changeset
   576
 */
cawthron
parents:
diff changeset
   577
void ${className}::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane )
cawthron
parents:
diff changeset
   578
	{
cawthron
parents:
diff changeset
   579
	CAknForm::DynInitMenuPaneL( aResourceId, aMenuPane );
cawthron
parents:
diff changeset
   580
	
cawthron
parents:
diff changeset
   581
	if ( aResourceId == R_AVKON_FORM_MENUPANE )
cawthron
parents:
diff changeset
   582
		{
cawthron
parents:
diff changeset
   583
		aMenuPane->SetItemDimmed( EAknFormCmdAdd, ETrue );
cawthron
parents:
diff changeset
   584
		aMenuPane->SetItemDimmed( EAknFormCmdLabel, ETrue );
cawthron
parents:
diff changeset
   585
		aMenuPane->SetItemDimmed( EAknFormCmdDelete, ETrue );
cawthron
parents:
diff changeset
   586
cawthron
parents:
diff changeset
   587
		/* 
cawthron
parents:
diff changeset
   588
		// sample code to add a custom item with command id 'myCommandId'
cawthron
parents:
diff changeset
   589
		TInt pos;
cawthron
parents:
diff changeset
   590
		if ( !aMenuPane->MenuItemExists( myCommandId, pos ) )
cawthron
parents:
diff changeset
   591
			{
cawthron
parents:
diff changeset
   592
			CEikMenuPaneItem::SData menuItem;
cawthron
parents:
diff changeset
   593
			menuItem.iCommandId = myCommandId;
cawthron
parents:
diff changeset
   594
			menuItem.iCascadeId = 0;	// set for submenus
cawthron
parents:
diff changeset
   595
			menuItem.iFlags = 0;		// e.g. EEikMenuItemDimmed
cawthron
parents:
diff changeset
   596
			menuItem.iText = KMyCommandIdText;
cawthron
parents:
diff changeset
   597
			menuItem.iExtraText = _L("");
cawthron
parents:
diff changeset
   598
			aMenuPane->AddMenuItemL( menuItem );
cawthron
parents:
diff changeset
   599
			}
cawthron
parents:
diff changeset
   600
		*/
cawthron
parents:
diff changeset
   601
		}
cawthron
parents:
diff changeset
   602
	}
cawthron
parents:
diff changeset
   603
]]>				
cawthron
parents:
diff changeset
   604
				</template>			
cawthron
parents:
diff changeset
   605
			</defineLocation>
cawthron
parents:
diff changeset
   606
			
cawthron
parents:
diff changeset
   607
			<template location="DYNINITMENUPANEL"/>
cawthron
parents:
diff changeset
   608
			
cawthron
parents:
diff changeset
   609
			<defineLocation id="DYNINITMENUPANEL_BODY" baseLocation="DYNINITMENUPANEL"
cawthron
parents:
diff changeset
   610
				owned="true"
cawthron
parents:
diff changeset
   611
				location="region(Generated Code)"/>
cawthron
parents:
diff changeset
   612
				
cawthron
parents:
diff changeset
   613
			<template location="DYNINITMENUPANEL_BODY"><![CDATA[
cawthron
parents:
diff changeset
   614
<%	var event = instance.events['dynInitMenuPane'];
cawthron
parents:
diff changeset
   615
	if (event) {%>
cawthron
parents:
diff changeset
   616
${event.handlerName}( aResourceId, aMenuPane );
cawthron
parents:
diff changeset
   617
<% } %>
cawthron
parents:
diff changeset
   618
]]>			</template>
cawthron
parents:
diff changeset
   619
			
cawthron
parents:
diff changeset
   620
			<defineLocation id="OKTOEXITL" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   621
				owned="false"
cawthron
parents:
diff changeset
   622
				location="function(${className}::OkToExitL(TInt))">
cawthron
parents:
diff changeset
   623
				<template><![CDATA[
cawthron
parents:
diff changeset
   624
/**
cawthron
parents:
diff changeset
   625
 * Handle a button press and tell whether it closes the dialog.  (override)  
cawthron
parents:
diff changeset
   626
 * @param aButtonId the identifier for the button (avkon.hrh)
cawthron
parents:
diff changeset
   627
 */
cawthron
parents:
diff changeset
   628
TBool ${className}::OkToExitL( TInt aButtonId )
cawthron
parents:
diff changeset
   629
	{
cawthron
parents:
diff changeset
   630
	}
cawthron
parents:
diff changeset
   631
]]>
cawthron
parents:
diff changeset
   632
				</template>			
cawthron
parents:
diff changeset
   633
			</defineLocation>
cawthron
parents:
diff changeset
   634
			
cawthron
parents:
diff changeset
   635
			<template location="OKTOEXITL"/>
cawthron
parents:
diff changeset
   636
			
cawthron
parents:
diff changeset
   637
			<defineLocation id="OKTOEXITL_BODY" baseLocation="OKTOEXITL"
cawthron
parents:
diff changeset
   638
				location="region(Generated Code)">
cawthron
parents:
diff changeset
   639
			</defineLocation>
cawthron
parents:
diff changeset
   640
		
cawthron
parents:
diff changeset
   641
			<inline scope="prototype">
cawthron
parents:
diff changeset
   642
include("../cba/cbaLibrary.js")
cawthron
parents:
diff changeset
   643
include("containerLibrary.js")
cawthron
parents:
diff changeset
   644
			</inline>			
cawthron
parents:
diff changeset
   645
cawthron
parents:
diff changeset
   646
			<template location="OKTOEXITL_BODY"><![CDATA[
cawthron
parents:
diff changeset
   647
<% if (properties.exitsApp) { 
cawthron
parents:
diff changeset
   648
	var id = findCbaRightId(instance.parent.children);
cawthron
parents:
diff changeset
   649
%>
cawthron
parents:
diff changeset
   650
if ( aButtonId == ${id} )
cawthron
parents:
diff changeset
   651
	{
cawthron
parents:
diff changeset
   652
	if ( CAknForm::OkToExitL( EAknSoftkeyBack ) )
cawthron
parents:
diff changeset
   653
		{
cawthron
parents:
diff changeset
   654
		iAvkonAppUi->ProcessCommandL( EEikCmdExit );
cawthron
parents:
diff changeset
   655
		}
cawthron
parents:
diff changeset
   656
	else
cawthron
parents:
diff changeset
   657
		{
cawthron
parents:
diff changeset
   658
		return EFalse;
cawthron
parents:
diff changeset
   659
		}
cawthron
parents:
diff changeset
   660
	}<% } %>
cawthron
parents:
diff changeset
   661
]]>			</template>	
cawthron
parents:
diff changeset
   662
cawthron
parents:
diff changeset
   663
			<template location="OKTOEXITL"><![CDATA[
cawthron
parents:
diff changeset
   664
// The '${lookupString("exitsApp")}' property automatically adds code to exit the 
cawthron
parents:
diff changeset
   665
// application when the right soft key is pressed. If this property is set to false, 
cawthron
parents:
diff changeset
   666
// and AddToStackL has been called on the Form object (e.g., it was not shown as a dialog), 
cawthron
parents:
diff changeset
   667
// code must be added manually to avoid a panic when exiting the application.
cawthron
parents:
diff changeset
   668
return CAknForm::OkToExitL( aButtonId );
cawthron
parents:
diff changeset
   669
]]>			</template>	
cawthron
parents:
diff changeset
   670
cawthron
parents:
diff changeset
   671
			<useTemplateGroup ids="GeneratePrepareForFocusTransition GeneratePageChanged GenerateLineChanged"/>
cawthron
parents:
diff changeset
   672
			<useTemplateGroup ids="GenerateProcessCommand GenerateOfferKeyToApp"/>
cawthron
parents:
diff changeset
   673
			<useTemplateGroup ids="GenerateFocusChanged"/>
cawthron
parents:
diff changeset
   674
			<useTemplateGroup ids="GenerateSizeChanged GeneratePositionChanged"/>
cawthron
parents:
diff changeset
   675
			<useTemplateGroup ids="GenerateDraw GenerateOfferKeyEvent"/>
cawthron
parents:
diff changeset
   676
			<useTemplateGroup ids="GeneratePrepareForFocusLoss GeneratePrepareForFocusGain"/>
cawthron
parents:
diff changeset
   677
cawthron
parents:
diff changeset
   678
<!-- BEGIN EVENT resourceChanged -->
cawthron
parents:
diff changeset
   679
			<templateGroup id="GenerateResourceChanged" ifEvents="resourceChanged">
cawthron
parents:
diff changeset
   680
				<template id="DeclareResourceChangedOverride" phase="OverriddenMethods"><![CDATA[
cawthron
parents:
diff changeset
   681
void HandleResourceChange( TInt aType );
cawthron
parents:
diff changeset
   682
]]>				</template>
cawthron
parents:
diff changeset
   683
cawthron
parents:
diff changeset
   684
				<defineLocation id="ResourceChangedOverride" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   685
					owned="false"
cawthron
parents:
diff changeset
   686
					location="function(${handlerClassName}::HandleResourceChange(TInt))">
cawthron
parents:
diff changeset
   687
					<template><![CDATA[
cawthron
parents:
diff changeset
   688
/** 
cawthron
parents:
diff changeset
   689
 * Handle global resource changes, such as scalable UI or skin events (override)
cawthron
parents:
diff changeset
   690
 */
cawthron
parents:
diff changeset
   691
void ${handlerClassName}::HandleResourceChange( TInt aType )
cawthron
parents:
diff changeset
   692
	{
cawthron
parents:
diff changeset
   693
	${instance.attributes["base-container-class"]}::HandleResourceChange( aType );
cawthron
parents:
diff changeset
   694
	}
cawthron
parents:
diff changeset
   695
]]>				
cawthron
parents:
diff changeset
   696
					</template>
cawthron
parents:
diff changeset
   697
				</defineLocation>
cawthron
parents:
diff changeset
   698
				
cawthron
parents:
diff changeset
   699
			<defineLocation id="ResourceChangedBody" baseLocation="ResourceChangedOverride"
cawthron
parents:
diff changeset
   700
				location="region(Generated Contents)">
cawthron
parents:
diff changeset
   701
				<template/>
cawthron
parents:
diff changeset
   702
			</defineLocation>
cawthron
parents:
diff changeset
   703
			
cawthron
parents:
diff changeset
   704
			<template id="InvokeResourceChangedHandler" location="ResourceChangedBody">
cawthron
parents:
diff changeset
   705
${event.handlerName}( aType );
cawthron
parents:
diff changeset
   706
			</template>
cawthron
parents:
diff changeset
   707
cawthron
parents:
diff changeset
   708
			<template id="DeclareResourceChangedHandler" phase="UserHandlers">
cawthron
parents:
diff changeset
   709
void ${event.handlerName}( TInt aType );
cawthron
parents:
diff changeset
   710
			</template>
cawthron
parents:
diff changeset
   711
cawthron
parents:
diff changeset
   712
			<defineLocation id="ResourceChangedHandlerMethod" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   713
				owned="false"
cawthron
parents:
diff changeset
   714
				isEventHandler="true"
cawthron
parents:
diff changeset
   715
				location="function(${handlerClassName}::${event.handlerName}(TInt))">
cawthron
parents:
diff changeset
   716
			<template><![CDATA[
cawthron
parents:
diff changeset
   717
/** 
cawthron
parents:
diff changeset
   718
 * Handle the ${event.eventName} event.
cawthron
parents:
diff changeset
   719
 */
cawthron
parents:
diff changeset
   720
void ${handlerClassName}::${event.handlerName}( TInt aType )
cawthron
parents:
diff changeset
   721
	{
cawthron
parents:
diff changeset
   722
	// TODO: implement ${event.eventName} event handler
cawthron
parents:
diff changeset
   723
	}
cawthron
parents:
diff changeset
   724
]]>				
cawthron
parents:
diff changeset
   725
				</template>
cawthron
parents:
diff changeset
   726
			</defineLocation>
cawthron
parents:
diff changeset
   727
			
cawthron
parents:
diff changeset
   728
			<template id="RealizeResourceChangedHandler" location="ResourceChangedHandlerMethod" />
cawthron
parents:
diff changeset
   729
			</templateGroup>
cawthron
parents:
diff changeset
   730
<!-- END EVENT resourceChanged -->		
cawthron
parents:
diff changeset
   731
cawthron
parents:
diff changeset
   732
<!-- BEGIN EVENT dynInitMenuPane -->
cawthron
parents:
diff changeset
   733
			<templateGroup id="GenerateDynInitMenuPaneForForm" ifEvents="dynInitMenuPane">
cawthron
parents:
diff changeset
   734
cawthron
parents:
diff changeset
   735
			<template id="DeclareDynInitMenuPaneHandler" phase="UserHandlers">
cawthron
parents:
diff changeset
   736
void ${event.handlerName}( TInt aResourceId, CEikMenuPane* aMenuPane );
cawthron
parents:
diff changeset
   737
			</template>
cawthron
parents:
diff changeset
   738
cawthron
parents:
diff changeset
   739
			<defineLocation id="DynInitMenuPaneHandlerMethod" baseLocation="MAIN_FILE"
cawthron
parents:
diff changeset
   740
				owned="false"
cawthron
parents:
diff changeset
   741
				isEventHandler="true"
cawthron
parents:
diff changeset
   742
				location="function(${handlerClassName}::${event.handlerName}(TInt, CEikMenuPane*))">
cawthron
parents:
diff changeset
   743
			<template><![CDATA[
cawthron
parents:
diff changeset
   744
/** 
cawthron
parents:
diff changeset
   745
 * Handle the ${event.eventName} event.
cawthron
parents:
diff changeset
   746
 */
cawthron
parents:
diff changeset
   747
void ${handlerClassName}::${event.handlerName}( TInt aResourceId, CEikMenuPane* aMenuPane )
cawthron
parents:
diff changeset
   748
	{
cawthron
parents:
diff changeset
   749
	// TODO: implement ${event.eventName} event handler
cawthron
parents:
diff changeset
   750
	}
cawthron
parents:
diff changeset
   751
]]>				
cawthron
parents:
diff changeset
   752
				</template>
cawthron
parents:
diff changeset
   753
			</defineLocation>
cawthron
parents:
diff changeset
   754
			
cawthron
parents:
diff changeset
   755
			<template id="RealizeDynInitMenuPaneHandler" location="DynInitMenuPaneHandlerMethod" />
cawthron
parents:
diff changeset
   756
			</templateGroup>
cawthron
parents:
diff changeset
   757
<!-- END EVENT dynInitMenuPane -->
cawthron
parents:
diff changeset
   758
cawthron
parents:
diff changeset
   759
			
cawthron
parents:
diff changeset
   760
			<!-- gather child contributions -->
cawthron
parents:
diff changeset
   761
cawthron
parents:
diff changeset
   762
			<inline scope="prototype">
cawthron
parents:
diff changeset
   763
			include("../srcgenLibrary.js");
cawthron
parents:
diff changeset
   764
			</inline>
cawthron
parents:
diff changeset
   765
cawthron
parents:
diff changeset
   766
			<inline scope="prototype"><![CDATA[
cawthron
parents:
diff changeset
   767
${jsObject}.prototype.gatherFormLineImageContribs = function(contribs, instance) {
cawthron
parents:
diff changeset
   768
	var contrib;
cawthron
parents:
diff changeset
   769
cawthron
parents:
diff changeset
   770
	var any = false;	
cawthron
parents:
diff changeset
   771
	for (var c in instance.children) {
cawthron
parents:
diff changeset
   772
		var child = instance.children[c];
cawthron
parents:
diff changeset
   773
		if (!child.component.attributes["is-form-content"])
cawthron
parents:
diff changeset
   774
			continue;
cawthron
parents:
diff changeset
   775
		var enm = Engine.findBuiltinOrGeneratedEnumeratorForAlgorithm(
cawthron
parents:
diff changeset
   776
			child, ".", "com.nokia.sdt.component.symbian.NAME_ALG_DIALOG_LINE_ID");
cawthron
parents:
diff changeset
   777
		if (enm != null && isImagePropertySet(child.properties.promptImage)) {
cawthron
parents:
diff changeset
   778
cawthron
parents:
diff changeset
   779
			if (!any) {
cawthron
parents:
diff changeset
   780
				contrib = Engine.createContributionForPhase("MainSystemIncludes");
cawthron
parents:
diff changeset
   781
				contrib.setText("#include <eikcapc.h>\n");
cawthron
parents:
diff changeset
   782
				contribs.add(contrib);
cawthron
parents:
diff changeset
   783
			
cawthron
parents:
diff changeset
   784
				contrib = Engine.createContributionForPhase("PostInitialize");
cawthron
parents:
diff changeset
   785
				contrib.setText("CEikCaptionedControl* theLine;\n");
cawthron
parents:
diff changeset
   786
				contribs.add(contrib);
cawthron
parents:
diff changeset
   787
			
cawthron
parents:
diff changeset
   788
				any = true;
cawthron
parents:
diff changeset
   789
			}
cawthron
parents:
diff changeset
   790
		
cawthron
parents:
diff changeset
   791
			contrib = Engine.createContributionForPhase("PostInitialize");
cawthron
parents:
diff changeset
   792
			contrib.setFormattedText("theLine = Line( {1} );\n",
cawthron
parents:
diff changeset
   793
				[ instance.memberName, enm ]);
cawthron
parents:
diff changeset
   794
			contribs.add(contrib);
cawthron
parents:
diff changeset
   795
			
cawthron
parents:
diff changeset
   796
			setupImageFromPropertyViaTuple(contribs, child,	"PostInitialize", null, 0,
cawthron
parents:
diff changeset
   797
				child.properties.promptImage,
cawthron
parents:
diff changeset
   798
				"theLine->SetBitmapFromFileL( {0}, {1} );\n",
cawthron
parents:
diff changeset
   799
				"theLine->SetBitmapFromFileL( {0}, {1}, {2} );\n");
cawthron
parents:
diff changeset
   800
		}
cawthron
parents:
diff changeset
   801
	}		
cawthron
parents:
diff changeset
   802
}
cawthron
parents:
diff changeset
   803
cawthron
parents:
diff changeset
   804
]]>			</inline>
cawthron
parents:
diff changeset
   805
cawthron
parents:
diff changeset
   806
			<inline>
cawthron
parents:
diff changeset
   807
cawthron
parents:
diff changeset
   808
cawthron
parents:
diff changeset
   809
			if (form != 'RootAppUi') {
cawthron
parents:
diff changeset
   810
				
cawthron
parents:
diff changeset
   811
				if (Engine.formMatches(form, [ "AknView", "AppUi" ])) {
cawthron
parents:
diff changeset
   812
					// clear out any image stuff
cawthron
parents:
diff changeset
   813
					resetImagePropertyState(instance);
cawthron
parents:
diff changeset
   814
cawthron
parents:
diff changeset
   815
					// get default and dialog-specific contributions
cawthron
parents:
diff changeset
   816
					contribs.addAll(Engine.generateChildContributions(form+"|Dialog"))
cawthron
parents:
diff changeset
   817
			
cawthron
parents:
diff changeset
   818
					// set images dynamically		
cawthron
parents:
diff changeset
   819
					this.gatherFormLineImageContribs(contribs, instance);
cawthron
parents:
diff changeset
   820
					
cawthron
parents:
diff changeset
   821
				} else {
cawthron
parents:
diff changeset
   822
					// get specific desired contributions
cawthron
parents:
diff changeset
   823
					contribs.addAll(Engine.generateChildContributions(form))
cawthron
parents:
diff changeset
   824
				}
cawthron
parents:
diff changeset
   825
				
cawthron
parents:
diff changeset
   826
				Engine.collateContributionsByPhase(contribs, ["Initialize", "PostInitialize"]);
cawthron
parents:
diff changeset
   827
				
cawthron
parents:
diff changeset
   828
				// fix up the phases so they point to real locations
cawthron
parents:
diff changeset
   829
				Engine.assignLocationsForPhase(contribs, "ClassSource", "MAIN_FILE");
cawthron
parents:
diff changeset
   830
				Engine.assignLocationsForPhase(contribs, "ClassHeader", "HEADER_FILE");
cawthron
parents:
diff changeset
   831
cawthron
parents:
diff changeset
   832
				Engine.assignLocationsForPhase(contribs, "MainConstants", "CONSTANTS");
cawthron
parents:
diff changeset
   833
				Engine.assignLocationsForPhase(contribs, "MainSystemIncludes", "MAIN_SYSTEM_INCLUDES");
cawthron
parents:
diff changeset
   834
				Engine.assignLocationsForPhase(contribs, "MainUserIncludes", "MAIN_USER_INCLUDES");
cawthron
parents:
diff changeset
   835
				Engine.assignLocationsForPhase(contribs, "Construct", "CONSTRUCTOR_BODY");
cawthron
parents:
diff changeset
   836
				Engine.assignLocationsForPhase(contribs, "Initialize", "PRELAYOUTDYNINITL_BODY");
cawthron
parents:
diff changeset
   837
				Engine.assignLocationsForPhase(contribs, "PostInitialize", "PRELAYOUTDYNINITL_BODY");
cawthron
parents:
diff changeset
   838
				Engine.assignLocationsForPhase(contribs, "Destroy", "DESTRUCTOR_BODY");
cawthron
parents:
diff changeset
   839
				Engine.assignLocationsForPhase(contribs, "ClassTypeDeclarations", "CLASS_TYPES");
cawthron
parents:
diff changeset
   840
				Engine.assignLocationsForPhase(contribs, "BaseClassList", "BASE_CLASS_LIST");
cawthron
parents:
diff changeset
   841
				Engine.assignLocationsForPhase(contribs, "OverriddenMethods", "CLASS_OVERRIDES");
cawthron
parents:
diff changeset
   842
				Engine.assignLocationsForPhase(contribs, "UserHandlers", "CLASS_USERHANDLERS");
cawthron
parents:
diff changeset
   843
				Engine.assignLocationsForPhase(contribs, "EventIncludes", "EVENT_INCLUDES");
cawthron
parents:
diff changeset
   844
				
cawthron
parents:
diff changeset
   845
				Engine.assignLocationsForPhase(contribs, "HeaderIncludes", "HEADER_INCLUDES");
cawthron
parents:
diff changeset
   846
				Engine.assignLocationsForPhase(contribs, "ForwardDeclarations", "HEADER_FORWARD_DECLARATIONS");
cawthron
parents:
diff changeset
   847
				Engine.assignLocationsForPhase(contribs, "InstanceVariables", "CLASS_IVARS");
cawthron
parents:
diff changeset
   848
				Engine.assignLocationsForPhase(contribs, "ClassMethods", "CLASS_METHODS");
cawthron
parents:
diff changeset
   849
	
cawthron
parents:
diff changeset
   850
				//Engine.removeDuplicateContributionsForLocation(contribs, "HEADER_INCLUDES");
cawthron
parents:
diff changeset
   851
				Engine.removeDuplicateContributionsForLocation(contribs, "HEADER_FORWARD_DECLARATIONS");
cawthron
parents:
diff changeset
   852
				//Engine.removeDuplicateContributionsForLocation(contribs, "MAIN_SYSTEM_INCLUDES");
cawthron
parents:
diff changeset
   853
				//Engine.removeDuplicateContributionsForLocation(contribs, "MAIN_USER_INCLUDES");
cawthron
parents:
diff changeset
   854
				Engine.removeDuplicateContributionsForLocation(contribs, "DESTRUCTOR_BODY");
cawthron
parents:
diff changeset
   855
			}
cawthron
parents:
diff changeset
   856
						
cawthron
parents:
diff changeset
   857
			</inline>
cawthron
parents:
diff changeset
   858
cawthron
parents:
diff changeset
   859
			<template id="IncludeRsgFile" location="MAIN_SYSTEM_INCLUDES"><![CDATA[
cawthron
parents:
diff changeset
   860
#include <${resourceFileNameBase}.rsg>
cawthron
parents:
diff changeset
   861
]]>			</template>
cawthron
parents:
diff changeset
   862
cawthron
parents:
diff changeset
   863
			<!-- contributions as child  -->
cawthron
parents:
diff changeset
   864
cawthron
parents:
diff changeset
   865
			<template form="AknView" phase="MainUserIncludes">
cawthron
parents:
diff changeset
   866
#include "${instanceName}.h"
cawthron
parents:
diff changeset
   867
			</template>
cawthron
parents:
diff changeset
   868
cawthron
parents:
diff changeset
   869
			<template form="AknView" phase="ForwardDeclarations">
cawthron
parents:
diff changeset
   870
class ${className};
cawthron
parents:
diff changeset
   871
			</template>
cawthron
parents:
diff changeset
   872
cawthron
parents:
diff changeset
   873
			<template form="AknView" phase="InstanceVariables">
cawthron
parents:
diff changeset
   874
${className}* ${instanceMemberName};
cawthron
parents:
diff changeset
   875
			</template>
cawthron
parents:
diff changeset
   876
cawthron
parents:
diff changeset
   877
			<template form="AknView" phase="DoActivateL"><![CDATA[
cawthron
parents:
diff changeset
   878
if ( ${instanceMemberName} == NULL )
cawthron
parents:
diff changeset
   879
	{
cawthron
parents:
diff changeset
   880
	${className}* form = ${className}::NewL( this );
cawthron
parents:
diff changeset
   881
	form->SetMopParent( this ); <%
cawthron
parents:
diff changeset
   882
if ( properties.wait ) {
cawthron
parents:
diff changeset
   883
	var sb = newStatusBuilder();
cawthron
parents:
diff changeset
   884
	sb.add(IStatus.ERROR, lookupString("waitPropertySetInView"), [ instanceName ]);
cawthron
parents:
diff changeset
   885
	logStatus(sb.createStatus("", null));
cawthron
parents:
diff changeset
   886
	} %>
cawthron
parents:
diff changeset
   887
	form->ExecuteLD( ${resourceName$upper} );
cawthron
parents:
diff changeset
   888
	AppUi()->AddToStackL( *this, form );
cawthron
parents:
diff changeset
   889
	${instanceMemberName} = form;
cawthron
parents:
diff changeset
   890
	} 
cawthron
parents:
diff changeset
   891
]]>			</template>
cawthron
parents:
diff changeset
   892
			
cawthron
parents:
diff changeset
   893
			<template form="AknView" phase="DoDeactivate">
cawthron
parents:
diff changeset
   894
if ( ${instanceMemberName} != NULL )
cawthron
parents:
diff changeset
   895
	{
cawthron
parents:
diff changeset
   896
	AppUi()->RemoveFromStack( ${instanceMemberName} );
cawthron
parents:
diff changeset
   897
	delete ${instanceMemberName};
cawthron
parents:
diff changeset
   898
	${instanceMemberName} = NULL;
cawthron
parents:
diff changeset
   899
	}
cawthron
parents:
diff changeset
   900
			</template>
cawthron
parents:
diff changeset
   901
cawthron
parents:
diff changeset
   902
cawthron
parents:
diff changeset
   903
			<template form="RootAppUi" phase="MainUserIncludes">
cawthron
parents:
diff changeset
   904
#include "${instanceName}.h"
cawthron
parents:
diff changeset
   905
			</template>
cawthron
parents:
diff changeset
   906
cawthron
parents:
diff changeset
   907
			<template form="RootAppUi" phase="ForwardDeclarations">
cawthron
parents:
diff changeset
   908
class ${className};
cawthron
parents:
diff changeset
   909
			</template>
cawthron
parents:
diff changeset
   910
cawthron
parents:
diff changeset
   911
			<template form="RootAppUi" phase="InstanceVariables">
cawthron
parents:
diff changeset
   912
${className}* ${instanceMemberName};
cawthron
parents:
diff changeset
   913
			</template>
cawthron
parents:
diff changeset
   914
cawthron
parents:
diff changeset
   915
			<template form="RootAppUi" phase="Initialize"><![CDATA[
cawthron
parents:
diff changeset
   916
<% if (resourceName != null) { %>
cawthron
parents:
diff changeset
   917
${instanceMemberName} = ${className}::NewL( this );
cawthron
parents:
diff changeset
   918
${instanceMemberName}->SetMopParent( this );
cawthron
parents:
diff changeset
   919
${instanceMemberName}->ExecuteLD( ${resourceName$upper} );
cawthron
parents:
diff changeset
   920
AddToStackL( ${instanceMemberName} );
cawthron
parents:
diff changeset
   921
<% } %>
cawthron
parents:
diff changeset
   922
]]>			</template>
cawthron
parents:
diff changeset
   923
cawthron
parents:
diff changeset
   924
			<template form="RootAppUi" phase="Destroy">
cawthron
parents:
diff changeset
   925
if ( ${instanceMemberName} != NULL )
cawthron
parents:
diff changeset
   926
	{
cawthron
parents:
diff changeset
   927
	RemoveFromStack( ${instanceMemberName} );
cawthron
parents:
diff changeset
   928
	delete ${instanceMemberName};
cawthron
parents:
diff changeset
   929
	${instanceMemberName} = NULL;
cawthron
parents:
diff changeset
   930
	}
cawthron
parents:
diff changeset
   931
			</template>
cawthron
parents:
diff changeset
   932
cawthron
parents:
diff changeset
   933
		</sourceGen>
cawthron
parents:
diff changeset
   934
cawthron
parents:
diff changeset
   935
	</component>
cawthron
parents:
diff changeset
   936
</componentDefinition>