|
1 <?xml version="1.0" encoding="UTF-8"?> |
|
2 <!-- Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). --> |
|
3 <!-- All rights reserved. --> |
|
4 <!-- This component and the accompanying materials are made available --> |
|
5 <!-- under the terms of the License "Eclipse Public License v1.0" --> |
|
6 <!-- which accompanies this distribution, and is available --> |
|
7 <!-- at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
8 |
|
9 <componentDefinition xmlns="http://www.nokia.com/sdt/emf/component" |
|
10 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
|
11 |
|
12 <component baseComponent="com.nokia.sdt.symbian.CEikAlignedBase" |
|
13 friendlyName="%friendlyName" |
|
14 qualifiedName="com.nokia.sdt.series60.CEikImage" |
|
15 category="Controls" |
|
16 instanceNameRoot="image" |
|
17 version="1.0"> |
|
18 <documentation> |
|
19 <information>%information</information> |
|
20 </documentation> |
|
21 <symbian sdkName="com.nokia.series60" minSDKVersion="2.0" |
|
22 className="CEikImage" classHelpTopic="" |
|
23 resourceType="IMAGE" resourceHelpTopic="" /> |
|
24 <designerImages smallIconFile="CEikImage_sm.png" |
|
25 largeIconFile="CEikImage.png"/> |
|
26 <attributes> |
|
27 <attribute key="cpp-class-name">CEikImage</attribute> |
|
28 <attribute key="is-dialog-content">true</attribute> |
|
29 <attribute key="is-ccoecontrol-content">true</attribute> |
|
30 <attribute key="is-caknpreviewpopup-content">true</attribute> |
|
31 <attribute key="rss-control-type-enum">EEikCtImage</attribute> |
|
32 </attributes> |
|
33 <properties> |
|
34 <compoundProperty category="Appearance" name="image" |
|
35 type="com.nokia.sdt.symbian.imageProperty" |
|
36 descriptionKey="imageDescription" /> |
|
37 <property category="Appearance" name="emphasis" type="boolean" |
|
38 descriptionKey="emphasisDescription" /> |
|
39 <enumProperty category="Appearance" name="brushStyle" |
|
40 type="com.nokia.sdt.series60.CGraphicsContext.BrushStyle" |
|
41 descriptionKey="brushStyleDescription" /> |
|
42 </properties> |
|
43 <implementations> |
|
44 <implementation> |
|
45 <interface id="com.nokia.sdt.datamodel.adapter.IVisualAppearance"/> |
|
46 <interface id="com.nokia.sdt.datamodel.adapter.IDirectImageEdit"/> |
|
47 <interface id="com.nokia.sdt.datamodel.adapter.IImagePropertyRenderingInfo"/> |
|
48 <script file="CEikImage_visual.js" prototype="CEikImageVisual"/> |
|
49 </implementation> |
|
50 </implementations> |
|
51 |
|
52 <!-- resources don't work for SVG, since this is not Avkon |
|
53 |
|
54 <sourceMapping> |
|
55 <mapResource struct="IMAGE" headers="eikon.rh uikon.rh"> |
|
56 <mapSimpleMember property="image.bmpfile" member="bmpfile"/> |
|
57 <mapIdentifierMember property="image.bmpid" member="bmpid"/> |
|
58 <mapIdentifierMember property="image.bmpmask" member="bmpmask"/> |
|
59 |
|
60 // code and rss use different enums... |
|
61 |
|
62 <mapEnumMember property="horiz_align" member="horiz_align" |
|
63 headers="uikon.hrh" validate="false"> |
|
64 <mapEnum value="EHLeft" enumerator="EEikLabelAlignHLeft"/> |
|
65 <mapEnum value="EHCenter" enumerator="EEikLabelAlignHCenter"/> |
|
66 <mapEnum value="EHRight" enumerator="EEikLabelAlignHRight"/> |
|
67 </mapEnumMember> |
|
68 <mapEnumMember property="vert_align" member="vert_align" |
|
69 headers="uikon.hrh" validate="false"> |
|
70 <mapEnum value="EVTop" enumerator="EEikLabelAlignVTop"/> |
|
71 <mapEnum value="EVCenter" enumerator="EEikLabelAlignVCenter"/> |
|
72 <mapEnum value="EVBottom" enumerator="EEikLabelAlignVBottom"/> |
|
73 </mapEnumMember> |
|
74 </mapResource> |
|
75 </sourceMapping> |
|
76 |
|
77 --> |
|
78 |
|
79 <sourceGen forms="Dialog Container"> |
|
80 |
|
81 <useTemplateGroup ids="CLASS_CONTRIBS" /> |
|
82 <!-- rsrcs don't work for SVG images |
|
83 <useTemplate ids="INIT_FROM_CONTAINER" /> |
|
84 --> |
|
85 <useTemplateGroup ids="CONTAINER_CHILD_CONTRIBS" /> |
|
86 |
|
87 <useTemplate ids="INIT_FROM_DIALOG" /> |
|
88 <useTemplate ids="LAYOUT_CONTROLS" /> |
|
89 |
|
90 <inline scope="prototype"> |
|
91 include("../srcgenLibrary.js") |
|
92 </inline> |
|
93 |
|
94 <template phase="Initialize"> |
|
95 ${instanceMemberName} = new ( ELeave ) CEikImage; |
|
96 </template> |
|
97 |
|
98 <inline><![CDATA[ |
|
99 if (formrx.test("")) { |
|
100 setupImageFromPropertyViaCFbsBitmap(contribs, instance, "Initialize", null, 0, |
|
101 instance.properties["image"], "EAspectRatioPreserved" /*aspect*/, |
|
102 instanceMemberName + "->SetPicture( {0} );\n", |
|
103 instanceMemberName + "->SetPicture( {0}, {1} );\n", |
|
104 "TSize( " + properties.size.width + ", " + properties.size.height + " )" |
|
105 ); |
|
106 } |
|
107 ]]> </inline> |
|
108 |
|
109 <template phase="Initialize"><![CDATA[ |
|
110 ${instanceMemberName}->SetAlignment( ${getTGulAlignmentValue(properties.horiz_align, properties.vert_align)} ); |
|
111 <% setPropertiesForPhase(contribs, "Initialize", 0, instanceMemberName, false, |
|
112 properties.brushStyle, "ENullBrush", "{0}->SetBrushStyle( CWindowGc::{1} );\\n"); |
|
113 if(properties.emphasis) { |
|
114 %>${instanceMemberName}->SetEmphasis( ETrue ); |
|
115 <% } %> ]]> </template> |
|
116 |
|
117 <inline> |
|
118 this.getCppSystemIncludes(contribs, [ "barsread.h", |
|
119 "eikimage.h", "eikenv.h" ]); |
|
120 </inline> |
|
121 |
|
122 <useTemplateGroup ids="GenerateCommonControlEvents GenerateStateChangedEvent"/> |
|
123 <useTemplateGroup ids="GenerateRequestingFocusEvent GenerateRequestingExitEvent"/> |
|
124 <useTemplateGroup ids="GenerateRequestingCancelEvent GenerateInteractionRefusedEvent"/> |
|
125 <useTemplateGroup ids="GeneratePrepareFocusTransitionEvent"/> |
|
126 |
|
127 </sourceGen> |
|
128 </component> |
|
129 </componentDefinition> |