uidesigner/com.nokia.sdt.series60.componentlibrary/components/containers/DialogBase.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:ecore="http://www.eclipse.org/emf/2002/Ecore" 
       
    11 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
       
    12 
       
    13 	<component baseComponent="com.nokia.sdt.series60.ContainerBase" 
       
    14 			friendlyName=""
       
    15 			qualifiedName="com.nokia.sdt.series60.DialogBase" 
       
    16 			abstract="true"
       
    17 			version="1.0">
       
    18 			
       
    19 		<symbian sdkName="com.nokia.series60" minSDKVersion="2.0"/>
       
    20 		
       
    21 		<attributes>
       
    22 			<attribute key="is-top-level-content-container">true</attribute>
       
    23 			<attribute key="vertical-scrollable-container">true</attribute>
       
    24 			<attribute key="layout-type">ordered</attribute>
       
    25 			<attribute key="ordered-layout-type">vertical-row</attribute>
       
    26 			<attribute key="allow-cba-in-parent">true</attribute>
       
    27 			<attribute key="container-background-color-property-name">backColor</attribute>
       
    28 		</attributes>
       
    29 	
       
    30 		<properties>
       
    31 			<property category="Hidden" name="notifyEsc" type="boolean" default="false"/>
       
    32 			<property category="Behavior" name="modeless" type="boolean" default="true"
       
    33 				descriptionKey="EEikDialogFlagModelessDescription" />
       
    34 			<property category="Behavior" name="wait" type="boolean" default="false"
       
    35 				descriptionKey="EEikDialogFlagWaitDescription" />
       
    36 				<!-- corresponds to flag EEikDialogFlagWait 0x001 -->
       
    37 		</properties>
       
    38 		
       
    39 		<implementations>
       
    40 			<implementation>
       
    41 				<interface id="com.nokia.sdt.datamodel.adapter.IInitializer"/>
       
    42 				<script file="DialogBase.js" prototype="DialogBase" />
       
    43 			</implementation>
       
    44 		</implementations>
       
    45 		
       
    46 		<events>
       
    47 		<event name="prepareForFocusTransition" category="Dialog" 
       
    48 		    handlerNameTemplate="Handle{title(name)}PrepareForFocusTransitionL"
       
    49 		    descriptionKey="prepareForFocusTransitionDescription"
       
    50 		/>
       
    51 		<event name="pageChanged" category="Dialog" 
       
    52 		    handlerNameTemplate="Handle{title(name)}PageChangedL"
       
    53 		    descriptionKey="pageChangedDescription"
       
    54 		/>		
       
    55 		<event name="lineChanged" category="Dialog" 
       
    56 		    handlerNameTemplate="Handle{title(name)}LineChangedL"
       
    57 		    descriptionKey="lineChangedDescription"
       
    58 		/>
       
    59 		<event name="processCommand" category="Command" 
       
    60 		    handlerNameTemplate="Handle{title(name)}ProcessCommandL"
       
    61 		    descriptionKey="processCommandDescription"
       
    62 		/>
       
    63 		<event name="dynInitMenuPane" category="Menu" 
       
    64 		    handlerNameTemplate="Handle{title(name)}DynInitMenuPaneL"
       
    65 		    descriptionKey="dynInitMenuPaneDescription"
       
    66 		/>
       
    67 		<event name="offerKeyToApp" category="Menu" 
       
    68 		    handlerNameTemplate="Handle{title(name)}OfferKeyToAppL"
       
    69 		    descriptionKey="offerKeyToAppDescription"
       
    70 		/>
       
    71 		</events>
       
    72 		
       
    73 	<sourceGen>
       
    74 		
       
    75 <!-- BEGIN EVENT prepareForFocusTransition -->
       
    76 			<templateGroup id="GeneratePrepareForFocusTransition" ifEvents="prepareForFocusTransition">
       
    77 				<template id="DeclarePrepareForFocusTransitionOverride" phase="OverriddenMethods"><![CDATA[
       
    78 void PrepareForFocusTransitionL();
       
    79 ]]>				</template>
       
    80 
       
    81 				<defineLocation id="PrepareForFocusTransitionOverride" baseLocation="MAIN_FILE"
       
    82 					owned="false"
       
    83 					location="function(${handlerClassName}::PrepareForFocusTransitionL())">
       
    84 					<template><![CDATA[
       
    85 /** 
       
    86  * Handle focus transition this dialog (override)
       
    87  */
       
    88 void ${handlerClassName}::PrepareForFocusTransitionL()
       
    89 	{
       
    90 	${instance.attributes["base-container-class"]}::PrepareForFocusTransitionL();
       
    91 	}
       
    92 ]]>				
       
    93 					</template>
       
    94 				</defineLocation>
       
    95 				
       
    96 			<defineLocation id="PrepareForFocusTransitionMethodBody" baseLocation="PrepareForFocusTransitionOverride"
       
    97 				location="region(Generated Contents)">
       
    98 				<template/>
       
    99 			</defineLocation>
       
   100 			
       
   101 			<template id="InvokePrepareForFocusTransitionHandler" location="PrepareForFocusTransitionMethodBody">
       
   102 ${event.handlerName}();
       
   103 			</template>
       
   104 
       
   105 			<template id="DeclarePrepareForFocusTransitionHandler" phase="UserHandlers">
       
   106 void ${event.handlerName}();
       
   107 			</template>
       
   108 
       
   109 			<defineLocation id="PrepareForFocusTransitionHandlerMethod" baseLocation="MAIN_FILE"
       
   110 				owned="false"
       
   111 				isEventHandler="true"
       
   112 				location="function(${handlerClassName}::${event.handlerName}())">
       
   113 			<template><![CDATA[
       
   114 /** 
       
   115  * Handle the ${event.eventName} event.
       
   116  */
       
   117 void ${handlerClassName}::${event.handlerName}()
       
   118 	{
       
   119 	// TODO: implement ${event.eventName} event handler
       
   120 	}
       
   121 ]]>				
       
   122 				</template>
       
   123 			</defineLocation>
       
   124 			
       
   125 			<template id="RealizePrepareForFocusTransitionHandler" location="PrepareForFocusTransitionHandlerMethod" />
       
   126 			</templateGroup>
       
   127 <!-- END EVENT prepareForFocusTransition -->
       
   128 
       
   129 <!-- BEGIN EVENT pageChanged -->
       
   130 			<templateGroup id="GeneratePageChanged" ifEvents="pageChanged">
       
   131 				<template id="DeclarePageChangedOverride" phase="OverriddenMethods"><![CDATA[
       
   132 void PageChangedL( TInt aPageId );
       
   133 ]]>				</template>
       
   134 
       
   135 				<defineLocation id="PageChangedOverride" baseLocation="MAIN_FILE"
       
   136 					owned="false"
       
   137 					location="function(${handlerClassName}::PageChangedL(TInt))">
       
   138 					<template><![CDATA[
       
   139 /** 
       
   140  * Handle page changed notifications this dialog (override)
       
   141  */
       
   142 void ${handlerClassName}::PageChangedL( TInt aPageId )
       
   143 	{
       
   144 	${instance.attributes["base-container-class"]}::PageChangedL( aPageId );
       
   145 	}
       
   146 ]]>				
       
   147 					</template>
       
   148 				</defineLocation>
       
   149 
       
   150 			<defineLocation id="PageChangedMethodBody" baseLocation="PageChangedOverride"
       
   151 				location="region(Generated Contents)">
       
   152 				<template/>
       
   153 			</defineLocation>
       
   154 			
       
   155 			<template id="InvokePageChangedHandler" location="PageChangedMethodBody">
       
   156 ${event.handlerName}( aPageId );
       
   157 			</template>
       
   158 
       
   159 			<template id="DeclarePageChangedHandler" phase="UserHandlers">
       
   160 void ${event.handlerName}( TInt aPageId );
       
   161 			</template>
       
   162 
       
   163 			<defineLocation id="PageChangedHandlerMethod" baseLocation="MAIN_FILE"
       
   164 				owned="false"
       
   165 				isEventHandler="true"
       
   166 				location="function(${handlerClassName}::${event.handlerName}(TInt))">
       
   167 			<template><![CDATA[
       
   168 /** 
       
   169  * Handle the ${event.eventName} event.
       
   170  */
       
   171 void ${handlerClassName}::${event.handlerName}( TInt aPageId )
       
   172 	{
       
   173 	// TODO: implement ${event.eventName} event handler
       
   174 	}
       
   175 ]]>				
       
   176 				</template>
       
   177 			</defineLocation>
       
   178 			
       
   179 			<template id="RealizePageChangedHandler" location="PageChangedHandlerMethod" />
       
   180 			</templateGroup>
       
   181 <!-- END EVENT pageChanged -->
       
   182 
       
   183 <!-- BEGIN EVENT lineChanged -->
       
   184 			<templateGroup id="GenerateLineChanged" ifEvents="lineChanged">
       
   185 				<template id="DeclareLineChangedOverride" phase="OverriddenMethods"><![CDATA[
       
   186 void LineChangedL( TInt aPageId );
       
   187 ]]>				</template>
       
   188 
       
   189 				<defineLocation id="LineChangedOverride" baseLocation="MAIN_FILE"
       
   190 					owned="false"
       
   191 					location="function(${handlerClassName}::LineChangedL(TInt))">
       
   192 					<template><![CDATA[
       
   193 /** 
       
   194  * Handle line change notifications for this dialog (override)
       
   195  */
       
   196 void ${handlerClassName}::LineChangedL( TInt aControlId )
       
   197 	{
       
   198 	${instance.attributes["base-container-class"]}::LineChangedL( aControlId );
       
   199 	}
       
   200 ]]>				
       
   201 					</template>
       
   202 				</defineLocation>
       
   203 		
       
   204 			<defineLocation id="LineChangedMethodBody" baseLocation="LineChangedOverride"
       
   205 				location="region(Generated Contents)">
       
   206 				<template/>
       
   207 			</defineLocation>
       
   208 			
       
   209 			<template id="InvokeLineChangedHandler" location="LineChangedMethodBody">
       
   210 ${event.handlerName}( aControlId );
       
   211 			</template>
       
   212 
       
   213 			<template id="DeclareLineChangedHandler" phase="UserHandlers">
       
   214 void ${event.handlerName}( TInt aControlId );
       
   215 			</template>
       
   216 
       
   217 			<defineLocation id="LineChangedHandlerMethod" baseLocation="MAIN_FILE"
       
   218 				owned="false"
       
   219 				isEventHandler="true"
       
   220 				location="function(${handlerClassName}::${event.handlerName}(TInt))">
       
   221 			<template><![CDATA[
       
   222 /** 
       
   223  * Handle the ${event.eventName} event.
       
   224  */
       
   225 void ${handlerClassName}::${event.handlerName}( TInt aControlId )
       
   226 	{
       
   227 	// TODO: implement ${event.eventName} event handler
       
   228 	}
       
   229 ]]>				
       
   230 				</template>
       
   231 			</defineLocation>
       
   232 			
       
   233 			<template id="RealizeLineChangedHandlerMethod" location="LineChangedHandlerMethod" />
       
   234 			</templateGroup>
       
   235 <!-- END EVENT lineChanged -->
       
   236 
       
   237 <!-- BEGIN EVENT processCommand -->
       
   238 			<templateGroup id="GenerateProcessCommand" ifEvents="processCommand">
       
   239 				<template id="DeclareProcessCommandOverride" phase="OverriddenMethods"><![CDATA[
       
   240 void ProcessCommandL( TInt aCommandId );
       
   241 ]]>				</template>
       
   242 
       
   243 				<defineLocation id="ProcessCommandOverride" baseLocation="MAIN_FILE"
       
   244 					owned="false"
       
   245 					location="function(${handlerClassName}::ProcessCommandL(TInt))">
       
   246 					<template><![CDATA[
       
   247 /** 
       
   248  * Handle commands for this dialog. (override)
       
   249  */
       
   250 void ${handlerClassName}::ProcessCommandL( TInt aCommandId )
       
   251 	{
       
   252 	${instance.attributes["base-container-class"]}::ProcessCommandL( aCommandId );
       
   253 	}
       
   254 ]]>				
       
   255 					</template>
       
   256 				</defineLocation>
       
   257 		
       
   258 			<defineLocation id="ProcessCommandMethodBody" baseLocation="ProcessCommandOverride"
       
   259 				location="region(Generated Contents)">
       
   260 				<template/>
       
   261 			</defineLocation>
       
   262 			
       
   263 			<template id="InvokeProcessCommandHandler" location="ProcessCommandMethodBody">
       
   264 ${event.handlerName}( aCommandId );
       
   265 			</template>
       
   266 
       
   267 			<template id="DeclareProcessCommandHandler" phase="UserHandlers">
       
   268 void ${event.handlerName}( TInt aCommandId );
       
   269 			</template>
       
   270 
       
   271 			<defineLocation id="ProcessCommandHandlerMethod" baseLocation="MAIN_FILE"
       
   272 				owned="false"
       
   273 				isEventHandler="true"
       
   274 				location="function(${handlerClassName}::${event.handlerName}(TInt))">
       
   275 			<template><![CDATA[
       
   276 /** 
       
   277  * Handle the ${event.eventName} event.
       
   278  */
       
   279 void ${handlerClassName}::${event.handlerName}( TInt aCommandId )
       
   280 	{
       
   281 	// TODO: implement ${event.eventName} event handler
       
   282 	}
       
   283 ]]>				
       
   284 				</template>
       
   285 			</defineLocation>
       
   286 			
       
   287 			<template id="RealizeProcessCommandHandler" location="ProcessCommandHandlerMethod" />
       
   288 			</templateGroup>
       
   289 <!-- END EVENT processCommand -->
       
   290 
       
   291 <!-- BEGIN EVENT dynInitMenuPane -->
       
   292 			<templateGroup id="GenerateDynInitMenuPane" ifEvents="dynInitMenuPane">
       
   293 				<template id="DeclareDynInitMenuPaneOverride" phase="OverriddenMethods"><![CDATA[
       
   294 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
       
   295 ]]>				</template>
       
   296 				<template id="CEikMenuPaneForwardDecl" phase="ForwardDeclarations">
       
   297 class CEikMenuPane;
       
   298 				</template>
       
   299 
       
   300 				<defineLocation id="DYNINITMENUPANEL" baseLocation="MAIN_FILE"
       
   301 					owned="false"
       
   302 					location="function(${handlerClassName}::DynInitMenuPaneL(TInt, CEikMenuPane*))">
       
   303 					<template><![CDATA[
       
   304 /** 
       
   305  * Handle menu enablement for this dialog. (override)
       
   306  */
       
   307 void ${handlerClassName}::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane )
       
   308 	{
       
   309 	${instance.attributes["base-container-class"]}::DynInitMenuPaneL( aResourceId, aMenuPane );
       
   310 	}
       
   311 ]]>				
       
   312 					</template>
       
   313 				</defineLocation>
       
   314 		
       
   315 			<defineLocation id="DynInitMenuPaneMethodBody" baseLocation="DYNINITMENUPANEL"
       
   316 				location="region(Generated Contents)">
       
   317 				<template/>
       
   318 			</defineLocation>
       
   319 			
       
   320 			<template id="InvokeDynInitMenuPaneHandler" location="DynInitMenuPaneMethodBody">
       
   321 ${event.handlerName}( aResourceId, aMenuPane );
       
   322 			</template>
       
   323 
       
   324 			<template id="DeclareDynInitMenuPaneHandler" phase="UserHandlers">
       
   325 void ${event.handlerName}( TInt aResourceId, CEikMenuPane* aMenuPane );
       
   326 			</template>
       
   327 
       
   328 			<defineLocation id="DynInitMenuPaneHandlerMethod" baseLocation="MAIN_FILE"
       
   329 				owned="false"
       
   330 				isEventHandler="true"
       
   331 				location="function(${handlerClassName}::${event.handlerName}(TInt, CEikMenuPane*))">
       
   332 			<template><![CDATA[
       
   333 /** 
       
   334  * Handle the ${event.eventName} event.
       
   335  */
       
   336 void ${handlerClassName}::${event.handlerName}( TInt aResourceId, CEikMenuPane* aMenuPane )
       
   337 	{
       
   338 	// TODO: implement ${event.eventName} event handler
       
   339 	}
       
   340 ]]>				
       
   341 				</template>
       
   342 			</defineLocation>
       
   343 			
       
   344 			<template id="RealizeDynInitMenuPaneHandler" location="DynInitMenuPaneHandlerMethod" />
       
   345 			</templateGroup>
       
   346 <!-- END EVENT dynInitMenuPane -->
       
   347 
       
   348 <!-- BEGIN EVENT offerKeyToApp -->
       
   349 			<templateGroup id="GenerateOfferKeyToApp" ifEvents="offerKeyToApp">
       
   350 				<template id="DeclareOfferKeyToAppOverride" phase="OverriddenMethods"><![CDATA[
       
   351 void OfferKeyToAppL( const TKeyEvent& aKeyEvent, TEventCode aType );
       
   352 ]]>				</template>
       
   353 
       
   354 				<defineLocation id="OfferKeyToAppOverride" baseLocation="MAIN_FILE"
       
   355 					owned="false"
       
   356 					location="function(${handlerClassName}::OfferKeyToAppL(const TKeyEvent&amp;,TEventCode))">
       
   357 					<template><![CDATA[
       
   358 /** 
       
   359  * Handle special keys during menu selection for this dialog. (override)
       
   360  */
       
   361 void ${handlerClassName}::OfferKeyToAppL( 
       
   362 		const TKeyEvent& aKeyEvent, 
       
   363 		TEventCode aType )
       
   364 	{
       
   365 	${instance.attributes["base-container-class"]}::OfferKeyToAppL( aKeyEvent, aType );
       
   366 	}
       
   367 ]]>				
       
   368 					</template>
       
   369 				</defineLocation>
       
   370 		
       
   371 			<defineLocation id="OfferKeyToAppMethodBody" baseLocation="OfferKeyToAppOverride"
       
   372 				location="region(Generated Contents)">
       
   373 				<template/>
       
   374 			</defineLocation>
       
   375 			
       
   376 			<template id="InvokeOfferKeyToAppHandler" location="OfferKeyToAppMethodBody">
       
   377 ${event.handlerName}( aKeyEvent, aType );
       
   378 			</template>
       
   379 
       
   380 			<template id="DeclareOfferKeyToAppHandler" phase="UserHandlers"><![CDATA[
       
   381 void ${event.handlerName}( 
       
   382 		const TKeyEvent& aKeyEvent, 
       
   383 		TEventCode aType );
       
   384 ]]>			</template>
       
   385 
       
   386 			<defineLocation id="OfferKeyToAppHandlerMethod" baseLocation="MAIN_FILE"
       
   387 				owned="false"
       
   388 				isEventHandler="true"
       
   389 				location="function(${handlerClassName}::${event.handlerName}(const TKeyEvent&amp;, TEventCode))">
       
   390 			<template><![CDATA[
       
   391 /** 
       
   392  * Handle the ${event.eventName} event.
       
   393  */
       
   394 void ${handlerClassName}::${event.handlerName}( 
       
   395 		const TKeyEvent& aKeyEvent, 
       
   396 		TEventCode aType )
       
   397 	{
       
   398 	// TODO: implement ${event.eventName} event handler
       
   399 	}
       
   400 ]]>				
       
   401 				</template>
       
   402 			</defineLocation>
       
   403 			
       
   404 			<template id="RealizeOfferKeyToAppHandler" location="OfferKeyToAppHandlerMethod" />
       
   405 			</templateGroup>
       
   406 <!-- END EVENT offerKeyToApp -->
       
   407 
       
   408 	</sourceGen>
       
   409 
       
   410 	</component>
       
   411 </componentDefinition>
       
   412