2
|
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 |
<component
|
|
12 |
friendlyName="Avkon Document"
|
|
13 |
qualifiedName="com.nokia.sdt.series60.CAknDocument"
|
|
14 |
instanceNameRoot="document"
|
|
15 |
version="1.0">
|
|
16 |
<documentation>
|
|
17 |
<information>The Series 60 top-level Avkon document class.
|
|
18 |
This is a class which serves to manage data that can be loaded
|
|
19 |
and saved.</information>
|
|
20 |
</documentation>
|
|
21 |
<symbian sdkName="com.nokia.series60" minSDKVersion="2.0"
|
|
22 |
className="CAknDocument" classHelpTopic="" />
|
|
23 |
<!-- <designerImages smallIconFile="CAknView_sm.png" largeIconFile="CAknView.png" layoutImageFile="CAknView.png"/> -->
|
|
24 |
<attributes>
|
|
25 |
<attribute key="not-in-toolbox">true</attribute>
|
|
26 |
</attributes>
|
|
27 |
<designerImages smallIconFile="CAknDocument_sm.png"
|
|
28 |
largeIconFile="CAknDocument.png"/>
|
|
29 |
<properties>
|
|
30 |
<property category="Design" name="className" type="string"/>
|
|
31 |
<property category="Document" name="name" type="string" />
|
|
32 |
<property category="Document" name="fileMode" type="integer"/>
|
|
33 |
<!-- TODO: find out what the integer in CEikDocument::SetAppFileModeL() means -->
|
|
34 |
</properties>
|
|
35 |
|
|
36 |
<sourceGen>
|
|
37 |
|
|
38 |
<defineLocation id="HEADER_FILE" domain="cpp" dir="${inc}"
|
|
39 |
file="${instanceName}.h"
|
|
40 |
owned="false"
|
|
41 |
location="">
|
|
42 |
</defineLocation>
|
|
43 |
|
|
44 |
<template location="HEADER_FILE">
|
|
45 |
#ifndef ${instanceName.toUpperCase()}_H
|
|
46 |
#define ${instanceName.toUpperCase()}_H
|
|
47 |
|
|
48 |
</template>
|
|
49 |
|
|
50 |
<template location="HEADER_FILE"><![CDATA[
|
|
51 |
#include <akndoc.h>
|
|
52 |
]]>
|
|
53 |
</template>
|
|
54 |
|
|
55 |
<template location="HEADER_FILE"><![CDATA[
|
|
56 |
class CEikAppUi;
|
|
57 |
]]>
|
|
58 |
</template>
|
|
59 |
|
|
60 |
<defineLocation id="CLASS" baseLocation="HEADER_FILE"
|
|
61 |
owned="false"
|
|
62 |
location="class(${className})">
|
|
63 |
<template><![CDATA[
|
|
64 |
/**
|
|
65 |
* @class ${className} ${instanceName}.h
|
|
66 |
* @brief A CAknDocument-derived class is required by the S60 application
|
|
67 |
* framework. It is responsible for creating the AppUi object.
|
|
68 |
*/
|
|
69 |
class ${className} : public CAknDocument
|
|
70 |
{
|
|
71 |
public:
|
|
72 |
// constructor
|
|
73 |
static ${className}* NewL( CEikApplication& aApp );
|
|
74 |
|
|
75 |
private:
|
|
76 |
// constructors
|
|
77 |
${className}( CEikApplication& aApp );
|
|
78 |
void ConstructL();
|
|
79 |
|
|
80 |
public:
|
|
81 |
// from base class CEikDocument
|
|
82 |
CEikAppUi* CreateAppUiL();
|
|
83 |
};
|
|
84 |
]]> </template>
|
|
85 |
</defineLocation>
|
|
86 |
|
|
87 |
<template location="CLASS"/>
|
|
88 |
|
|
89 |
<template location="HEADER_FILE">
|
|
90 |
#endif // ${instanceName.toUpperCase()}_H
|
|
91 |
</template>
|
|
92 |
|
|
93 |
<defineLocation id="MAIN_FILE" domain="cpp" dir="${src}"
|
|
94 |
file="${instanceName}.cpp"
|
|
95 |
owned="false"
|
|
96 |
location="">
|
|
97 |
</defineLocation>
|
|
98 |
|
|
99 |
<defineLocation id="MAIN_USER_INCLUDES" baseLocation="MAIN_FILE"
|
|
100 |
location="region(Generated User Includes)"
|
|
101 |
filter="unique-includes">
|
|
102 |
<template ><![CDATA[
|
|
103 |
#include "${instanceName}.h"
|
|
104 |
]]> </template>
|
|
105 |
</defineLocation>
|
|
106 |
|
|
107 |
<template location="MAIN_USER_INCLUDES"/>
|
|
108 |
|
|
109 |
<template location="MAIN_FILE"><![CDATA[
|
|
110 |
/**
|
|
111 |
* @brief Constructs the document class for the application.
|
|
112 |
* @param anApplication the application instance
|
|
113 |
*/
|
|
114 |
${className}::${className}( CEikApplication& anApplication )
|
|
115 |
: CAknDocument( anApplication )
|
|
116 |
{
|
|
117 |
}
|
|
118 |
|
|
119 |
/**
|
|
120 |
* @brief Completes the second phase of Symbian object construction.
|
|
121 |
* Put initialization code that could leave here.
|
|
122 |
*/
|
|
123 |
void ${className}::ConstructL()
|
|
124 |
{
|
|
125 |
}
|
|
126 |
|
|
127 |
/**
|
|
128 |
* Symbian OS two-phase constructor.
|
|
129 |
*
|
|
130 |
* Creates an instance of ${className}, constructs it, and
|
|
131 |
* returns it.
|
|
132 |
*
|
|
133 |
* @param aApp the application instance
|
|
134 |
* @return the new ${className}
|
|
135 |
*/
|
|
136 |
${className}* ${className}::NewL( CEikApplication& aApp )
|
|
137 |
{
|
|
138 |
${className}* self = new ( ELeave ) ${className}( aApp );
|
|
139 |
CleanupStack::PushL( self );
|
|
140 |
self->ConstructL();
|
|
141 |
CleanupStack::Pop( self );
|
|
142 |
return self;
|
|
143 |
}
|
|
144 |
]]>
|
|
145 |
</template>
|
|
146 |
|
|
147 |
<defineLocation id="CREATE_APPUIL" baseLocation="MAIN_FILE"
|
|
148 |
owned="false"
|
|
149 |
location="function(${className}::CreateAppUiL())">
|
|
150 |
<template><![CDATA[
|
|
151 |
/**
|
|
152 |
* @brief Creates the application UI object for this document.
|
|
153 |
* @return the new instance
|
|
154 |
*/
|
|
155 |
CEikAppUi* ${className}::CreateAppUiL()
|
|
156 |
{
|
|
157 |
}
|
|
158 |
]]>
|
|
159 |
</template>
|
|
160 |
</defineLocation>
|
|
161 |
|
|
162 |
<template location="CREATE_APPUIL"/>
|
|
163 |
|
|
164 |
<!-- child contributions -->
|
|
165 |
<inline>
|
|
166 |
// iterate children
|
|
167 |
contribs.addAll(Engine.generateChildContributions(form))
|
|
168 |
|
|
169 |
// fix up the phases so they point to real locations
|
|
170 |
Engine.assignLocationsForPhase(contribs, "MainUserIncludes", "MAIN_USER_INCLUDES");
|
|
171 |
Engine.assignLocationsForPhase(contribs, "CreateAppUiL", "CREATE_APPUIL");
|
|
172 |
|
|
173 |
//Engine.removeDuplicateContributionsForLocation(contribs, "MAIN_USER_INCLUDES");
|
|
174 |
</inline>
|
|
175 |
|
|
176 |
</sourceGen>
|
|
177 |
</component>
|
|
178 |
</componentDefinition>
|