<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -->
<!-- All rights reserved. -->
<!-- This component and the accompanying materials are made available -->
<!-- under the terms of the License "Eclipse Public License v1.0" -->
<!-- which accompanies this distribution, and is available -->
<!-- at the URL "http://www.eclipse.org/legal/epl-v10.html". -->

<componentDefinition xmlns="http://www.nokia.com/sdt/emf/component" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<component friendlyName="%friendlyName"
	qualifiedName="com.nokia.sdt.series60.CEikEdwin"
	baseComponent="com.nokia.sdt.series60.CEikEdwinBase" 
	category="Editors"
	instanceNameRoot="edit" version="1.0">
	<documentation>
		<information>%information</information>
		<helpTopic></helpTopic>
		<wizardDescription></wizardDescription>
	</documentation>
	<symbian minSDKVersion="2.0" sdkName="com.nokia.series60"
		resourceType="EDWIN" className="CEikEdwin" />
	<designerImages 
		smallIconFile="CEikEdwin_sm.png" 
		largeIconFile="CEikEdwin.png"/>
			
	<attributes>
		<attribute key="cpp-class-name">CEikEdwin</attribute>
		<attribute key="is-dialog-content">true</attribute>
		<attribute key="is-form-content">true</attribute>
		<attribute key="is-ccoecontrol-content">true</attribute>
		<attribute key="is-setting-item-list-content">true</attribute>
		<attribute key="setting-item-class-name">CAknTextSettingItem</attribute>
		<attribute key="data-model-cpp-type">TDes</attribute>
		<attribute key="is-dataquery-content">true</attribute>
		<attribute key="dataquery-className">CAknTextQueryDialog</attribute>
		<attribute key="rss-control-type-enum">EEikCtEdwin</attribute>
	</attributes>
			
	<properties>
		<compoundProperty name="flags" category="Edit" type="com.nokia.sdt.eikedwin.flags"
			descriptionKey="flagsDescription" />
		<property name="text" category="Data" type="localizedString" default="Edit text"
			descriptionKey="textDescription" 
			editorClass="com.nokia.sdt.symbian.ui.editors.MultilineTextEditorFactory" />
		<property name="lines" category="Edit" type="integer" default="1"
			descriptionKey="linesDescription" />
		<property name="maxLength" category="Edit" type="integer" default="255"
			descriptionKey="maxLengthDescription" />
		<enumProperty name="defaultCase" category="Edit" 
			type="com.nokia.sdt.eikedwin.enumTextCase"
			descriptionKey="defaultCaseDescription" />
		<compoundProperty name="allowedCaseModes" category="Edit" 
			type="com.nokia.sdt.eikedwin.allowedCaseModes"
			descriptionKey="allowedCaseModesDescription" />
		<enumProperty name="numericKeymap" category="Edit" 
			type="com.nokia.sdt.eikedwin.enumKeymap"
			descriptionKey="numericKeymapDescription" />
		<enumProperty name="defaultInputMode" category="Edit" 
			type="com.nokia.sdt.eikedwin.enumInputMode"
			descriptionKey="defaultInputModeDescription" />
		<compoundProperty name="allowedInputModes" category="Edit" 
			type="com.nokia.sdt.eikedwin.allowInputModes"
			descriptionKey="allowedInputModesDescription" />
		<compoundProperty name="avkonFlags" category="Edit" 
			type="com.nokia.sdt.eikedwin.avkonFlags"
			descriptionKey="avkonFlagsDescription" />
		<property name="maxViewHeightInLines" category="Edit" type="integer" minValue="0"
			descriptionKey="maxViewHeightInLinesDescription" />
		<enumProperty name="specialCharacterTable" category="Edit" 
			type="com.nokia.sdt.eikedwin.enumSpecialCharTableDialog"
			descriptionKey="specialCharacterTableDescription" />
	</properties>

	<implementations>
		<implementation>
			<interface id="com.nokia.sdt.datamodel.adapter.IVisualAppearance"/>
			<interface id="com.nokia.sdt.datamodel.adapter.IDirectLabelEdit"/>
			<interface id="com.nokia.sdt.datamodel.adapter.IComponentInstancePropertyListener"/> 
			<script file="CEikEdwin_visual.js" prototype="CEikEdwinVisual"/>
		</implementation>
	</implementations>

<sourceMapping>
	<mapResource struct="EDWIN" headers="eikon.rh eikon.hrh uikon.rh uikon.hrh avkon.hrh">
		<mapBitmaskMember property="flags" member="flags">
			<mapBitmaskValue properties="EEikEdwinKeepDocument" value="EEikEdwinKeepDocument"/>
			<mapBitmaskValue properties="EEikEdwinSegmentedStorage" value="EEikEdwinSegmentedStorage"/>
			<mapBitmaskValue properties="EEikEdwinNoAutoSelection" value="EEikEdwinNoAutoSelection"/>
			<mapBitmaskValue properties="EEikEdwinJustAutoCurEnd" value="EEikEdwinJustAutoCurEnd"/> 
			<mapBitmaskValue properties="EEikEdwinNoWrap" value="EEikEdwinNoWrap"/>
			<mapBitmaskValue properties="EEikEdwinLineCursor" value="EEikEdwinLineCursor"/>
			<mapBitmaskValue properties="EEikEdwinNoHorizScrolling" value="EEikEdwinNoHorizScrolling"/>
			<mapBitmaskValue properties="EEikEdwinInclusiveSizeFixed" value="EEikEdwinInclusiveSizeFixed"/>
			<mapBitmaskValue properties="EEikEdwinDisplayOnly" value="EEikEdwinDisplayOnly"/>
			<mapBitmaskValue properties="EEikEdwinAlwaysShowSelection" value="EEikEdwinAlwaysShowSelection"/>
			<mapBitmaskValue properties="EEikEdwinReadOnly" value="EEikEdwinReadOnly"/>
			<mapBitmaskValue properties="EEikEdwinAllowPictures" value="EEikEdwinAllowPictures"/>
			<mapBitmaskValue properties="EEikEdwinAllowUndo" value="EEikEdwinAllowUndo"/>
			<mapBitmaskValue properties="EEikEdwinNoLineOrParaBreaks" value="EEikEdwinNoLineOrParaBreaks"/>
			<mapBitmaskValue properties="EEikEdwinOnlyASCIIChars" value="EEikEdwinOnlyASCIIChars"/>
			<mapBitmaskValue properties="EEikEdwinIgnoreVirtualCursor" value="EEikEdwinIgnoreVirtualCursor"/>
			<mapBitmaskValue properties="EEikEdwinAvkonDisableCursor" value="EEikEdwinAvkonDisableCursor"/>
			<!--
			<mapBitmaskValue properties="EEikEdwinAvkonNotEditable" value="EEikEdwinAvkonNotEditable"/>
			-->
			<mapBitmaskValue properties="EEikEdwinAlternativeWrapping" value="EEikEdwinAlternativeWrapping"/>
			<mapBitmaskValue properties="EEikEdwinResizable" value="EEikEdwinResizable"/>
		</mapBitmaskMember>		
		<mapSimpleMember property="lines" member="lines"/>
		<mapSimpleMember property="maxLength" member="maxlength"/>
		<mapEnumMember property="defaultCase" member="default_case" validate="false"/>
		<mapBitmaskMember property="allowedCaseModes" member="allowed_case_modes">
			<mapBitmaskValue properties="EAknEditorUpperCase EAknEditorLowerCase EAknEditorTextCase" value="EAknEditorAllCaseModes"/>
			<mapBitmaskValue properties="EAknEditorUpperCase" value="EAknEditorUpperCase"/>
			<mapBitmaskValue properties="EAknEditorLowerCase" value="EAknEditorLowerCase"/>
			<mapBitmaskValue properties="EAknEditorTextCase" value="EAknEditorTextCase"/>
		</mapBitmaskMember>
		<!-- the default changes between 2.1 and 2.6 -->
		<mapEnumMember property="numericKeymap" member="numeric_keymap" suppressDefault="false" validate="false" />
		<mapEnumMember property="defaultInputMode" member="default_input_mode" validate="false"/>
		<mapBitmaskMember property="allowedInputModes" member="allowed_input_modes">
			<!-- The value of EAknEditorAllInputModes changes between 2.1 and 2.6,
					So this can't be coded without selecting on the SDK - see uikon.hrh
			<mapBitmaskValue properties="EAknEditorTextInputMode EAknEditorNumericInputMode EAknEditorSecretAlphaInputMode EAknEditorKatakanaInputMode EAknEditorFullWidthTextInputMode EAknEditorFullWidthNumericInputMode EAknEditorFullWidthKatakanaInputMode EAknEditorHiraganaKanjiInputMode EAknEditorHalfWidthTextInputMode"
				value="EAknEditorAllInputModes"/>
			-->
			<mapBitmaskValue properties="EAknEditorTextInputMode" value="EAknEditorTextInputMode"/>
			<mapBitmaskValue properties="EAknEditorNumericInputMode" value="EAknEditorNumericInputMode"/>
			<mapBitmaskValue properties="EAknEditorSecretAlphaInputMode" value="EAknEditorSecretAlphaInputMode"/>
			<mapBitmaskValue properties="EAknEditorKatakanaInputMode" value="EAknEditorKatakanaInputMode"/>
			<mapBitmaskValue properties="EAknEditorFullWidthTextInputMode" value="EAknEditorFullWidthTextInputMode"/>
			<mapBitmaskValue properties="EAknEditorFullWidthNumericInputMode" value="EAknEditorFullWidthNumericInputMode"/>
			<mapBitmaskValue properties="EAknEditorFullWidthKatakanaInputMode" value="EAknEditorFullWidthKatakanaInputMode"/>
			<mapBitmaskValue properties="EAknEditorHiraganaKanjiInputMode" value="EAknEditorHiraganaKanjiInputMode"/>
			<mapBitmaskValue properties="EAknEditorHiraganaInputMode" value="EAknEditorHiraganaInputMode"/>
			<mapBitmaskValue properties="EAknEditorHalfWidthTextInputMode" value="EAknEditorHalfWidthTextInputMode"/>
		</mapBitmaskMember>
		<mapBitmaskMember property="avkonFlags" member="avkon_flags">
			<mapBitmaskValue properties="EAknEditorFlagFixedCase" value="EAknEditorFlagFixedCase"/>
			<mapBitmaskValue properties="EAknEditorFlagNoT9" value="EAknEditorFlagNoT9"/>
			<mapBitmaskValue properties="EAknEditorFlagNoEditIndicators" value="EAknEditorFlagNoEditIndicators"/>
			<mapBitmaskValue properties="EAknEditorFlagNoLRNavigation" value="EAknEditorFlagNoLRNavigation"/>
			<mapBitmaskValue properties="EAknEditorFlagSupressShiftMenu" value="EAknEditorFlagSupressShiftMenu"/>
			<mapBitmaskValue properties="EAknEditorFlagEnableScrollBars" value="EAknEditorFlagEnableScrollBars"/>
			<mapBitmaskValue properties="EAknEditorFlagMTAutoOverwrite" value="EAknEditorFlagMTAutoOverwrite"/>
			<mapBitmaskValue properties="EAknEditorFlagUseSCTNumericCharmap" value="EAknEditorFlagUseSCTNumericCharmap"/>
			<mapBitmaskValue properties="EAknEditorFlagLatinInputModesOnly" value="EAknEditorFlagLatinInputModesOnly"/>
			<mapBitmaskValue properties="EAknEditorFlagForceTransparentFepModes" value="EAknEditorFlagForceTransparentFepModes"/>
			<mapBitmaskValue properties="EAknEditorFlagAllowEntersWithScrollDown" value="EAknEditorFlagAllowEntersWithScrollDown"/>
			<mapBitmaskValue properties="EAknEditorFlagEnablePictographInput" value="EAknEditorFlagEnablePictographInput"/>
			<mapBitmaskValue properties="EAknEditorFlagFindPane" value="EAknEditorFlagFindPane"/>
		</mapBitmaskMember>
		<mapIdentifierMember property="specialCharacterTable" member="special_character_table"/>
		<mapSimpleMember property="maxViewHeightInLines" member="max_view_height_in_lines"/>
	</mapResource>
	<mapResource struct="TBUF" headers="eikon.rh" id="text">
		<mapSimpleMember property="text" member="buf" />
	</mapResource>
</sourceMapping>

<sourceGen forms="Dialog Container AknDataQuerySetData AknDataQuerySetData1 AknDataQuerySetData2">

		<inline scope="prototype"><![CDATA[
include("../../dataModelGenLibrary.js")

]]>		</inline>
		
		<useTemplate ids="INIT_FROM_CONTAINER" />
		<useTemplateGroup ids="CONTAINER_CHILD_CONTRIBS" />
		
		<useTemplate ids="INIT_FROM_DIALOG" />
		
		<template phase="Initialize" forms="Container Dialog Form">
	{
	HBufC* text = StringLoader::LoadLC( ${Engine.getGeneratedResource(instance, "text").toUpperCase() } );
	${instanceMemberName}->SetTextL( text );
	CleanupStack::PopAndDestroy( text );
	}
		</template>

		<template form="AknDataQuerySetData" phase="SetData"><![CDATA[
	HBufC* text = StringLoader::LoadLC( ${Engine.getGeneratedResource(instance, "text").toUpperCase() } );
	aData.Copy( *text );
	CleanupStack::PopAndDestroy( text );
]]>		</template>

		<template form="AknDataQuerySetData1" phase="SetData"><![CDATA[
	HBufC* text1 = StringLoader::LoadLC( ${Engine.getGeneratedResource(instance, "text").toUpperCase() } );
	aData1.Copy( *text1 );
	CleanupStack::PopAndDestroy( text1 );
]]>		</template>

		<template form="AknDataQuerySetData2" phase="SetData"><![CDATA[
	HBufC* text2 = StringLoader::LoadLC( ${Engine.getGeneratedResource(instance, "text").toUpperCase() } );
	aData2.Copy( *text2 );
	CleanupStack::PopAndDestroy( text2 );
]]>		</template>

		<useTemplate ids="INIT_FROM_SETTINGS_LIST" />

		<template phase="Initialize" forms="SettingsList"><![CDATA[
	{
	HBufC* text = StringLoader::LoadLC( ${Engine.getGeneratedResource(instance, "text").toUpperCase() } );
<% this.setupSettingItem(contribs, 1, instance, "text->Des()"); 
%>	CleanupStack::PopAndDestroy( text );
	}
]]>		</template>

			<inline>
this.getCppSystemIncludes(contribs, [ "barsread.h", "stringloader.h",
									"gdi.h", "eikedwin.h", "eikenv.h" ]);
			</inline>
			
	<useTemplateGroup ids="CLASS_CONTRIBS" />
						
	<useTemplate ids="LAYOUT_CONTROLS" />
			
	<useTemplateGroup ids="SET_ALIGN" />
	
	
	<useTemplateGroup ids="GenerateCommonControlEvents GenerateStateChangedEvent"/>
	<useTemplateGroup ids="GenerateRequestingFocusEvent GenerateRequestingExitEvent"/>
	<useTemplateGroup ids="GenerateRequestingCancelEvent GenerateInteractionRefusedEvent"/>
	<useTemplateGroup ids="GeneratePrepareFocusTransitionEvent"/>

	<useTemplateGroup ids="GenerateCommonEdwinEvents GenerateFormatChangedEvent"/>
	<useTemplateGroup ids="GenerateNavigationEvent GenerateTextUpdatedEvent"/>
	
	<useTemplateGroup ids="GenerateEditingStartedEvent GenerateEditingStoppedEvent" />
	
	</sourceGen>

</component>
</componentDefinition>
