uidesigner/com.nokia.sdt.series60.componentlibrary/components/controls/CEikImage.component
author Steve Sobek <steve.sobek@nokia.com>
Tue, 14 Apr 2009 18:40:50 -0500
changeset 96 dc3dca9ced31
parent 2 d760517a8095
permissions -rw-r--r--
Fix TOC XML in hopes that 2.1 will build & carefully formatted lots of lines for readability.
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 baseComponent="com.nokia.sdt.symbian.CEikAlignedBase" 
cawthron
parents:
diff changeset
    13
		friendlyName="%friendlyName" 
cawthron
parents:
diff changeset
    14
		qualifiedName="com.nokia.sdt.series60.CEikImage" 
cawthron
parents:
diff changeset
    15
		category="Controls"
cawthron
parents:
diff changeset
    16
		instanceNameRoot="image"
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="CEikImage" classHelpTopic=""
cawthron
parents:
diff changeset
    23
			resourceType="IMAGE" resourceHelpTopic="" />
cawthron
parents:
diff changeset
    24
		<designerImages smallIconFile="CEikImage_sm.png" 
cawthron
parents:
diff changeset
    25
			largeIconFile="CEikImage.png"/>
cawthron
parents:
diff changeset
    26
		<attributes>
cawthron
parents:
diff changeset
    27
			<attribute key="cpp-class-name">CEikImage</attribute>
cawthron
parents:
diff changeset
    28
			<attribute key="is-dialog-content">true</attribute>
cawthron
parents:
diff changeset
    29
			<attribute key="is-ccoecontrol-content">true</attribute>
cawthron
parents:
diff changeset
    30
			<attribute key="is-caknpreviewpopup-content">true</attribute>
cawthron
parents:
diff changeset
    31
			<attribute key="rss-control-type-enum">EEikCtImage</attribute>
cawthron
parents:
diff changeset
    32
		</attributes>
cawthron
parents:
diff changeset
    33
		<properties>
cawthron
parents:
diff changeset
    34
			<compoundProperty category="Appearance" name="image"  
cawthron
parents:
diff changeset
    35
				type="com.nokia.sdt.symbian.imageProperty"
cawthron
parents:
diff changeset
    36
				descriptionKey="imageDescription" />
cawthron
parents:
diff changeset
    37
			<property category="Appearance" name="emphasis" type="boolean"
cawthron
parents:
diff changeset
    38
				descriptionKey="emphasisDescription" />
cawthron
parents:
diff changeset
    39
			<enumProperty category="Appearance" name="brushStyle" 
cawthron
parents:
diff changeset
    40
				type="com.nokia.sdt.series60.CGraphicsContext.BrushStyle"
cawthron
parents:
diff changeset
    41
				descriptionKey="brushStyleDescription" />
cawthron
parents:
diff changeset
    42
		</properties>
cawthron
parents:
diff changeset
    43
		<implementations>
cawthron
parents:
diff changeset
    44
			<implementation>
cawthron
parents:
diff changeset
    45
				<interface id="com.nokia.sdt.datamodel.adapter.IVisualAppearance"/>
cawthron
parents:
diff changeset
    46
				<interface id="com.nokia.sdt.datamodel.adapter.IDirectImageEdit"/>
cawthron
parents:
diff changeset
    47
				<interface id="com.nokia.sdt.datamodel.adapter.IImagePropertyRenderingInfo"/>
cawthron
parents:
diff changeset
    48
				<script file="CEikImage_visual.js" prototype="CEikImageVisual"/>
cawthron
parents:
diff changeset
    49
			</implementation>
cawthron
parents:
diff changeset
    50
		</implementations>
cawthron
parents:
diff changeset
    51
		
cawthron
parents:
diff changeset
    52
<!-- resources don't work for SVG, since this is not Avkon 
cawthron
parents:
diff changeset
    53
cawthron
parents:
diff changeset
    54
		<sourceMapping>
cawthron
parents:
diff changeset
    55
			<mapResource struct="IMAGE" headers="eikon.rh uikon.rh">
cawthron
parents:
diff changeset
    56
				<mapSimpleMember property="image.bmpfile" member="bmpfile"/>
cawthron
parents:
diff changeset
    57
				<mapIdentifierMember property="image.bmpid" member="bmpid"/>
cawthron
parents:
diff changeset
    58
				<mapIdentifierMember property="image.bmpmask" member="bmpmask"/>
cawthron
parents:
diff changeset
    59
			
cawthron
parents:
diff changeset
    60
				// code and rss use different enums... 
cawthron
parents:
diff changeset
    61
				
cawthron
parents:
diff changeset
    62
				<mapEnumMember property="horiz_align" member="horiz_align"
cawthron
parents:
diff changeset
    63
					headers="uikon.hrh" validate="false">
cawthron
parents:
diff changeset
    64
					<mapEnum value="EHLeft" enumerator="EEikLabelAlignHLeft"/>
cawthron
parents:
diff changeset
    65
					<mapEnum value="EHCenter" enumerator="EEikLabelAlignHCenter"/>
cawthron
parents:
diff changeset
    66
					<mapEnum value="EHRight" enumerator="EEikLabelAlignHRight"/>
cawthron
parents:
diff changeset
    67
				</mapEnumMember>
cawthron
parents:
diff changeset
    68
				<mapEnumMember property="vert_align" member="vert_align"
cawthron
parents:
diff changeset
    69
					headers="uikon.hrh" validate="false">
cawthron
parents:
diff changeset
    70
					<mapEnum value="EVTop" enumerator="EEikLabelAlignVTop"/>
cawthron
parents:
diff changeset
    71
					<mapEnum value="EVCenter" enumerator="EEikLabelAlignVCenter"/>
cawthron
parents:
diff changeset
    72
					<mapEnum value="EVBottom" enumerator="EEikLabelAlignVBottom"/>
cawthron
parents:
diff changeset
    73
				</mapEnumMember>
cawthron
parents:
diff changeset
    74
			</mapResource>
cawthron
parents:
diff changeset
    75
		</sourceMapping>
cawthron
parents:
diff changeset
    76
cawthron
parents:
diff changeset
    77
-->
cawthron
parents:
diff changeset
    78
		
cawthron
parents:
diff changeset
    79
		<sourceGen forms="Dialog Container">
cawthron
parents:
diff changeset
    80
cawthron
parents:
diff changeset
    81
			<useTemplateGroup ids="CLASS_CONTRIBS" />
cawthron
parents:
diff changeset
    82
<!-- rsrcs don't work for SVG images
cawthron
parents:
diff changeset
    83
			<useTemplate ids="INIT_FROM_CONTAINER" /> 
cawthron
parents:
diff changeset
    84
-->
cawthron
parents:
diff changeset
    85
			<useTemplateGroup ids="CONTAINER_CHILD_CONTRIBS" />
cawthron
parents:
diff changeset
    86
cawthron
parents:
diff changeset
    87
			<useTemplate ids="INIT_FROM_DIALOG" />
cawthron
parents:
diff changeset
    88
			<useTemplate ids="LAYOUT_CONTROLS" />
cawthron
parents:
diff changeset
    89
cawthron
parents:
diff changeset
    90
			<inline scope="prototype">
cawthron
parents:
diff changeset
    91
include("../srcgenLibrary.js")
cawthron
parents:
diff changeset
    92
			</inline>
cawthron
parents:
diff changeset
    93
cawthron
parents:
diff changeset
    94
			<template phase="Initialize">
cawthron
parents:
diff changeset
    95
${instanceMemberName} = new ( ELeave ) CEikImage;
cawthron
parents:
diff changeset
    96
			</template>
cawthron
parents:
diff changeset
    97
cawthron
parents:
diff changeset
    98
			<inline><![CDATA[
cawthron
parents:
diff changeset
    99
if (formrx.test("")) {
cawthron
parents:
diff changeset
   100
	setupImageFromPropertyViaCFbsBitmap(contribs, instance, "Initialize", null, 0,
cawthron
parents:
diff changeset
   101
			instance.properties["image"], "EAspectRatioPreserved" /*aspect*/,
cawthron
parents:
diff changeset
   102
			instanceMemberName + "->SetPicture( {0} );\n",
cawthron
parents:
diff changeset
   103
			instanceMemberName + "->SetPicture( {0}, {1} );\n",
cawthron
parents:
diff changeset
   104
			"TSize( " + properties.size.width + ", " + properties.size.height + " )"
cawthron
parents:
diff changeset
   105
			);
cawthron
parents:
diff changeset
   106
}
cawthron
parents:
diff changeset
   107
]]>			</inline>
cawthron
parents:
diff changeset
   108
cawthron
parents:
diff changeset
   109
			<template phase="Initialize"><![CDATA[
cawthron
parents:
diff changeset
   110
${instanceMemberName}->SetAlignment( ${getTGulAlignmentValue(properties.horiz_align, properties.vert_align)} );
cawthron
parents:
diff changeset
   111
<% 	setPropertiesForPhase(contribs, "Initialize", 0, instanceMemberName, false,
cawthron
parents:
diff changeset
   112
		properties.brushStyle, "ENullBrush", "{0}->SetBrushStyle( CWindowGc::{1} );\\n");
cawthron
parents:
diff changeset
   113
  if(properties.emphasis) {
cawthron
parents:
diff changeset
   114
%>${instanceMemberName}->SetEmphasis( ETrue );
cawthron
parents:
diff changeset
   115
<% } %> ]]>	</template>	
cawthron
parents:
diff changeset
   116
			
cawthron
parents:
diff changeset
   117
			<inline>
cawthron
parents:
diff changeset
   118
this.getCppSystemIncludes(contribs, [ "barsread.h",
cawthron
parents:
diff changeset
   119
									"eikimage.h", "eikenv.h" ]);
cawthron
parents:
diff changeset
   120
			</inline>
cawthron
parents:
diff changeset
   121
		
cawthron
parents:
diff changeset
   122
			<useTemplateGroup ids="GenerateCommonControlEvents GenerateStateChangedEvent"/>
cawthron
parents:
diff changeset
   123
			<useTemplateGroup ids="GenerateRequestingFocusEvent GenerateRequestingExitEvent"/>
cawthron
parents:
diff changeset
   124
			<useTemplateGroup ids="GenerateRequestingCancelEvent GenerateInteractionRefusedEvent"/>
cawthron
parents:
diff changeset
   125
			<useTemplateGroup ids="GeneratePrepareFocusTransitionEvent"/>
cawthron
parents:
diff changeset
   126
cawthron
parents:
diff changeset
   127
		</sourceGen>
cawthron
parents:
diff changeset
   128
	</component>
cawthron
parents:
diff changeset
   129
</componentDefinition>