uidesigner/com.nokia.sdt.series60.componentlibrary/components/statuspane/StatusPaneTitle.component
author fturovic <frank.turovich@nokia.com>
Tue, 07 Apr 2009 13:55:47 -0500
branchRCL_2_0
changeset 69 cab50ba61335
parent 2 d760517a8095
permissions -rw-r--r--
added info on IAD custom rules
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
cawthron
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
cawthron
parents:
diff changeset
     2
<!-- Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -->
cawthron
parents:
diff changeset
     3
<!-- All rights reserved. -->
cawthron
parents:
diff changeset
     4
<!-- This component and the accompanying materials are made available -->
cawthron
parents:
diff changeset
     5
<!-- under the terms of the License "Eclipse Public License v1.0" -->
cawthron
parents:
diff changeset
     6
<!-- which accompanies this distribution, and is available -->
cawthron
parents:
diff changeset
     7
<!-- at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
cawthron
parents:
diff changeset
     8
cawthron
parents:
diff changeset
     9
<componentDefinition xmlns="http://www.nokia.com/sdt/emf/component" 
cawthron
parents:
diff changeset
    10
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
cawthron
parents:
diff changeset
    11
cawthron
parents:
diff changeset
    12
	<component friendlyName="%friendlyName" 
cawthron
parents:
diff changeset
    13
		qualifiedName="com.nokia.sdt.series60.StatusPaneTitle" 
cawthron
parents:
diff changeset
    14
		baseComponent="com.nokia.sdt.series60.StatusPaneTitleBase"
cawthron
parents:
diff changeset
    15
		category="System"
cawthron
parents:
diff changeset
    16
		instanceNameRoot="title"
cawthron
parents:
diff changeset
    17
		version="1.0">
cawthron
parents:
diff changeset
    18
		<documentation>
cawthron
parents:
diff changeset
    19
			<information>%information</information>
cawthron
parents:
diff changeset
    20
		</documentation>
cawthron
parents:
diff changeset
    21
		<symbian sdkName="com.nokia.series60" minSDKVersion="2.0"
cawthron
parents:
diff changeset
    22
			className="CAknTitlePane" classHelpTopic=""
cawthron
parents:
diff changeset
    23
			resourceType="TITLE_PANE" resourceHelpTopic="" 
cawthron
parents:
diff changeset
    24
		/>
cawthron
parents:
diff changeset
    25
		<attributes>
cawthron
parents:
diff changeset
    26
			<attribute key="model-type-disposition">view</attribute>
cawthron
parents:
diff changeset
    27
			<attribute key="status-pane-id">EEikStatusPaneUidTitle</attribute>
cawthron
parents:
diff changeset
    28
			<attribute key="rss-control-type-enum">EAknCtTitlePane</attribute>
cawthron
parents:
diff changeset
    29
		</attributes>
cawthron
parents:
diff changeset
    30
		<designerImages smallIconFile="StatusPaneTitle_sm.png" 
cawthron
parents:
diff changeset
    31
			largeIconFile="StatusPaneTitle.png"/>
cawthron
parents:
diff changeset
    32
		<properties>
cawthron
parents:
diff changeset
    33
			<property name="titleText" displayName="%titleText" 
cawthron
parents:
diff changeset
    34
				category="Data" type="localizedString" default="Title" 
cawthron
parents:
diff changeset
    35
				descriptionKey="titleTextDescription"
cawthron
parents:
diff changeset
    36
				editorClass="com.nokia.sdt.symbian.ui.editors.ScalableTextEditorFactory" />
cawthron
parents:
diff changeset
    37
			<compoundProperty category="Appearance" name="image"
cawthron
parents:
diff changeset
    38
				descriptionKey="imageDescription"
cawthron
parents:
diff changeset
    39
				type="com.nokia.sdt.symbian.imageProperty"/>
cawthron
parents:
diff changeset
    40
		</properties>
cawthron
parents:
diff changeset
    41
		<implementations>
cawthron
parents:
diff changeset
    42
			<implementation>
cawthron
parents:
diff changeset
    43
				<interface id="com.nokia.sdt.datamodel.adapter.IVisualAppearance"/>
cawthron
parents:
diff changeset
    44
				<interface id="com.nokia.sdt.datamodel.adapter.IDirectLabelEdit"/>
cawthron
parents:
diff changeset
    45
				<interface id="com.nokia.sdt.datamodel.adapter.IDirectImageEdit"/>
cawthron
parents:
diff changeset
    46
				<interface id="com.nokia.sdt.datamodel.adapter.IImagePropertyRenderingInfo"/>
cawthron
parents:
diff changeset
    47
				<interface id="com.nokia.sdt.datamodel.adapter.IComponentInstancePropertyListener"/>
cawthron
parents:
diff changeset
    48
				<script file="StatusPaneTitle_visual.js" prototype="StatusPaneTitleVisual"/>
cawthron
parents:
diff changeset
    49
			</implementation>
cawthron
parents:
diff changeset
    50
		</implementations>
cawthron
parents:
diff changeset
    51
		<sourceMapping>
cawthron
parents:
diff changeset
    52
			<mapResource struct="TITLE_PANE" headers="avkon.rh">
cawthron
parents:
diff changeset
    53
				<mapSimpleMember property="titleText" member="txt"/>
cawthron
parents:
diff changeset
    54
			</mapResource>
cawthron
parents:
diff changeset
    55
		</sourceMapping>
cawthron
parents:
diff changeset
    56
		<sourceGen>
cawthron
parents:
diff changeset
    57
			<inline>
cawthron
parents:
diff changeset
    58
include("../srcgenLibrary.js")
cawthron
parents:
diff changeset
    59
			</inline>
cawthron
parents:
diff changeset
    60
			<template phase="MainSystemIncludes"><![CDATA[
cawthron
parents:
diff changeset
    61
#include <akntitle.h>
cawthron
parents:
diff changeset
    62
]]>			</template>
cawthron
parents:
diff changeset
    63
			<template phase="MainSystemIncludes"><![CDATA[
cawthron
parents:
diff changeset
    64
#include <stringloader.h>
cawthron
parents:
diff changeset
    65
]]>			</template>
cawthron
parents:
diff changeset
    66
			<template phase="MainSystemIncludes"><![CDATA[
cawthron
parents:
diff changeset
    67
#include <barsread.h>
cawthron
parents:
diff changeset
    68
]]>			</template>
cawthron
parents:
diff changeset
    69
cawthron
parents:
diff changeset
    70
			<template phase="SetupStatusPane"><![CDATA[
cawthron
parents:
diff changeset
    71
// setup the title pane
cawthron
parents:
diff changeset
    72
TUid titlePaneUid = TUid::Uid( EEikStatusPaneUidTitle );
cawthron
parents:
diff changeset
    73
CEikStatusPaneBase::TPaneCapabilities subPaneTitle = 
cawthron
parents:
diff changeset
    74
	StatusPane()->PaneCapabilities( titlePaneUid );
cawthron
parents:
diff changeset
    75
if ( subPaneTitle.IsPresent() && subPaneTitle.IsAppOwned() )
cawthron
parents:
diff changeset
    76
	{
cawthron
parents:
diff changeset
    77
	CAknTitlePane* ${instanceName} = static_cast< CAknTitlePane* >( 
cawthron
parents:
diff changeset
    78
		StatusPane()->ControlL( titlePaneUid ) );
cawthron
parents:
diff changeset
    79
<% if (properties.titleText != "") { 
cawthron
parents:
diff changeset
    80
%>	TResourceReader reader;
cawthron
parents:
diff changeset
    81
	iEikonEnv->CreateResourceReaderLC( reader, ${resourceName$upper} );
cawthron
parents:
diff changeset
    82
	${instanceName}->SetFromResourceL( reader );
cawthron
parents:
diff changeset
    83
	CleanupStack::PopAndDestroy(); // reader internal state
cawthron
parents:
diff changeset
    84
<% } else { 
cawthron
parents:
diff changeset
    85
	setupImageFromPropertyViaCFbsBitmap(contribs, instance, "SetupStatusPane", null, 1,
cawthron
parents:
diff changeset
    86
			instance.properties["image"], "EAspectRatioPreserved" /*aspect*/,
cawthron
parents:
diff changeset
    87
			instanceName + "->SetPicture( {0} );\\n",
cawthron
parents:
diff changeset
    88
			instanceName + "->SetPicture( {0}, {1} );\\n",
cawthron
parents:
diff changeset
    89
			instanceName + "->Size()"
cawthron
parents:
diff changeset
    90
			);
cawthron
parents:
diff changeset
    91
   } 
cawthron
parents:
diff changeset
    92
%>	}
cawthron
parents:
diff changeset
    93
]]>			
cawthron
parents:
diff changeset
    94
			</template>
cawthron
parents:
diff changeset
    95
cawthron
parents:
diff changeset
    96
			
cawthron
parents:
diff changeset
    97
		</sourceGen>
cawthron
parents:
diff changeset
    98
	</component>
cawthron
parents:
diff changeset
    99
</componentDefinition>