author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 14 Sep 2010 20:58:58 +0300 | |
branch | RCL_3 |
changeset 35 | 3321d3e205b6 |
parent 34 | 5456b4e8b3a8 |
permissions | -rw-r--r-- |
34 | 1 |
/* |
2 |
* Copyright (c) 2002-2004 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 "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 |
* Initial Contributors: |
|
10 |
* Nokia Corporation - initial contribution. |
|
11 |
* |
|
12 |
* Contributors: |
|
13 |
* |
|
14 |
* Description: |
|
15 |
* Xuikon layout engine plugin interface. |
|
16 |
* |
|
17 |
*/ |
|
18 |
||
19 |
#ifndef XNUIENGINEPLUGINIF_H |
|
20 |
#define XNUIENGINEPLUGINIF_H |
|
21 |
||
22 |
// System includes |
|
23 |
#include <e32base.h> |
|
24 |
||
25 |
// User includes |
|
26 |
||
27 |
// Forward declarations |
|
28 |
class CXnUiEngine; |
|
29 |
class CXnProperty; |
|
30 |
class CXnNodePluginIf; |
|
31 |
class CXnDomStringPool; |
|
32 |
class CXnResource; |
|
33 |
class CXnControlAdapter; |
|
34 |
struct TPointerEvent; |
|
35 |
||
36 |
// Class declaration |
|
37 |
/** |
|
38 |
* Xuikon layout engine plugin interface. |
|
39 |
* |
|
40 |
* @ingroup group_xnlayoutengine |
|
41 |
* @lib xnlayoutengine.lib |
|
42 |
* @since Series 60 3.1 |
|
43 |
*/ |
|
44 |
class TXnUiEnginePluginIf |
|
45 |
{ |
|
46 |
public: |
|
47 |
/** |
|
48 |
* C++ default constructor. |
|
49 |
*/ |
|
50 |
TXnUiEnginePluginIf( CXnUiEngine& aUiEngine ); |
|
51 |
||
52 |
public: |
|
53 |
// New functions |
|
54 |
||
55 |
/** |
|
56 |
* Calculates the layout of the UI |
|
57 |
* |
|
58 |
* @since Series 60 3.1 |
|
59 |
* @param aNode Starting point for the layout |
|
60 |
* @exception KXnErrLoadLayoutFileFailed Loading the layout file failed. |
|
61 |
*/ |
|
62 |
IMPORT_C void RenderUIL( CXnNodePluginIf* aNode = NULL ); |
|
63 |
||
64 |
/** |
|
65 |
* Gets the root node of the UI. Ownership is not transferred. |
|
66 |
* |
|
67 |
* @since Series 60 3.1 |
|
68 |
* @return Node |
|
69 |
*/ |
|
70 |
IMPORT_C CXnNodePluginIf& RootNodeL(); |
|
71 |
||
72 |
/** |
|
73 |
* Find a node by its id. Ownership is not transferred. |
|
74 |
* |
|
75 |
* @since Series 60 3.1 |
|
76 |
* @param aNodeId Area id |
|
77 |
* @param aNamespace Namespace |
|
78 |
* @return Node with the given id |
|
79 |
*/ |
|
80 |
IMPORT_C CXnNodePluginIf* FindNodeByIdL( |
|
81 |
const TDesC& aNodeId, |
|
82 |
const TDesC& aNamespace = KNullDesC ); |
|
83 |
||
84 |
/** |
|
85 |
* Find a node by its id. Ownership is not transferred. |
|
86 |
* |
|
87 |
* @since Series 60 3.1 |
|
88 |
* @param aNodeId Area id |
|
89 |
* @param aNamespace Namespace |
|
90 |
* @return Node with the given id |
|
91 |
*/ |
|
92 |
IMPORT_C CXnNodePluginIf* FindNodeByIdL( |
|
93 |
const TDesC8& aNodeId, |
|
94 |
const TDesC8& aNamespace = KNullDesC8 ); |
|
95 |
||
96 |
/** |
|
97 |
* Find nodes by class. Ownership is not transferred. |
|
98 |
* |
|
99 |
* @since Series 60 3.1 |
|
100 |
* @param aClassId Class id |
|
101 |
* @return Nodes belonging to the class |
|
102 |
*/ |
|
103 |
IMPORT_C RPointerArray< CXnNodePluginIf > FindNodeByClassL( |
|
104 |
const TDesC& aClassId ); |
|
105 |
||
106 |
/** |
|
107 |
* Find resources (images etc.) of the UI. Ownership is not transferred. |
|
108 |
* |
|
109 |
* @since Series 60 3.1 |
|
110 |
* @return Resources of the UI |
|
111 |
*/ |
|
112 |
IMPORT_C CArrayPtrSeg< CXnResource >& Resources(); |
|
113 |
||
114 |
/** |
|
115 |
* Get currently focused node. Ownership is not transferred. |
|
116 |
* |
|
117 |
* @since Series 60 3.1 |
|
118 |
* @return Focused node |
|
119 |
*/ |
|
120 |
IMPORT_C CXnNodePluginIf* FocusedNodeL(); |
|
121 |
||
122 |
/** |
|
123 |
* Set currently focused node |
|
124 |
* |
|
125 |
* @since Series 60 3.1 |
|
126 |
* @param aFocusedNode Focused node |
|
127 |
*/ |
|
128 |
IMPORT_C void SetFocusedNode( CXnNodePluginIf* aFocusedNode ); |
|
129 |
||
130 |
||
131 |
/** |
|
132 |
* Get the string pool |
|
133 |
* |
|
134 |
* @since Series 60 3.1 |
|
135 |
* @return String pool |
|
136 |
*/ |
|
137 |
IMPORT_C CXnDomStringPool& StringPool(); |
|
138 |
||
139 |
/** |
|
140 |
* Get a numeric value of a property in vertical pixels |
|
141 |
* |
|
142 |
* @since Series 60 3.1 |
|
143 |
* @param aValue Property |
|
144 |
* @param aReferenceValue Value used for percentage calculation |
|
145 |
* @return Value in vertical pixels |
|
146 |
*/ |
|
147 |
IMPORT_C TInt VerticalPixelValueL( |
|
148 |
CXnProperty* aValue, |
|
149 |
TInt aReferenceValue ); |
|
150 |
||
151 |
/** |
|
152 |
* Get a numeric value of a property in horizontal pixels |
|
153 |
* |
|
154 |
* @since Series 60 3.1 |
|
155 |
* @param aValue Property |
|
156 |
* @param aReferenceValue Value used for percentage calculation |
|
157 |
* @return Value in horizontal pixels |
|
158 |
*/ |
|
159 |
IMPORT_C TInt HorizontalPixelValueL( |
|
160 |
CXnProperty* aValue, |
|
161 |
TInt aReferenceValue ); |
|
162 |
||
163 |
/** |
|
164 |
* Get a numeric value of a property in vertical twips |
|
165 |
* |
|
166 |
* @since Series 60 3.1 |
|
167 |
* @param aValue Property |
|
168 |
* @param aReferenceValue Value used for percentage calculation |
|
169 |
* @return Value in vertical twips |
|
170 |
*/ |
|
171 |
IMPORT_C TInt VerticalTwipValueL( |
|
172 |
CXnProperty* aValue, |
|
173 |
TInt aReferenceValue ); |
|
174 |
||
175 |
/** |
|
176 |
* Get a numeric value of a property in horizontal twips |
|
177 |
* |
|
178 |
* @since Series 60 3.1 |
|
179 |
* @param aValue Property |
|
180 |
* @param aReferenceValue Value used for percentage calculation |
|
181 |
* @return Value in horizontal pixels |
|
182 |
*/ |
|
183 |
IMPORT_C TInt HorizontalTwipValueL( |
|
184 |
CXnProperty* aValue, |
|
185 |
TInt aReferenceValue ); |
|
186 |
||
187 |
/** |
|
188 |
* Get the size of the current screen device |
|
189 |
* |
|
190 |
* @since Series 60 3.1 |
|
191 |
* @return Size of the current screen device |
|
192 |
*/ |
|
193 |
IMPORT_C TSize ScreenDeviceSize(); |
|
194 |
||
195 |
/** |
|
196 |
* Checks whether the dialog is displaying. |
|
197 |
* |
|
198 |
* @since Series 60 3.1 |
|
199 |
* @return ETrue if dialog is displaying. |
|
200 |
*/ |
|
201 |
IMPORT_C TBool IsDialogDisplaying(); |
|
202 |
||
203 |
/** |
|
204 |
* Sets the given node dirty. |
|
205 |
* |
|
206 |
* @since Series 60 3.1 |
|
207 |
* @param aNode A node to be set dirty. |
|
208 |
*/ |
|
209 |
IMPORT_C void AddDirtyNodeL( CXnNodePluginIf& aNode ); |
|
210 |
||
211 |
/** |
|
212 |
* Checks whether the menu is displaying. |
|
213 |
* |
|
214 |
* @since Series 60 3.1 |
|
215 |
* @return ETrue if menu is displaying. |
|
216 |
*/ |
|
217 |
IMPORT_C TBool IsMenuDisplaying(); |
|
218 |
||
219 |
/** |
|
220 |
* Calculates the layout of the UI. |
|
221 |
* |
|
222 |
* @since Series 60 3.1 |
|
223 |
* @param aNode Starting point for the layout |
|
224 |
*/ |
|
225 |
IMPORT_C void LayoutUIL( CXnNodePluginIf* aNode = NULL ); |
|
226 |
||
227 |
/** |
|
228 |
* Gets the edit mode state from UI Engine. |
|
229 |
* |
|
230 |
* @since Series 60 5.0 |
|
231 |
* @return A state of edit mode. |
|
232 |
*/ |
|
233 |
IMPORT_C TInt EditMode(); |
|
234 |
||
235 |
/** |
|
236 |
* Gets widgets visibilty state |
|
237 |
* |
|
238 |
* @since Series 60 5.0 |
|
239 |
* @return ETrue if widgets visible, EFalse otherwise |
|
240 |
*/ |
|
241 |
IMPORT_C TBool WidgetsVisible() const; |
|
242 |
||
243 |
/** |
|
244 |
* Gets a plugin node which the given node is. |
|
245 |
* |
|
246 |
* @since Series 60 5.0 |
|
247 |
* @param aNode Node to start. |
|
248 |
* @return A Plugin node. |
|
249 |
*/ |
|
250 |
IMPORT_C CXnNodePluginIf& PluginNodeL( CXnNodePluginIf* aNode ); |
|
251 |
||
252 |
/** |
|
253 |
* Disables layoyt and redraw, places cleanup item to cleanup stack |
|
254 |
* for enabling layot and redraw |
|
255 |
* |
|
256 |
* @since Series 60 5.0 |
|
257 |
*/ |
|
258 |
IMPORT_C void DisableRenderUiLC(); |
|
35
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
259 |
|
34 | 260 |
/** |
261 |
* Checks if text editor is focused or partioal touch input open. |
|
262 |
* |
|
35
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
263 |
* @since S60 5.2 |
34 | 264 |
* @return TBool True if partial input is open or editor focused |
265 |
*/ |
|
266 |
IMPORT_C TBool IsTextEditorActive(); |
|
35
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
267 |
|
34 | 268 |
private: |
269 |
// Data |
|
270 |
||
271 |
/** |
|
272 |
* The layout calculation and ui rendering implementation. |
|
273 |
* Not own. |
|
274 |
*/ |
|
275 |
CXnUiEngine* iUiEngine; |
|
276 |
}; |
|
277 |
||
278 |
#endif |