author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 15 Sep 2010 12:00:00 +0300 | |
branch | RCL_3 |
changeset 93 | b01126ce0bec |
parent 88 | 3321d3e205b6 |
child 102 | ba63c83f4716 |
permissions | -rw-r--r-- |
83 | 1 |
/* |
2 |
* Copyright (c) 2008 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: Layout calculation and UI rendering mechanism implementations. |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
#ifndef _CXNUIENGINEIMPL_H |
|
20 |
#define _CXNUIENGINEIMPL_H |
|
21 |
||
22 |
// System includes |
|
23 |
||
24 |
// User includes |
|
25 |
#include "xnuistatelistener.h" |
|
26 |
#include "xnviewmanager.h" |
|
27 |
#include "xnmenu.h" |
|
28 |
||
29 |
// Forward declarations |
|
30 |
class CCoeControl; |
|
31 |
class CXnControlAdapter; |
|
32 |
class CXnNode; |
|
33 |
class CXnPointerArray; |
|
34 |
class CXnODT; |
|
35 |
class CGraphicsDevice; |
|
36 |
class CXnUiEngine; |
|
37 |
class CXnKeyEventDispatcher; |
|
38 |
class CXnEditor; |
|
39 |
class CXnResource; |
|
40 |
class CXnEditMode; |
|
41 |
class CXnViewManager; |
|
42 |
class CXnViewData; |
|
43 |
class CXnPluginData; |
|
93
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
88
diff
changeset
|
44 |
class TXnDirtyRegion; |
83 | 45 |
|
46 |
// Constants |
|
47 |
namespace XnLayoutPhase |
|
48 |
{ |
|
49 |
const TInt ENone = 0x00; |
|
50 |
const TInt ELayout = 0x01; |
|
51 |
const TInt EMeasure = 0x02; |
|
52 |
} |
|
53 |
||
54 |
namespace XnLayoutControl |
|
55 |
{ |
|
56 |
const TInt ELayoutUI = 0x01; |
|
57 |
const TInt ERenderUI = 0x02; |
|
58 |
const TInt ERefreshMenu = 0x04; |
|
59 |
const TInt EIgnoreState = 0x08; |
|
60 |
const TInt EViewDirty = 0x10; |
|
61 |
const TInt EEffectStarted = 0x20; |
|
62 |
} |
|
63 |
||
64 |
NONSHARABLE_STRUCT( TXnSplitScreenState ) |
|
65 |
{ |
|
66 |
/** Partial screen editor node. Not own */ |
|
67 |
CXnNode* iPartialScreenEditorNode; |
|
68 |
/** Is partial screen input open */ |
|
69 |
TBool iPartialScreenOpen; |
|
70 |
/** Partial screen block progression. Own. */ |
|
71 |
const TDesC8* iPartialScreenBlock; |
|
72 |
||
73 |
// ctor |
|
74 |
TXnSplitScreenState() : |
|
75 |
iPartialScreenEditorNode( NULL ), |
|
76 |
iPartialScreenOpen( EFalse ), |
|
77 |
iPartialScreenBlock( NULL ) {} |
|
78 |
}; |
|
79 |
||
80 |
||
81 |
// Class declaration |
|
82 |
||
83 |
/** |
|
84 |
* Layout calculation and UI rendering mechanism |
|
85 |
* implementations. |
|
86 |
* |
|
87 |
* @ingroup group_xnlayoutengine |
|
88 |
* @lib xn3layoutengine.lib |
|
89 |
* @since Series 60 3.1 |
|
90 |
*/ |
|
91 |
NONSHARABLE_CLASS( CXnUiEngineImpl ) : public CBase, |
|
92 |
public MXnViewObserver, |
|
93 |
public MXnUiResourceChangeObserver, |
|
94 |
public XnMenuInterface::MXnMenuObserver |
|
95 |
{ |
|
96 |
||
97 |
public: |
|
98 |
// Constructors and destructor |
|
99 |
||
100 |
/** |
|
101 |
* Two-phased constructor. |
|
102 |
* |
|
103 |
* @param aUiEngine Ui engine |
|
104 |
* @param aViewManager View manager |
|
105 |
*/ |
|
106 |
static CXnUiEngineImpl* NewL( CXnUiEngine& aUiEngine, |
|
107 |
CXnAppUiAdapter& aAdapter ); |
|
108 |
||
109 |
/** |
|
110 |
* 2nd phase constructor |
|
111 |
*/ |
|
112 |
void ConstructL(); |
|
113 |
||
114 |
/** |
|
115 |
* Destructor. |
|
116 |
*/ |
|
117 |
virtual ~CXnUiEngineImpl(); |
|
118 |
||
119 |
public: |
|
120 |
// New functions |
|
121 |
||
122 |
/** |
|
123 |
* Gets AppUi |
|
124 |
* |
|
125 |
* @since S60 5.0 |
|
126 |
* @return AppUi |
|
127 |
*/ |
|
128 |
CXnAppUiAdapter& AppUiAdapter() const; |
|
129 |
||
130 |
/** |
|
131 |
* Lays out the UI |
|
132 |
* |
|
133 |
* @since Series 60 3.1 |
|
134 |
* @param aNode Starting point of the layout |
|
135 |
*/ |
|
136 |
void LayoutUIL( CXnNode* aNode = NULL ); |
|
137 |
||
138 |
/** |
|
139 |
* Creates UI implementations for the UI, adjusts control coordinates |
|
140 |
* according to the layout |
|
141 |
* |
|
142 |
* @since Series 60 3.1 |
|
143 |
* @param aNode Starting point |
|
144 |
*/ |
|
145 |
void RenderUIL( CXnNode* aNode = NULL ); |
|
146 |
||
147 |
/** |
|
148 |
* Gets the root node of the UI |
|
149 |
* |
|
150 |
* @since Series 60 3.1 |
|
151 |
* @return Root node |
|
152 |
*/ |
|
153 |
CXnNode* RootNode(); |
|
154 |
||
155 |
/** |
|
156 |
* Gets the ODT |
|
157 |
* |
|
158 |
* @since Series 60 3.1 |
|
159 |
* @return ODT |
|
160 |
*/ |
|
161 |
CXnODT* ODT(); |
|
162 |
||
163 |
/** |
|
164 |
* Finds a node by id |
|
165 |
* |
|
166 |
* @since Series 60 3.1 |
|
167 |
* @param aNode Node id |
|
168 |
* @param aNamespace Namespace |
|
169 |
* @return Node with given id |
|
170 |
*/ |
|
171 |
CXnNode* FindNodeByIdL( const TDesC& aNodeId, |
|
172 |
const TDesC& aNamespace = KNullDesC ); |
|
173 |
/** |
|
174 |
* Finds a node by id, b-bit version |
|
175 |
* |
|
176 |
* @since Series 60 3.1 |
|
177 |
* @param aNode Node id |
|
178 |
* @param aNamespace Namespace |
|
179 |
* @return Node with given id |
|
180 |
*/ |
|
181 |
CXnNode* FindNodeByIdL( const TDesC8& aNodeId, |
|
182 |
const TDesC8& aNamespace = KNullDesC8 ); |
|
183 |
/** |
|
184 |
* Finds nodes by class |
|
185 |
* |
|
186 |
* @since Series 60 3.1 |
|
187 |
* @param aClassId Class id |
|
188 |
* @return Nodes with given class id |
|
189 |
*/ |
|
190 |
CXnPointerArray* FindNodeByClassL( const TDesC& aClassId, |
|
191 |
const TDesC& aNamespace = KNullDesC ); |
|
192 |
||
193 |
/** |
|
194 |
* Finds nodes by class |
|
195 |
* |
|
196 |
* @since Series 60 3.1 |
|
197 |
* @param aClassId Class id |
|
198 |
* @return Nodes with given class id |
|
199 |
*/ |
|
200 |
CXnPointerArray* FindNodeByClassL( const TDesC8& aClassId, |
|
201 |
const TDesC8& aNamespace = KNullDesC8 ); |
|
202 |
||
203 |
/** |
|
204 |
* Find content source nodes from namespace. Ownership is not transferred. |
|
205 |
* |
|
206 |
* @since S60 5.2 |
|
207 |
* @param aNamespace Namespace |
|
208 |
* @return Content source nodes from namespace |
|
209 |
*/ |
|
210 |
CXnPointerArray* CXnUiEngineImpl::FindContentSourceNodesL( |
|
211 |
const TDesC8& aNamespace ); |
|
212 |
||
213 |
/** |
|
214 |
* Gets resources of the UI |
|
215 |
* |
|
216 |
* @since Series 60 3.1 |
|
217 |
* @return List of resources |
|
218 |
*/ |
|
219 |
CArrayPtrSeg< CXnResource >& Resources(); |
|
220 |
||
221 |
/** |
|
222 |
* Sets currently focused node |
|
223 |
* |
|
224 |
* @since Series 60 3.1 |
|
225 |
* @param aFocusedNode Currently focused node |
|
226 |
* @param aSource A source of event that triggered focus change. |
|
227 |
*/ |
|
228 |
void SetFocusedNodeL( CXnNode* aFocusedNode, TInt aSource = 0 ); |
|
229 |
||
230 |
/** |
|
231 |
* Get currently focused node |
|
232 |
* |
|
233 |
* @since Series 60 3.1 |
|
234 |
* @return Focused node. |
|
235 |
*/ |
|
236 |
CXnNode* FocusedNode(); |
|
237 |
||
238 |
/** |
|
239 |
* Checks if the UI is in Edit mode. |
|
240 |
* |
|
241 |
* @since Series 60 5.0 |
|
242 |
* @return ETrue if the current mode is edit, otherwise EFalse. |
|
243 |
*/ |
|
244 |
TBool IsEditMode(); |
|
245 |
||
246 |
/** |
|
247 |
* Get a numeric value of a property in vertical pixels |
|
248 |
* |
|
249 |
* @since Series 60 3.1 |
|
250 |
* @param aValue Property |
|
251 |
* @param aReferenceValue Value used for percentage calculation |
|
252 |
* @return Value in vertical pixels |
|
253 |
*/ |
|
254 |
TInt VerticalPixelValueL( CXnProperty* aValue, TInt aReferenceValue ); |
|
255 |
||
256 |
/** |
|
257 |
* Get a numeric value of a property in horizontal pixels |
|
258 |
* |
|
259 |
* @since Series 60 3.1 |
|
260 |
* @param aValue Property |
|
261 |
* @param aReferenceValue Value used for percentage calculation |
|
262 |
* @return Value in horizontal pixels |
|
263 |
*/ |
|
264 |
TInt HorizontalPixelValueL( CXnProperty* aValue, TInt aReferenceValue ); |
|
265 |
||
266 |
/** |
|
267 |
* Get a numeric value of a property in vertical twips |
|
268 |
* |
|
269 |
* @since Series 60 3.1 |
|
270 |
* @param aValue Property |
|
271 |
* @param aReferenceValue Value used for percentage calculation |
|
272 |
* @return Value in vertical twips |
|
273 |
*/ |
|
274 |
TInt VerticalTwipValueL( CXnProperty* aValue, TInt aReferenceValue ); |
|
275 |
||
276 |
/** |
|
277 |
* Get a numeric value of a property in horizontal twips |
|
278 |
* |
|
279 |
* @since Series 60 3.1 |
|
280 |
* @param aValue Property |
|
281 |
* @param aReferenceValue Value used for percentage calculation |
|
282 |
* @return Value in horizontal pixels |
|
283 |
*/ |
|
284 |
TInt HorizontalTwipValueL( CXnProperty* aValue, TInt aReferenceValue ); |
|
285 |
||
286 |
/** |
|
287 |
* Refresh current menu |
|
288 |
* |
|
289 |
* @since Series 60 3.1 |
|
290 |
*/ |
|
291 |
void RefreshMenuL(); |
|
93
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
88
diff
changeset
|
292 |
void RefreshMenuL( TXnDirtyRegion* aDirtyRegion ); |
83 | 293 |
|
294 |
/** |
|
295 |
* Returns view manager |
|
296 |
* |
|
297 |
* @since S60 5.0 |
|
298 |
* @return view manager |
|
299 |
*/ |
|
300 |
CXnViewManager* ViewManager(); |
|
301 |
||
302 |
/** |
|
303 |
* Returns the active view |
|
304 |
||
305 |
* @since Series 60 3.1 |
|
306 |
* @return Active view node |
|
307 |
*/ |
|
308 |
CXnNode* ActiveView(); |
|
309 |
||
310 |
/** |
|
311 |
* Add a dirty node. LayoutUiL and RenderUiL will only perform operations |
|
312 |
* on the set of dirty nodes. |
|
313 |
* |
|
314 |
* @since Series 60 3.1 |
|
315 |
* @param aNode Dirty node. |
|
316 |
* @param aLayoutPhaseHint, a hint where to start next layout phase |
|
317 |
*/ |
|
318 |
void AddDirtyNodeL( CXnNode* aNode, TInt aLevel ); |
|
319 |
||
320 |
/** |
|
321 |
* Get the size of the current screen device |
|
322 |
* |
|
323 |
* @since Series 60 3.1 |
|
324 |
* @return Size of the current screen device |
|
325 |
*/ |
|
326 |
TSize ScreenDeviceSize() const; |
|
327 |
||
328 |
/** |
|
329 |
* Checks whether the dialog is displaying. |
|
330 |
* |
|
331 |
* @since Series 60 3.1 |
|
332 |
* @return ETrue if dialog is displaying. |
|
333 |
*/ |
|
334 |
TBool IsDialogDisplaying(); |
|
335 |
||
336 |
/** |
|
337 |
* Handles a change to the control's resources of type aType |
|
338 |
* |
|
339 |
* @since Series 60 3.1 |
|
340 |
* @param aType Changed resource type |
|
341 |
*/ |
|
342 |
void HandleResourceChangeL( TInt aType ); |
|
343 |
||
344 |
/** |
|
345 |
* Checks whether the menu is displaying. |
|
346 |
* |
|
347 |
* @since Series 60 3.1 |
|
348 |
* @return ETrue if menu is displaying. |
|
349 |
*/ |
|
350 |
TBool IsMenuDisplaying(); |
|
351 |
||
352 |
/** |
|
353 |
* Returns menubar node |
|
354 |
* |
|
355 |
* @since Series 60 3.2 |
|
356 |
* @return Menubar node |
|
357 |
*/ |
|
358 |
CXnNode* MenuBarNode() const; |
|
359 |
||
360 |
/** |
|
361 |
* Returns stylus popup node |
|
362 |
* |
|
363 |
* @since S60 60 5.0 |
|
364 |
* @return stylus popup node |
|
365 |
*/ |
|
366 |
CXnNode* StylusPopupNode() const; |
|
367 |
||
368 |
/** |
|
369 |
* Set node as passive, and add it to the passive focused node array. |
|
370 |
* |
|
371 |
* @since Series 60 3.2 |
|
372 |
* @param aNode Node to use. |
|
373 |
*/ |
|
374 |
void AddPassiveFocusedNodeL( CXnNode* aNode ); |
|
375 |
||
376 |
/** |
|
377 |
* Unset the passive focus from the node, and remove it from the passive |
|
378 |
* focused node array. |
|
379 |
* |
|
380 |
* @since Series 60 3.2 |
|
381 |
* @param aNode Node to use. |
|
382 |
*/ |
|
383 |
void RemovePassiveFocusedNodeL( CXnNode* aNode ); |
|
384 |
||
385 |
/** |
|
386 |
* Clear the passive focused node array, and unset the passive focus |
|
387 |
* states. |
|
388 |
* |
|
389 |
* @since Series 60 3.2 |
|
390 |
*/ |
|
391 |
void ClearPassiveFocusedNodesL(); |
|
392 |
||
393 |
/** |
|
394 |
* Sets node's dropped state |
|
395 |
* |
|
396 |
* @since Series 60 3.2 |
|
397 |
* @param aNode Node |
|
398 |
* @param aDropped Dropped |
|
399 |
*/ |
|
400 |
void SetNodeDroppedL( CXnNode& aNode, TInt aDropped ) const; |
|
401 |
||
402 |
/** |
|
403 |
* Checks if node is adaptive, but doesn't have any content |
|
404 |
* |
|
405 |
* @since Series 60 3.2 |
|
406 |
* @param aNode node |
|
407 |
* @param aAvailableSize size to be checked |
|
408 |
*/ |
|
409 |
void CheckAdaptiveContentL( CXnNode& aNode, TSize aAvailableSize ) const; |
|
410 |
||
411 |
/** |
|
412 |
* Adds a node which can be focused |
|
413 |
* |
|
414 |
* @since Series 60 3.2 |
|
415 |
* @param aNode Node |
|
416 |
*/ |
|
417 |
void AddFocusCandidateL( CXnNode* aNode ); |
|
418 |
||
419 |
/** |
|
420 |
* Sets client rect |
|
421 |
* |
|
422 |
* @since Series 60 3.2 |
|
423 |
* @param aRect area to be set |
|
424 |
* @param aDrawNow Call rendering routines if ETrue |
|
425 |
*/ |
|
426 |
void SetClientRectL( TRect aRect, TBool aDrawNow = ETrue ); |
|
427 |
||
428 |
/** |
|
429 |
* Fetch editor to operate on AI3 widgets. |
|
430 |
* |
|
431 |
* @since Series 60 5.0 |
|
432 |
* @return Pointer to Editor |
|
433 |
*/ |
|
434 |
CXnEditor* Editor() const; |
|
435 |
||
436 |
/** |
|
437 |
* Gets client rect |
|
438 |
* |
|
439 |
* @since Series 60 3.2 |
|
440 |
* @return client rect |
|
441 |
*/ |
|
442 |
TRect ClientRect() const; |
|
443 |
||
444 |
/** |
|
445 |
* Gets pointer to edit mode storage. |
|
446 |
* |
|
447 |
* @since Series 60 5.0 |
|
448 |
* @return edit mode storage |
|
449 |
*/ |
|
450 |
CXnEditMode* EditMode(); |
|
451 |
||
452 |
/** |
|
453 |
* Get current view plugins nodes. |
|
454 |
* |
|
455 |
* @since Series 60 5.0 |
|
456 |
* @return Pointer to plugin node array |
|
457 |
*/ |
|
458 |
RPointerArray< CXnNode >* Plugins(); |
|
459 |
||
460 |
/** |
|
461 |
* Gets theme resource file |
|
462 |
* |
|
463 |
* @since S60 5.1 |
|
464 |
* @param aPath path from which file is found |
|
465 |
* @param aFile file to which resource is set |
|
466 |
* @return errorcode |
|
467 |
*/ |
|
468 |
TInt GetThemeResource( const TDesC& aPath, RFile& aFile ); |
|
469 |
||
470 |
/** |
|
471 |
* Analyse added widget |
|
472 |
* |
|
473 |
* @since S60 5.1 |
|
474 |
* @param aNode Widget to be analyzed |
|
475 |
* @return ETrue if fits, EFalse otherwise |
|
476 |
*/ |
|
477 |
TBool AnalyseAddedWidgetL( CXnNode& aNode ); |
|
478 |
||
479 |
/** |
|
480 |
* Disables layoyt and redraw, places cleanup item to cleanup stack |
|
481 |
* for enabling layot and redraw |
|
482 |
* |
|
483 |
* @since Series 60 5.0 |
|
484 |
*/ |
|
485 |
void DisableRenderUiLC(); |
|
486 |
||
487 |
/** |
|
488 |
* Set event dispatcher |
|
489 |
* |
|
490 |
* @since Series 60 5.0 |
|
491 |
* @param aDispather Event dispatcher |
|
492 |
*/ |
|
493 |
void SetEventDispatcher( CXnKeyEventDispatcher* aDispatcher ); |
|
494 |
||
495 |
/** |
|
496 |
* Enables partial touch input |
|
497 |
* |
|
498 |
* @since Series 60 5.2 |
|
88
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
499 |
* @param aNode Editor Node, can be NULL when disabling partial input |
83 | 500 |
* @param TBool Partial input is enabled |
501 |
*/ |
|
88
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
502 |
void EnablePartialTouchInput( CXnNode* aNode, TBool aEnable ); |
83 | 503 |
|
504 |
/** |
|
505 |
* Is partial input active |
|
506 |
* |
|
507 |
* @since Series 60 5.2 |
|
508 |
* @return TBool is partial input active |
|
509 |
*/ |
|
510 |
TBool IsPartialInputActive(); |
|
511 |
||
512 |
/** |
|
513 |
* Checks if text editor is focused or partioal touch input open. |
|
514 |
* |
|
515 |
* @since Series 60 5.2 |
|
516 |
* @return TBool True if partial input is open or editor focused |
|
517 |
*/ |
|
518 |
TBool IsTextEditorActive(); |
|
519 |
||
520 |
private: |
|
521 |
||
522 |
IMPORT_C static void EnableRenderUi( TAny* aAny ); |
|
93
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
88
diff
changeset
|
523 |
|
83 | 524 |
private: |
525 |
// constructors |
|
526 |
||
527 |
/** |
|
528 |
* C++ default constructor. |
|
529 |
*/ |
|
530 |
CXnUiEngineImpl( CXnUiEngine& aUiEngine, CXnAppUiAdapter& aAdapter ); |
|
531 |
||
532 |
private: |
|
533 |
// new functions |
|
93
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
88
diff
changeset
|
534 |
|
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
88
diff
changeset
|
535 |
/** |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
88
diff
changeset
|
536 |
* Lays out the UI |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
88
diff
changeset
|
537 |
*/ |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
88
diff
changeset
|
538 |
void LayoutL( TXnDirtyRegion& aRegion ); |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
88
diff
changeset
|
539 |
void RenderL( TXnDirtyRegion& aRegion ); |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
88
diff
changeset
|
540 |
|
83 | 541 |
/** |
542 |
* Prepares to the layout algorithm run |
|
543 |
* |
|
544 |
* @since Series 60 3.2 |
|
545 |
*/ |
|
93
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
88
diff
changeset
|
546 |
void PrepareRunLayoutL( TXnDirtyRegion& aDirtyRegion ); |
83 | 547 |
|
548 |
/** |
|
549 |
* Runs the layout algorithm |
|
550 |
* |
|
551 |
* @since Series 60 3.2 |
|
552 |
*/ |
|
93
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
88
diff
changeset
|
553 |
TInt RunLayoutL( TXnDirtyRegion& aDirtyRegion, CXnNode& aNode ); |
83 | 554 |
|
555 |
/** |
|
556 |
* Checks if layout is currently disabled |
|
557 |
* |
|
558 |
* @since Series 60 3.2 |
|
559 |
*/ |
|
93
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
88
diff
changeset
|
560 |
TBool IsLayoutDisabled( TXnDirtyRegion& aDirtyRegion ); |
83 | 561 |
|
93
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
88
diff
changeset
|
562 |
void AddToRedrawListL( TXnDirtyRegion& aRegion, CXnNode& aNode, |
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
88
diff
changeset
|
563 |
TRect aRect = TRect::EUninitialized ); |
83 | 564 |
|
93
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
88
diff
changeset
|
565 |
void AddToDirtyListL( TXnDirtyRegion& aRegion, CXnNode& aNode ); |
83 | 566 |
|
567 |
/** |
|
568 |
* Finds a node where to start layout |
|
569 |
* |
|
570 |
* @since Series 60 5.0 |
|
571 |
*/ |
|
93
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
88
diff
changeset
|
572 |
CXnNode* StartLayoutFromL( TXnDirtyRegion& aDirtyRegion ); |
83 | 573 |
|
574 |
void ForceRenderUIL( TBool aLayoutOnly = EFalse ); |
|
575 |
||
93
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
88
diff
changeset
|
576 |
CXnNode* WindowOwningNode( CXnNode& aNode ); |
83 | 577 |
|
578 |
TXnDirtyRegion* FindDirtyRegionL( CXnNode& aNode ); |
|
579 |
||
93
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
88
diff
changeset
|
580 |
void ReportScreenDeviceChangeL(); |
83 | 581 |
|
93
b01126ce0bec
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
88
diff
changeset
|
582 |
void EnableRenderUiL(); |
83 | 583 |
|
584 |
/** |
|
585 |
* Handle partial touch input |
|
586 |
* |
|
587 |
* @since Series 60 5.2 |
|
588 |
* @param TInt aType |
|
589 |
*/ |
|
88
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
590 |
void HandlePartialTouchInputL( CXnNode* aNode, TBool aEnable ); |
83 | 591 |
|
592 |
/** |
|
593 |
* Set node visible |
|
594 |
* |
|
595 |
* @since Series 60 5.2 |
|
596 |
* @param aNode node to hide/show |
|
597 |
* @param TBool aVisible boolean to set node visible |
|
598 |
*/ |
|
599 |
void SetNodeVisibleL( CXnNode* aNode, TBool aVisible ); |
|
600 |
||
601 |
/** |
|
602 |
* Set partial screen block |
|
603 |
* |
|
604 |
* @since Series 60 5.2 |
|
605 |
* @param CXnNode aParent parent node |
|
606 |
* @param TDesC8 aBlockProgression set layout direction |
|
607 |
*/ |
|
608 |
void SetPartialScreenBlockProgressionL( |
|
609 |
CXnNode* aParent, const TDesC8& aBlockProgression ); |
|
610 |
||
611 |
/** |
|
612 |
* Handles skin change resource change |
|
613 |
* |
|
614 |
* @since Series 60 5.2 |
|
615 |
*/ |
|
616 |
void HandleSkinChangeL(); |
|
617 |
||
618 |
/** |
|
619 |
* Handles KEikDynamicLayoutVariantSwitch resource change |
|
620 |
* |
|
621 |
* @since Series 60 5.2 |
|
622 |
*/ |
|
623 |
void HandleDynamicLayoutVariantSwitchL(); |
|
624 |
||
625 |
private: |
|
626 |
//Derived functions |
|
627 |
||
628 |
/** |
|
629 |
* from MXnViewObserver |
|
630 |
*/ |
|
631 |
void NotifyViewActivatedL( const CXnViewData& aViewData ); |
|
632 |
||
633 |
/** |
|
88
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
634 |
* from MXnViewObserver |
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
635 |
*/ |
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
636 |
void NotifyViewLoadedL( const CXnViewData& aViewData ); |
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
637 |
|
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
638 |
/** |
83 | 639 |
* from MXnViewObserver |
640 |
*/ |
|
641 |
void NotifyViewDeactivatedL( const CXnViewData& /*aViewData*/ ); |
|
642 |
||
643 |
/** |
|
644 |
* from MXnViewObserver |
|
645 |
*/ |
|
646 |
void NotifyConfigureWidgetL( const CHsContentInfo& /*aContentInfo*/, |
|
647 |
CXnPluginData& /*aPluginData*/ ); |
|
648 |
||
649 |
/** |
|
650 |
* from MXnViewObserver |
|
651 |
*/ |
|
652 |
void NotifyWidgetAdditionL( const CXnPluginData& aPluginData ); |
|
653 |
||
654 |
/** |
|
655 |
* from MXnViewObserver |
|
656 |
*/ |
|
657 |
void NotifyWidgetRemovalL( const CXnPluginData& /*aPluginData*/ ); |
|
658 |
||
659 |
/** |
|
660 |
* from MXnViewObserver |
|
661 |
*/ |
|
88
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
662 |
void NotifyViewAdditionL( const CXnViewData& aViewData ); |
83 | 663 |
|
664 |
/** |
|
665 |
* from MXnViewObserver |
|
666 |
*/ |
|
88
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
83
diff
changeset
|
667 |
void NotifyViewRemovalL( const CXnViewData& /*aViewData*/ ){}; |
83 | 668 |
|
669 |
/** |
|
670 |
* from MXnViewObserver |
|
671 |
*/ |
|
672 |
void NotifyAllViewsLoadedL(){}; |
|
673 |
||
674 |
/** |
|
675 |
* from MXnViewObserver |
|
676 |
*/ |
|
677 |
void NotifyContainerActivatedL( const CXnViewData& /*aViewData*/ ){}; |
|
678 |
||
679 |
private: |
|
680 |
// from MXnMenuObserver |
|
681 |
||
682 |
TBool DynInitMenuItemL( CXnNodeAppIf& aMenuItem, CXnNodeAppIf* aPlugin = NULL ); |
|
683 |
||
684 |
private: |
|
685 |
// from MXnPropertyChangeObserver |
|
686 |
||
687 |
/** |
|
688 |
* Property changed |
|
689 |
* |
|
690 |
* @since S60 5.1 |
|
691 |
* @param aKey key value |
|
692 |
* @param aValue property value |
|
693 |
*/ |
|
694 |
void PropertyChangedL( const TUint32 aKey, const TInt aValue ); |
|
695 |
||
696 |
private: |
|
697 |
// from MXnUiResourceChangeObserver |
|
698 |
||
699 |
/** |
|
700 |
* @see MXnUiResourceChangeObserver |
|
701 |
*/ |
|
702 |
void NotifyStatusPaneSizeChanged(); |
|
703 |
||
704 |
/** |
|
705 |
* @see MXnUiResourceChangeObserver |
|
706 |
*/ |
|
707 |
void NotifyResourceChanged( TInt aType ); |
|
708 |
||
709 |
private: |
|
710 |
// Data |
|
711 |
||
712 |
/** Current screen device, Owned */ |
|
713 |
CGraphicsDevice* iCurrentGraphicsDevice; |
|
714 |
/** UI engine - received from constructor's input parameters, Not owned */ |
|
715 |
CXnUiEngine* iUiEngine; |
|
716 |
/** AppUi, Not owned */ |
|
717 |
CXnAppUiAdapter& iAppUiAdapter; |
|
718 |
/** Not owned. View manager */ |
|
719 |
CXnViewManager& iViewManager; |
|
720 |
/** Key event dispatcher, Not owned */ |
|
721 |
CXnKeyEventDispatcher* iKeyEventDispatcher; |
|
722 |
/** ControlAdapters, not owned */ |
|
723 |
const RPointerArray< CXnControlAdapter >* iControlAdapterList; |
|
724 |
/** Array of nodes which can be focused */ |
|
725 |
RPointerArray< CXnNode > iFocusCandidateList; |
|
726 |
/** current view */ |
|
727 |
CXnNode* iCurrentView; |
|
728 |
/** current view control adapter, not owned */ |
|
729 |
CXnControlAdapter* iCurrentViewControlAdapter; |
|
730 |
/** Layout algo phase */ |
|
731 |
TInt iLayoutPhase; |
|
732 |
/** Unit in pixels (width). */ |
|
733 |
TReal iHorizontalUnitInPixels; |
|
734 |
/** Unit in pixels (height). */ |
|
735 |
TReal iVerticalUnitInPixels; |
|
736 |
/** Cached menu node */ |
|
737 |
CXnNode* iMenuNode; |
|
738 |
/** Cached styluspopup node */ |
|
739 |
CXnNode* iStylusPopupNode; |
|
740 |
/** Drawing area */ |
|
741 |
TRect iClientRect; |
|
742 |
/** Owned. Edit mode storage; */ |
|
743 |
CXnEditMode* iEditMode; |
|
744 |
/** Disable count */ |
|
745 |
TInt iDisableCount; |
|
746 |
/**Split screen states*/ |
|
747 |
TXnSplitScreenState iSplitScreenState; |
|
748 |
}; |
|
749 |
||
750 |
#endif // _CXNUIENGINEIMPL_H |