uidesigner/com.nokia.sdt.series60.componentlibrary/components/transient/StandardNote.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 	<enumPropertyDeclaration qualifiedName="com.nokia.sdt.series60.StandardNote.type">
       
    12 		<enumElement value="CAknConfirmationNote"/>
       
    13 		<enumElement value="CAknInformationNote"/>
       
    14 		<enumElement value="CAknWarningNote"/>
       
    15 		<enumElement value="CAknErrorNote"/>
       
    16 	</enumPropertyDeclaration>
       
    17 
       
    18 	<component baseComponent="com.nokia.sdt.series60.NonLayoutBase" 
       
    19 		friendlyName="%friendlyName" 
       
    20 		qualifiedName="com.nokia.sdt.series60.StandardNote" 
       
    21 		category="NotesDialogs"
       
    22 		instanceNameRoot="note"
       
    23 		version="1.0">
       
    24 		<documentation>
       
    25 			<information>%information</information>
       
    26 		</documentation>
       
    27 		<symbian sdkName="com.nokia.series60" minSDKVersion="2.0" 
       
    28 			className="CAknResourceNoteDialog" classHelpTopic=""
       
    29 			resourceType="AVKON_NOTE" resourceHelpTopic="" />
       
    30 		<designerImages smallIconFile="StandardNote_sm.png" 
       
    31 			largeIconFile="StandardNote.png"/>
       
    32 		<attributes>
       
    33 			<attribute key="is-transient-object">true</attribute>
       
    34 			<attribute key="is-non-resizable-or-moveable-layout-object">true</attribute>
       
    35 		</attributes>
       
    36 		<properties>
       
    37 			<compoundProperty category="Hidden" name="location" type="com.nokia.sdt.series60.locationProperty"
       
    38 				editorClass="com.nokia.sdt.symbian.ui.editors.ReadOnlySummaryEditorFactory"/>
       
    39 			<compoundProperty category="Hidden" name="size" type="com.nokia.sdt.series60.sizeProperty"
       
    40 				editorClass="com.nokia.sdt.symbian.ui.editors.ReadOnlySummaryEditorFactory"/>
       
    41 			<enumProperty category="Appearance" name="type" type="com.nokia.sdt.series60.StandardNote.type" 
       
    42 				default="CAknConfirmationNote"
       
    43 				descriptionKey="typeDescription" />
       
    44 			<property category="Data" name="text" type="localizedString" 
       
    45 				default="Note" descriptionKey="textDescription"
       
    46 				editorClass="com.nokia.sdt.symbian.ui.editors.ScalableTextEditorFactory" />
       
    47 		</properties>
       
    48 		<implementations>
       
    49 			<implementation>
       
    50 				<interface id="com.nokia.sdt.datamodel.adapter.IVisualAppearance"/>
       
    51 				<interface id="com.nokia.sdt.datamodel.adapter.IDirectLabelEdit"/>
       
    52 				<script file="StandardNote_visual.js" prototype="StandardNoteVisual"/>
       
    53 			</implementation>
       
    54 			<implementation>
       
    55 				<interface id="com.nokia.sdt.datamodel.adapter.ILayout"/>
       
    56 				<interface id="com.nokia.sdt.datamodel.adapter.IComponentInstancePropertyListener"/> 
       
    57 				<script file="StandardNote_layout.js" prototype="StandardNoteLayout"/>
       
    58 			</implementation>
       
    59 		</implementations>
       
    60 		<sourceMapping>
       
    61 			<mapResource struct="TBUF" headers="eikon.rh">
       
    62 				<mapSimpleMember property="text" member="buf"/>
       
    63 			</mapResource>
       
    64 		</sourceMapping>
       
    65 		<sourceGen>
       
    66 			<template phase="ClassMethods">
       
    67 static void Run${instanceName$title}L( const TDesC* aOverrideText = NULL );
       
    68 			</template>
       
    69 			<defineLocation id="MethodLocation" baseLocation="MAIN_FILE" 
       
    70 				owned="true"
       
    71 				location="function(${className}::Run${instanceName$title}L(const TDesC*))">
       
    72 				<template>
       
    73 /**
       
    74  * Show the popup note for ${instanceName}
       
    75  * @param aOverrideText optional override text
       
    76  */
       
    77 void ${className}::Run${instanceName$title}L( const TDesC* aOverrideText )
       
    78 	{
       
    79 	}
       
    80 				</template>
       
    81 			</defineLocation>
       
    82 			<template location="MethodLocation">
       
    83 ${properties.type}* note = new ( ELeave ) ${properties.type}();
       
    84 if ( aOverrideText == NULL )
       
    85 	{
       
    86 	HBufC* noteText = StringLoader::LoadLC( ${resourceName$upper} );
       
    87 	note->ExecuteLD( *noteText );
       
    88 	CleanupStack::PopAndDestroy( noteText );
       
    89 	}
       
    90 else
       
    91 	{
       
    92 	note->ExecuteLD( *aOverrideText );
       
    93 	}
       
    94 			</template>
       
    95 
       
    96 			<template phase="MainSystemIncludes"><![CDATA[
       
    97 #include <aknnotewrappers.h>
       
    98 ]]>			</template>
       
    99 			<template phase="MainSystemIncludes"><![CDATA[
       
   100 #include <barsread.h>
       
   101 ]]>			</template>
       
   102 			<template phase="MainSystemIncludes"><![CDATA[
       
   103 #include <stringloader.h>
       
   104 ]]>			</template>
       
   105 			
       
   106 		</sourceGen>
       
   107 	</component>
       
   108 	
       
   109 </componentDefinition>