uidesigner/com.nokia.sdt.series60.componentlibrary/components/controls/CCoeControlBase.component
changeset 0 fb279309251b
equal deleted inserted replaced
-1:000000000000 0:fb279309251b
       
     1 <?xml version="1.0" encoding="UTF-8"?>
       
     2 <!-- Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -->
       
     3 <!-- All rights reserved. -->
       
     4 <!-- This component and the accompanying materials are made available -->
       
     5 <!-- under the terms of the License "Eclipse Public License v1.0" -->
       
     6 <!-- which accompanies this distribution, and is available -->
       
     7 <!-- at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     8 
       
     9 <componentDefinition xmlns="http://www.nokia.com/sdt/emf/component" 
       
    10 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
       
    11 
       
    12 	<!-- This component is the abstract base component for
       
    13 	     all Series 60 control components
       
    14 	 -->
       
    15 
       
    16 	<component 
       
    17 			qualifiedName="com.nokia.sdt.series60.CCoeControlBase" 
       
    18 			baseComponent="com.nokia.sdt.series60.ControlBase"
       
    19 			abstract="true"
       
    20 			version="1.0">
       
    21 		<symbian sdkName="com.nokia.series60" minSDKVersion="2.0"/>
       
    22 		<attributes>
       
    23 			<!-- redefine in actual control as name of C++ class to instantiate -->
       
    24 			<attribute key="cpp-class-name">CBase</attribute>
       
    25 		</attributes>
       
    26 		<events defaultEventName="stateChanged">
       
    27 		<!-- MCoeControlObserver events -->
       
    28 		<event name="prepareFocusTransition" category="Control" 
       
    29 				group="CCoeControl"
       
    30 			    handlerNameTemplate="Handle{title(name)}PrepareFocusTransitionL"
       
    31 			    descriptionKey="prepareFocusTransitionDescription"
       
    32 			/>
       
    33 		<event name="stateChanged" category="Control" 
       
    34 				group="CCoeControl"
       
    35 			    handlerNameTemplate="Handle{title(name)}StateChangedL"
       
    36 			    descriptionKey="stateChangedDescription"
       
    37 			/>
       
    38 		<event name="requestingExit" category="Control" 
       
    39 				group="CCoeControl"
       
    40 			    handlerNameTemplate="Handle{title(name)}RequestingExitL"
       
    41 			    descriptionKey="requestingExitDescription"
       
    42 			/>
       
    43 		<event name="requestingCancel" category="Control" 
       
    44 				group="CCoeControl"
       
    45 			    handlerNameTemplate="Handle{title(name)}RequestingCancelL"
       
    46 			    descriptionKey="requestingCancelDescription"
       
    47 			/>
       
    48 		<event name="requestingFocus" category="Control" 
       
    49 				group="CCoeControl"
       
    50 			    handlerNameTemplate="Handle{title(name)}RequestingFocusL"
       
    51 			    descriptionKey="requestingFocusDescription"
       
    52 			/>
       
    53 		<event name="interactionRefused" category="Control" 
       
    54 				group="CCoeControl"
       
    55 			    handlerNameTemplate="Handle{title(name)}InteractionRefusedL"
       
    56 			    descriptionKey="interactionRefusedDescription"
       
    57 			/>
       
    58 
       
    59 		<event name="editingStarted" category="Setting Item"
       
    60 				group="SettingsList"
       
    61 		 	   handlerNameTemplate="Handle{title(name)}EditingStartedL" 
       
    62 			    descriptionKey="editingStartedDescription"
       
    63 		    />
       
    64 		<event name="editingStopped"  category="Setting Item"
       
    65 				group="SettingsList"
       
    66 		  	  handlerNameTemplate="Handle{title(name)}EditingStoppedL" 
       
    67 			    descriptionKey="editingStoppedDescription"
       
    68 		    />
       
    69 
       
    70 		</events>
       
    71 
       
    72 		<implementations>		
       
    73 			<implementation>
       
    74 				<interface id="com.nokia.sdt.datamodel.adapter.IComponentEventInfo"/>
       
    75 				<script file="CCoeControlBase.js" prototype="CCoeControlBaseEventInfo"/>
       
    76 			</implementation>
       
    77 		</implementations>		
       
    78 		
       
    79 		
       
    80 		<sourceGen forms="Container Dialog Form SettingsList">
       
    81 			<template form="Container" phase="LayoutControls" id="LAYOUT_CONTROLS"><![CDATA[
       
    82 ${instanceMemberName}->SetExtent( TPoint( ${properties.location.x}, ${properties.location.y} ), TSize( ${properties.size.width}, ${properties.size.height} ) );
       
    83 ]]>			</template>
       
    84 
       
    85 			<inline scope="prototype"><![CDATA[
       
    86 include("../dataModelGenLibrary.js")
       
    87 
       
    88 ${jsObject}.prototype.getCppSystemIncludes = function(contribs, headers) {
       
    89 	for (var h in headers) {
       
    90 		var contrib = Engine.createContributionForPhase("MainSystemIncludes");
       
    91 		contrib.setText("#include <" + headers[h] + ">\n");
       
    92 		contribs.add(contrib);
       
    93 	}
       
    94 }
       
    95 
       
    96 // override if necessary to provide a more dynamic idea of the class
       
    97 ${jsObject}.prototype.getCppClassName = function(instance) {
       
    98 	return instance.component.attributes["cpp-class-name"];
       
    99 }
       
   100 ]]>			</inline>
       
   101 
       
   102 			
       
   103 			<templateGroup id="CLASS_CONTRIBS" forms="Container Dialog Form">
       
   104 				<template id="0" phase="ForwardDeclarations">
       
   105 class ${this.getCppClassName(instance)};
       
   106 				</template>
       
   107 		
       
   108 				<template id="2" phase="InstanceVariables">
       
   109 ${this.getCppClassName(instance)}* ${instanceMemberName};
       
   110 				</template>	
       
   111 
       
   112 				<template id="3" phase="Construct">
       
   113 ${instanceMemberName} = NULL;
       
   114 				</template>
       
   115 				
       
   116 				<template id="1" form="Container" phase="Destroy">
       
   117 delete ${instanceMemberName};
       
   118 ${instanceMemberName} = NULL;
       
   119 				</template>
       
   120 			
       
   121 			</templateGroup>
       
   122 
       
   123 			<template id="INIT_FROM_DIALOG" form="Dialog" phase="Initialize"><![CDATA[
       
   124 ${instanceMemberName} = static_cast< ${this.getCppClassName(instance)}* >( 
       
   125 	ControlOrNull( ${Engine.findBuiltinOrGeneratedEnumeratorForAlgorithm(instance, ".", "com.nokia.sdt.component.symbian.NAME_ALG_DIALOG_LINE_ID")} ) );
       
   126 ]]>			</template>
       
   127 
       
   128 			<template id="INIT_FROM_CONTAINER" form="Container" phase="Initialize"><![CDATA[
       
   129 ${instanceMemberName} = new ( ELeave ) ${this.getCppClassName(instance)};
       
   130 ${instanceMemberName}->SetContainerWindowL( *this );
       
   131 	{
       
   132 	TResourceReader reader;
       
   133 	iEikonEnv->CreateResourceReaderLC( reader, ${resourceName$upper} );
       
   134 	${instanceMemberName}->ConstructFromResourceL( reader );
       
   135 	CleanupStack::PopAndDestroy(); // reader internal state
       
   136 	}
       
   137 ]]>			</template>
       
   138 
       
   139 			<templateGroup id="CONTAINER_CHILD_CONTRIBS">
       
   140 			
       
   141 				<template id="0" form="HandleComponentSwitchDispatch" phase="ComponentControlBody">
       
   142 	case E${instanceName$title}:
       
   143 		return ${instanceMemberName};
       
   144 				</template>
       
   145 
       
   146 				<template id="1" form="HandleCCoeControlEnums" phase="ChildEnumsContents">
       
   147 E${instanceName$title},
       
   148 				</template>
       
   149 			
       
   150 			</templateGroup>
       
   151 
       
   152 			<inline scope="prototype"><![CDATA[
       
   153 /** Call this to initialize the setting item to its default value */
       
   154 ${jsObject}.prototype.setupSettingItem = function(contribs, indent, instance, value) {
       
   155 	generateDataModelItemInitializer(contribs, indent, "Initialize", "SettingsList",
       
   156 			null, instance, value);
       
   157 }
       
   158 
       
   159 ]]>			</inline>
       
   160 
       
   161 			<template id="INIT_FROM_SETTINGS_LIST" form="SettingsList" location="CREATESETTINGITEML_BODY_SWITCH"><![CDATA[
       
   162 <%			var enumName = Engine.findBuiltinOrGeneratedEnumeratorForAlgorithm(
       
   163 				instance, ".", "com.nokia.sdt.component.symbian.NAME_ALG_SETTING_ITEM_ID"); 
       
   164 			var getterName = getDataModelGetterMethodName(instance); 
       
   165 			var constructorPattern = instance.component.attributes["setting-item-constructor-pattern"];
       
   166 			if (!constructorPattern)
       
   167 				constructorPattern = "{0},\\\\n{1}";
       
   168 			constructorPattern = "\\\\n" + constructorPattern;
       
   169 			// replace any newlines with 4 indents (note: not using escapes since it's goofy)
       
   170 			r = new RegExp(String.fromCharCode(0x5c)+String.fromCharCode(0x5c)+"n", "g");
       
   171 			constructorPattern = constructorPattern.replace(r,
       
   172 				String.fromCharCode(10)+"				");
       
   173 			//println("constructorPattern="+constructorPattern);
       
   174 			var constructorArgs = formatString(constructorPattern, "aId", "iSettings." + getterName + "()");
       
   175 			var settingClassName = instance.component.attributes["setting-item-class-name"];
       
   176 %>	case ${enumName}:
       
   177 		{			
       
   178 		${settingClassName}* item = new ( ELeave ) 
       
   179 			${settingClassName}( ${constructorArgs} );
       
   180 <% if (properties.itemHidden) {  
       
   181 %>		item->SetHidden( ETrue ); 
       
   182 <% } %>		return item;
       
   183 		}
       
   184 ]]>			</template>
       
   185 
       
   186 
       
   187 <!-- sourcegen common to MCoeControlObserver events -->
       
   188 	<templateGroup id="GenerateCommonControlEvents" 
       
   189 			ifEvents="stateChanged requestingExit requestingFocus requestingCancel interactionRefused">
       
   190 	
       
   191 		<template id="EventIncludes" form="Container" phase="HeaderIncludes"><![CDATA[
       
   192 #include <coecobs.h>
       
   193 ]]>		</template>
       
   194 		
       
   195 		<template id="BaseClass" form="Container" phase="BaseClassList">,MCoeControlObserver</template>
       
   196 	
       
   197 		<defineLocation id="ControlEventClassDecls" baseLocation="CLASS"
       
   198 				owned="false" 
       
   199 				location="region(MCoeControlObserver support)">
       
   200 			<template><![CDATA[
       
   201 private: <% contrib.indentAdjust(-1); %>
       
   202 typedef void ( ${handlerClassName}::*ControlEventHandler )( 
       
   203 		CCoeControl* aControl, TCoeEvent anEvent );
       
   204 
       
   205 void AddControlEventHandlerL( 
       
   206 		CCoeControl* aControl, 
       
   207 		TCoeEvent anEvent, 
       
   208 		ControlEventHandler aHandler );
       
   209 
       
   210 class TControlEventDispatch 
       
   211 	{
       
   212 public: 
       
   213 	CCoeControl* src; 
       
   214 	TCoeEvent event; 
       
   215 	ControlEventHandler handler;
       
   216 	};
       
   217 	
       
   218 RArray< TControlEventDispatch > iControlEventDispatch;
       
   219 ]]>			</template>
       
   220 		</defineLocation>
       
   221 
       
   222 		<template id="RealizeControlEventClassDecls" location="ControlEventClassDecls"/>
       
   223 						
       
   224 		<template id="HandleControlEventOverride" phase="OverriddenMethods"><![CDATA[
       
   225 void HandleControlEventL( 
       
   226 		CCoeControl* aControl, 
       
   227 		TCoeEvent anEventType );
       
   228 ]]>		</template>
       
   229 
       
   230 		<defineLocation id="HandleControlEventOverride_Method" baseLocation="MAIN_FILE"
       
   231 					owned="false"
       
   232 					location="function(${handlerClassName}::HandleControlEventL(CCoeControl*, TCoeEvent))">
       
   233 				<template><![CDATA[
       
   234 /** 
       
   235  * Override of the HandleControlEventL virtual function
       
   236  */
       
   237 void ${handlerClassName}::HandleControlEventL( 
       
   238 		CCoeControl* aControl, 
       
   239 		TCoeEvent anEventType )
       
   240 	{<%  var handlerInstance = lookupInstanceByName(handlerInstanceName);
       
   241 	     var handlerBase = handlerInstance.attributes["base-control-observer-class"];
       
   242 	     if (handlerBase) { %>
       
   243 	${handlerBase}::HandleControlEventL( aControl, anEventType );
       
   244 <% } %>
       
   245 	for (int i = 0; i < iControlEventDispatch.Count(); i++)
       
   246 		{
       
   247 		const TControlEventDispatch& currEntry = iControlEventDispatch[i];
       
   248 		if ( currEntry.src == aControl && currEntry.event == anEventType )
       
   249 			{
       
   250 			( this->*currEntry.handler )( aControl, anEventType );
       
   251 			break;
       
   252 			}
       
   253 		}
       
   254 	}
       
   255 ]]>				</template>
       
   256 		</defineLocation>
       
   257 			
       
   258 		<template id="RealizeControlEventOverride_Method" location="HandleControlEventOverride_Method"/>
       
   259 				
       
   260 		<defineLocation id="RegisterControlHelperMethod" baseLocation="MAIN_FILE"
       
   261 					owned="false"
       
   262 					location="function(${handlerClassName}::AddControlEventHandlerL(CCoeControl*, TCoeEvent, ControlEventHandler))">
       
   263 				<template><![CDATA[
       
   264 /** 
       
   265  * Helper function to register MCoeControlObserver event handlers
       
   266  */
       
   267 void ${handlerClassName}::AddControlEventHandlerL( 
       
   268 		CCoeControl* aControl, 
       
   269 		TCoeEvent anEvent, 
       
   270 		ControlEventHandler aHandler )
       
   271 	{
       
   272 	TControlEventDispatch entry;
       
   273 	entry.src = aControl;
       
   274 	entry.event = anEvent;
       
   275 	entry.handler = aHandler;
       
   276 	TInt err = iControlEventDispatch.Append( entry );
       
   277 	User::LeaveIfError( err );
       
   278 	}
       
   279 ]]>			
       
   280 			</template>
       
   281 		</defineLocation>
       
   282 		
       
   283 		<template id="RealizeRegisterHelperMethod" location="RegisterControlHelperMethod"/>
       
   284 			
       
   285 		<template id="DispatchArrayDestroy" phase="Destroy"><![CDATA[
       
   286 iControlEventDispatch.Close();		
       
   287 ]]>		</template>
       
   288 
       
   289 		<template id="SetObserver" form="Container" phase="Initialize"><![CDATA[
       
   290 ${instanceMemberName}->SetObserver( this );
       
   291 ]]>		</template>
       
   292 	</templateGroup>
       
   293 
       
   294 <!-- BEGIN EVENT stateChanged -->
       
   295 			<templateGroup id="GenerateStateChangedEvent" ifEvents="stateChanged">
       
   296 			
       
   297 				<template id="HandlerDecl" phase="UserHandlers"><![CDATA[
       
   298 void ${event.handlerName}( 
       
   299 		CCoeControl* aControl, 
       
   300 		TCoeEvent anEvent );
       
   301 ]]>				</template>
       
   302 					
       
   303 				<template id="AddDispatchArrayEntry" phase="Initialize"><![CDATA[
       
   304 AddControlEventHandlerL( 
       
   305 		${instanceMemberName}, 
       
   306 		EEventStateChanged, 
       
   307 		&${handlerClassName}::${event.handlerName} );
       
   308 ]]>				</template>
       
   309 																				
       
   310 				<defineLocation id="StateChangedHandler" baseLocation="MAIN_FILE"
       
   311 					owned="false"
       
   312 					isEventHandler="true"
       
   313 					location="function(${handlerClassName}::${event.handlerName}(CCoeControl*,TCoeEvent))">
       
   314 					<template><![CDATA[
       
   315 /** 
       
   316  * Handle the EEventStateChanged event.
       
   317  */
       
   318 void ${handlerClassName}::${event.handlerName}( 
       
   319 		CCoeControl* /* aControl */, 
       
   320 		TCoeEvent /* anEvent */ )
       
   321 	{
       
   322 	// TODO: implement ${event.eventName} event handler
       
   323 	}
       
   324 ]]>				
       
   325 					</template>
       
   326 				</defineLocation>
       
   327 			
       
   328 				<template id="RealizeHandler" location="StateChangedHandler"/>
       
   329 			</templateGroup>
       
   330 <!-- END EVENT stateChanged -->
       
   331 
       
   332 <!-- BEGIN EVENT prepareFocusTransition -->
       
   333 			<templateGroup id="GeneratePrepareFocusTransitionEvent" ifEvents="prepareFocusTransition">
       
   334 			
       
   335 				<template id="HandlerDecl" phase="UserHandlers"><![CDATA[
       
   336 void ${event.handlerName}( 
       
   337 		CCoeControl* aControl, 
       
   338 		TCoeEvent anEvent );
       
   339 ]]>				</template>
       
   340 					
       
   341 				<template id="AddDispatchArrayEntry" phase="Initialize"><![CDATA[
       
   342 AddControlEventHandlerL( 
       
   343 		${instanceMemberName}, 
       
   344 		EEventPrepareFocusTransition, 
       
   345 		&${handlerClassName}::${event.handlerName} );
       
   346 ]]>				</template>
       
   347 																				
       
   348 				<defineLocation id="PrepareFocusTransitionHandler" baseLocation="MAIN_FILE"
       
   349 					owned="false"
       
   350 					isEventHandler="true"
       
   351 					location="function(${handlerClassName}::${event.handlerName}(CCoeControl*,TCoeEvent))">
       
   352 					<template><![CDATA[
       
   353 /** 
       
   354  * Handle the EEventPrepareFocusTransition event.
       
   355  */
       
   356 void ${handlerClassName}::${event.handlerName}( 
       
   357 		CCoeControl* /* aControl */, 
       
   358 		TCoeEvent /* anEvent */ )
       
   359 	{
       
   360 	// TODO: implement ${event.eventName} event handler
       
   361 	}
       
   362 ]]>				
       
   363 					</template>
       
   364 				</defineLocation>
       
   365 			
       
   366 				<template id="RealizeHandler" location="PrepareFocusTransitionHandler"/>
       
   367 			</templateGroup>
       
   368 <!-- END EVENT prepareFocusTransition -->
       
   369 
       
   370 <!-- BEGIN EVENT requestingExit -->
       
   371 			<templateGroup id="GenerateRequestingExitEvent" ifEvents="requestingExit">
       
   372 			
       
   373 				<template id="HandlerDecl" phase="UserHandlers"><![CDATA[
       
   374 void ${event.handlerName}( 
       
   375 		CCoeControl* aControl, 
       
   376 		TCoeEvent anEvent );
       
   377 ]]>				</template>
       
   378 					
       
   379 				<template id="AddDispatchArrayEntry" phase="Initialize"><![CDATA[
       
   380 AddControlEventHandlerL( 
       
   381 		${instanceMemberName}, 
       
   382 		EEventRequestExit, 
       
   383 		&${handlerClassName}::${event.handlerName} );
       
   384 ]]>				</template>
       
   385 																				
       
   386 				<defineLocation id="RequestingExitHandler" baseLocation="MAIN_FILE"
       
   387 					owned="false"
       
   388 					isEventHandler="true"
       
   389 					location="function(${handlerClassName}::${event.handlerName}(CCoeControl*,TCoeEvent))">
       
   390 					<template><![CDATA[
       
   391 /** 
       
   392  * Handle the EEventRequestExit event.
       
   393  */
       
   394 void ${handlerClassName}::${event.handlerName}( 
       
   395 		CCoeControl* /* aControl */, 
       
   396 		TCoeEvent /* anEvent */ )
       
   397 	{
       
   398 	// TODO: implement ${event.eventName} event handler
       
   399 	}
       
   400 ]]>				
       
   401 					</template>
       
   402 				</defineLocation>
       
   403 			
       
   404 				<template id="RealizeHandler" location="RequestingExitHandler"/>
       
   405 			</templateGroup>
       
   406 <!-- END EVENT requestingExit -->
       
   407 
       
   408 <!-- BEGIN EVENT requestingFocus -->
       
   409 			<templateGroup id="GenerateRequestingFocusEvent" ifEvents="requestingFocus">
       
   410 			
       
   411 				<template id="HandlerDecl" phase="UserHandlers"><![CDATA[
       
   412 void ${event.handlerName}( 
       
   413 		CCoeControl* aControl, 
       
   414 		TCoeEvent anEvent );
       
   415 ]]>				</template>
       
   416 					
       
   417 				<template id="AddDispatchArrayEntry" phase="Initialize"><![CDATA[
       
   418 AddControlEventHandlerL( 
       
   419 		${instanceMemberName}, 
       
   420 		EEventRequestFocus, 
       
   421 		&${handlerClassName}::${event.handlerName} );
       
   422 ]]>				</template>
       
   423 																				
       
   424 				<defineLocation id="RequestingFocusHandler" baseLocation="MAIN_FILE"
       
   425 					owned="false"
       
   426 					isEventHandler="true"
       
   427 					location="function(${handlerClassName}::${event.handlerName}(CCoeControl*,TCoeEvent))">
       
   428 					<template><![CDATA[
       
   429 /** 
       
   430  * Handle the EEventRequestFocus event.
       
   431  */
       
   432 void ${handlerClassName}::${event.handlerName}( CCoeControl* /* aControl */, TCoeEvent /* anEvent */ )
       
   433 	{
       
   434 	// TODO: implement ${event.eventName} event handler
       
   435 	}
       
   436 ]]>				
       
   437 					</template>
       
   438 				</defineLocation>
       
   439 			
       
   440 				<template id="RealizeHandler" location="RequestingFocusHandler"/>
       
   441 			</templateGroup>
       
   442 <!-- END EVENT requestingFocus -->
       
   443 
       
   444 <!-- BEGIN EVENT requestingCancel -->
       
   445 			<templateGroup id="GenerateRequestingCancelEvent" ifEvents="requestingCancel">
       
   446 			
       
   447 				<template id="HandlerDecl" phase="UserHandlers"><![CDATA[
       
   448 void ${event.handlerName}( 
       
   449 		CCoeControl* aControl, 
       
   450 		TCoeEvent anEvent );
       
   451 ]]>				</template>
       
   452 					
       
   453 				<template id="AddDispatchArrayEntry" phase="Initialize"><![CDATA[
       
   454 AddControlEventHandlerL( 
       
   455 		${instanceMemberName}, 
       
   456 		EEventRequestCancel, 
       
   457 		&${handlerClassName}::${event.handlerName} );
       
   458 ]]>				</template>
       
   459 																				
       
   460 				<defineLocation id="RequestingCancelHandler" baseLocation="MAIN_FILE"
       
   461 					owned="false"
       
   462 					isEventHandler="true"
       
   463 					location="function(${handlerClassName}::${event.handlerName}(CCoeControl*,TCoeEvent))">
       
   464 					<template><![CDATA[
       
   465 /** 
       
   466  * Handle the EEventRequestCancel event.
       
   467  */
       
   468 void ${handlerClassName}::${event.handlerName}( 
       
   469 		CCoeControl* /* aControl */, 
       
   470 		TCoeEvent /* anEvent */ )
       
   471 	{
       
   472 	// TODO: implement ${event.eventName} event handler
       
   473 	}
       
   474 ]]>				
       
   475 					</template>
       
   476 				</defineLocation>
       
   477 			
       
   478 				<template id="RealizeHandler" location="RequestingCancelHandler"/>
       
   479 			</templateGroup>
       
   480 <!-- END EVENT requestingCancel -->
       
   481 
       
   482 <!-- BEGIN EVENT interactionRefused -->
       
   483 			<templateGroup id="GenerateInteractionRefusedEvent" ifEvents="interactionRefused">
       
   484 			
       
   485 				<template id="HandlerDecl" phase="UserHandlers"><![CDATA[
       
   486 void ${event.handlerName}( 
       
   487 		CCoeControl* aControl, 
       
   488 		TCoeEvent anEvent );
       
   489 ]]>				</template>
       
   490 					
       
   491 				<template id="AddDispatchArrayEntry" phase="Initialize"><![CDATA[
       
   492 AddControlEventHandlerL( 
       
   493 		${instanceMemberName}, 
       
   494 		EEventInteractionRefused, 
       
   495 		&${handlerClassName}::${event.handlerName} );
       
   496 ]]>				</template>
       
   497 																				
       
   498 				<defineLocation id="InteractionRefusedHandler" baseLocation="MAIN_FILE"
       
   499 					owned="false"
       
   500 					isEventHandler="true"
       
   501 					location="function(${handlerClassName}::${event.handlerName}(CCoeControl*,TCoeEvent))">
       
   502 					<template><![CDATA[
       
   503 /** 
       
   504  * Handle the EEventInteractionRefused event.
       
   505  */
       
   506 void ${handlerClassName}::${event.handlerName}( 
       
   507 		CCoeControl* /* aControl */, 
       
   508 		TCoeEvent /* anEvent */ )
       
   509 	{
       
   510 	// TODO: implement ${event.eventName} event handler
       
   511 	}
       
   512 ]]>				
       
   513 					</template>
       
   514 				</defineLocation>
       
   515 			
       
   516 				<template id="RealizeHandler" location="InteractionRefusedHandler"/>
       
   517 			</templateGroup>
       
   518 <!-- END EVENT interactionRefused -->
       
   519 
       
   520 <!-- BEGIN EVENT editingStarted (Settings Item List only) -->
       
   521 			<templateGroup id="GenerateEditingStartedEvent" ifEvents="editingStarted">
       
   522 			
       
   523 				<template id="HandlerDecl" phase="UserHandlers"><![CDATA[
       
   524 void ${event.handlerName}( 
       
   525 		CAknSettingItem* /*aIndex*/, 
       
   526 		TBool /*aCalledFromMenu*/ );
       
   527 ]]>				</template>
       
   528 
       
   529 				<template id="InvokeHandler" location="EDITITEML_STARTED_STUB">
       
   530 	case ${Engine.findBuiltinOrGeneratedEnumeratorForAlgorithm(instance, ".", "com.nokia.sdt.component.symbian.NAME_ALG_SETTING_ITEM_ID")}:
       
   531 		${event.handlerName}( 
       
   532 			item, 
       
   533 			aCalledFromMenu );
       
   534 		break;
       
   535 				</template>
       
   536 				
       
   537 				<defineLocation id="EditingStartedHandler" baseLocation="MAIN_FILE"
       
   538 					owned="false"
       
   539 					isEventHandler="true"
       
   540 					location="function(${handlerClassName}::${event.handlerName}(CAknSettingItem*,TBool))">
       
   541 					<template><![CDATA[
       
   542 /** 
       
   543  * Handle the Editing Started event.
       
   544  */
       
   545 void ${handlerClassName}::${event.handlerName}( 
       
   546 		CAknSettingItem* /*aItem*/, 
       
   547 		TBool /*aCalledFromMenu*/ )
       
   548 	{
       
   549 	// TODO: implement ${event.eventName} event handler
       
   550 	}
       
   551 ]]>				
       
   552 					</template>
       
   553 				</defineLocation>
       
   554 			
       
   555 				<template id="RealizeHandler" location="EditingStartedHandler"/>
       
   556 			</templateGroup>
       
   557 <!-- END EVENT editingStarted -->
       
   558 
       
   559 <!-- BEGIN EVENT editingStopped (Settings Item List only) -->
       
   560 			<templateGroup id="GenerateEditingStoppedEvent" ifEvents="editingStopped">
       
   561 			
       
   562 				<template id="HandlerDecl" phase="UserHandlers"><![CDATA[
       
   563 TBool ${event.handlerName}( 
       
   564 		CAknSettingItem* /*aIndex*/, 
       
   565 		TBool /*aCalledFromMenu*/ );
       
   566 ]]>				</template>
       
   567 
       
   568 				<template id="InvokeHandler" location="EDITITEML_STOPPED_STUB">
       
   569 	case ${Engine.findBuiltinOrGeneratedEnumeratorForAlgorithm(instance, ".", "com.nokia.sdt.component.symbian.NAME_ALG_SETTING_ITEM_ID")}:
       
   570 		storeValue = ${event.handlerName}( 
       
   571 			item, 
       
   572 			aCalledFromMenu );
       
   573 		break;
       
   574 				</template>
       
   575 				
       
   576 				<defineLocation id="EditingStoppedHandler" baseLocation="MAIN_FILE"
       
   577 					owned="false"
       
   578 					isEventHandler="true"
       
   579 					location="function(${handlerClassName}::${event.handlerName}(CAknSettingItem*,TBool))">
       
   580 					<template><![CDATA[
       
   581 /** 
       
   582  * Handle the Editing Stopped event.
       
   583  *
       
   584  * The embedded editor contains the updated setting value.  If this routine
       
   585  * returns ETrue, that value will be committed via aItem->StoreL().
       
   586  * <p>
       
   587  * Note that returning EFalse has no effect on the editor control, only 
       
   588  * on the iSettings store.  It is not possible to revert the editor's 
       
   589  * value automatically here (use editingStarted and editingStopped together 
       
   590  * to coordinate storing/restoring if necessary).
       
   591  * @return ETrue to store the value to the settings store
       
   592  */
       
   593 TBool ${handlerClassName}::${event.handlerName}( 
       
   594 		CAknSettingItem* /*aItem*/, 
       
   595 		TBool /*aCalledFromMenu*/ )
       
   596 	{
       
   597 	// TODO: implement ${event.eventName} event handler
       
   598 	return ETrue;
       
   599 	}
       
   600 ]]>
       
   601 					</template>
       
   602 				</defineLocation>
       
   603 			
       
   604 				<template id="RealizeHandler" location="EditingStoppedHandler"/>
       
   605 			</templateGroup>
       
   606 <!-- END EVENT editingStopped -->
       
   607 
       
   608 		</sourceGen>
       
   609 		
       
   610 	</component>
       
   611 </componentDefinition>