<?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.StatusPaneTitle" 
		baseComponent="com.nokia.sdt.series60.StatusPaneTitleBase"
		category="System"
		instanceNameRoot="title"
		version="1.0">
		<documentation>
			<information>%information</information>
		</documentation>
		<symbian sdkName="com.nokia.series60" minSDKVersion="2.0"
			className="CAknTitlePane" classHelpTopic=""
			resourceType="TITLE_PANE" resourceHelpTopic="" 
		/>
		<attributes>
			<attribute key="model-type-disposition">view</attribute>
			<attribute key="status-pane-id">EEikStatusPaneUidTitle</attribute>
			<attribute key="rss-control-type-enum">EAknCtTitlePane</attribute>
		</attributes>
		<designerImages smallIconFile="StatusPaneTitle_sm.png" 
			largeIconFile="StatusPaneTitle.png"/>
		<properties>
			<property name="titleText" displayName="%titleText" 
				category="Data" type="localizedString" default="Title" 
				descriptionKey="titleTextDescription"
				editorClass="com.nokia.sdt.symbian.ui.editors.ScalableTextEditorFactory" />
			<compoundProperty category="Appearance" name="image"
				descriptionKey="imageDescription"
				type="com.nokia.sdt.symbian.imageProperty"/>
		</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.IDirectImageEdit"/>
				<interface id="com.nokia.sdt.datamodel.adapter.IImagePropertyRenderingInfo"/>
				<interface id="com.nokia.sdt.datamodel.adapter.IComponentInstancePropertyListener"/>
				<script file="StatusPaneTitle_visual.js" prototype="StatusPaneTitleVisual"/>
			</implementation>
		</implementations>
		<sourceMapping>
			<mapResource struct="TITLE_PANE" headers="avkon.rh">
				<mapSimpleMember property="titleText" member="txt"/>
			</mapResource>
		</sourceMapping>
		<sourceGen>
			<inline>
include("../srcgenLibrary.js")
			</inline>
			<template phase="MainSystemIncludes"><![CDATA[
#include <akntitle.h>
]]>			</template>
			<template phase="MainSystemIncludes"><![CDATA[
#include <stringloader.h>
]]>			</template>
			<template phase="MainSystemIncludes"><![CDATA[
#include <barsread.h>
]]>			</template>

			<template phase="SetupStatusPane"><![CDATA[
// setup the title pane
TUid titlePaneUid = TUid::Uid( EEikStatusPaneUidTitle );
CEikStatusPaneBase::TPaneCapabilities subPaneTitle = 
	StatusPane()->PaneCapabilities( titlePaneUid );
if ( subPaneTitle.IsPresent() && subPaneTitle.IsAppOwned() )
	{
	CAknTitlePane* ${instanceName} = static_cast< CAknTitlePane* >( 
		StatusPane()->ControlL( titlePaneUid ) );
<% if (properties.titleText != "") { 
%>	TResourceReader reader;
	iEikonEnv->CreateResourceReaderLC( reader, ${resourceName$upper} );
	${instanceName}->SetFromResourceL( reader );
	CleanupStack::PopAndDestroy(); // reader internal state
<% } else { 
	setupImageFromPropertyViaCFbsBitmap(contribs, instance, "SetupStatusPane", null, 1,
			instance.properties["image"], "EAspectRatioPreserved" /*aspect*/,
			instanceName + "->SetPicture( {0} );\\n",
			instanceName + "->SetPicture( {0}, {1} );\\n",
			instanceName + "->Size()"
			);
   } 
%>	}
]]>			
			</template>

			
		</sourceGen>
	</component>
</componentDefinition>
