uidesigner/com.nokia.carbide.cpp.uiq.components/components/controls/ControlBase/LayoutControlBase.component
author tzelaw
Tue, 14 Apr 2009 15:03:19 -0500
changeset 94 d74b720418db
parent 2 d760517a8095
permissions -rw-r--r--
Test framework support: Ask debugger to remember DebugTarget so test framework can use it to setup test framework related utility. With this we can use the DebugUI way of launching while keeping test framework functionality
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
<!-- START_USECASES: CU10 END_USECASES -->
cawthron
parents:
diff changeset
     3
<!DOCTYPE componentDefinition [
cawthron
parents:
diff changeset
     4
<!ENTITY common_events SYSTEM "ControlBase_events.inc">
cawthron
parents:
diff changeset
     5
<!ENTITY ControlEventSourcegen SYSTEM "../../ControlEventSourcegen.inc">
cawthron
parents:
diff changeset
     6
<!ENTITY ListBoxEventSourcegen SYSTEM "../../ListBoxEventSourcegen.inc">
cawthron
parents:
diff changeset
     7
] >
cawthron
parents:
diff changeset
     8
<!-- Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -->
cawthron
parents:
diff changeset
     9
<!-- All rights reserved. -->
cawthron
parents:
diff changeset
    10
<!-- This component and the accompanying materials are made available -->
cawthron
parents:
diff changeset
    11
<!-- under the terms of the License "Eclipse Public License v1.0" -->
cawthron
parents:
diff changeset
    12
<!-- which accompanies this distribution, and is available -->
cawthron
parents:
diff changeset
    13
<!-- at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
cawthron
parents:
diff changeset
    14
<componentDefinition xmlns="http://www.nokia.com/sdt/emf/component"
cawthron
parents:
diff changeset
    15
					xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
cawthron
parents:
diff changeset
    16
					
cawthron
parents:
diff changeset
    17
	<!-- This component is the abstract base component for
cawthron
parents:
diff changeset
    18
	     UIQ layout reference components
cawthron
parents:
diff changeset
    19
	 -->					
cawthron
parents:
diff changeset
    20
	<component 
cawthron
parents:
diff changeset
    21
			qualifiedName="com.nokia.carbide.uiq.LayoutControlBase"
cawthron
parents:
diff changeset
    22
			baseComponent="com.nokia.carbide.uiq.ControlBase"
cawthron
parents:
diff changeset
    23
			version="1.0"
cawthron
parents:
diff changeset
    24
			abstract="true">
cawthron
parents:
diff changeset
    25
									
cawthron
parents:
diff changeset
    26
		<symbian sdkName="com.uiq" minSDKVersion="3.0"/>
cawthron
parents:
diff changeset
    27
			
cawthron
parents:
diff changeset
    28
		<attributes>
cawthron
parents:
diff changeset
    29
			<attribute key="not-in-toolbox">true</attribute>
cawthron
parents:
diff changeset
    30
		</attributes>
cawthron
parents:
diff changeset
    31
		
cawthron
parents:
diff changeset
    32
		<properties>
cawthron
parents:
diff changeset
    33
			<componentReferenceProperty name="control" scope="model" category="%category.design" 
cawthron
parents:
diff changeset
    34
				constraint="com.nokia.carbide.uiq.ControlCollectionItemBase"
cawthron
parents:
diff changeset
    35
				readOnly="true" promoteReferenceProperties="true"
cawthron
parents:
diff changeset
    36
				displayName="%control"
cawthron
parents:
diff changeset
    37
				descriptionKey="controlDescription"/>
cawthron
parents:
diff changeset
    38
			<!--TODO: temporary until the layout manager is implemented and integrated :
cawthron
parents:
diff changeset
    39
				see DisplayModelUIQ#createLayoutObject and Container -->
cawthron
parents:
diff changeset
    40
			<compoundProperty category="Hidden" name="location" displayName="%location" 
cawthron
parents:
diff changeset
    41
				type="com.nokia.carbide.uiq.locationProperty"
cawthron
parents:
diff changeset
    42
				editorClass="com.nokia.sdt.symbian.ui.editors.ReadOnlySummaryEditorFactory"
cawthron
parents:
diff changeset
    43
				descriptionKey="locationDescription" />
cawthron
parents:
diff changeset
    44
			<compoundProperty category="Hidden" name="size" displayName="%size"
cawthron
parents:
diff changeset
    45
				type="com.nokia.carbide.uiq.sizeProperty"
cawthron
parents:
diff changeset
    46
				editorClass="com.nokia.sdt.symbian.ui.editors.ReadOnlySummaryEditorFactory"
cawthron
parents:
diff changeset
    47
				descriptionKey="sizeDescription"/>
cawthron
parents:
diff changeset
    48
		</properties>
cawthron
parents:
diff changeset
    49
		
cawthron
parents:
diff changeset
    50
		<events defaultEventName="EEventStateChanged">
cawthron
parents:
diff changeset
    51
			&common_events;
cawthron
parents:
diff changeset
    52
		</events>
cawthron
parents:
diff changeset
    53
		
cawthron
parents:
diff changeset
    54
		<implementations>
cawthron
parents:
diff changeset
    55
			<implementation>
cawthron
parents:
diff changeset
    56
				<interface id="com.nokia.sdt.datamodel.adapter.IPropertyExtenders"/>
cawthron
parents:
diff changeset
    57
				<script file="LayoutControlBase_propertyExtenders.js" prototype="LayoutControlBase"/>
cawthron
parents:
diff changeset
    58
			</implementation>
cawthron
parents:
diff changeset
    59
			<implementation>
cawthron
parents:
diff changeset
    60
				<interface id="com.nokia.sdt.datamodel.adapter.IClipboardCommandExtender"/>
cawthron
parents:
diff changeset
    61
				<code class="com.nokia.carbide.cpp.uiq.components.layoutComponents.ClipboardCommandExtenderFactory"/>
cawthron
parents:
diff changeset
    62
			</implementation>
cawthron
parents:
diff changeset
    63
		</implementations>
cawthron
parents:
diff changeset
    64
		
cawthron
parents:
diff changeset
    65
		<sourceGen>
cawthron
parents:
diff changeset
    66
			<templateGroup id="GenerateControlSourceGen">
cawthron
parents:
diff changeset
    67
			<inline scope="prototype">
cawthron
parents:
diff changeset
    68
${jsObject}.prototype.getInstanceMemberName = function(instance) {
cawthron
parents:
diff changeset
    69
	return "i" + TextUtils.titleCase(instance.properties.control);
cawthron
parents:
diff changeset
    70
}			</inline>
cawthron
parents:
diff changeset
    71
				<inline forms="InstanceGen" id="0">
cawthron
parents:
diff changeset
    72
		var targetInstance = lookupInstanceByName(instance.properties.control);
cawthron
parents:
diff changeset
    73
		if (targetInstance) {
cawthron
parents:
diff changeset
    74
			var targetContribs = Engine.generateRedirectedInstanceContributions(
cawthron
parents:
diff changeset
    75
					targetInstance,
cawthron
parents:
diff changeset
    76
					form,
cawthron
parents:
diff changeset
    77
					instance);		
cawthron
parents:
diff changeset
    78
			contribs.addAll(targetContribs);		
cawthron
parents:
diff changeset
    79
		}
cawthron
parents:
diff changeset
    80
				</inline>
cawthron
parents:
diff changeset
    81
			</templateGroup>
cawthron
parents:
diff changeset
    82
			
cawthron
parents:
diff changeset
    83
			&ControlEventSourcegen;
cawthron
parents:
diff changeset
    84
			&ListBoxEventSourcegen;
cawthron
parents:
diff changeset
    85
			
cawthron
parents:
diff changeset
    86
		</sourceGen>
cawthron
parents:
diff changeset
    87
cawthron
parents:
diff changeset
    88
	</component>
cawthron
parents:
diff changeset
    89
cawthron
parents:
diff changeset
    90
</componentDefinition>