83
|
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: Node of the layout tree
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
// INCLUDES
|
|
19 |
#include "xnnode.h"
|
|
20 |
#include "xnnodepluginif.h"
|
|
21 |
#include "xnnodeappif.h"
|
|
22 |
#include "xnnodeimpl.h"
|
|
23 |
#include "xnviewsnodeimpl.h"
|
|
24 |
#include "xnviewnodeimpl.h"
|
|
25 |
#include "xncomponentnodeimpl.h"
|
|
26 |
#include "xnproperty.h"
|
|
27 |
#include "xntype.h"
|
|
28 |
#include "xncomponent.h"
|
|
29 |
#include "xnscrollablecontroladapter.h"
|
|
30 |
|
|
31 |
_LIT8( KView, "view" );
|
|
32 |
|
|
33 |
// ============================ MEMBER FUNCTIONS ===============================
|
|
34 |
|
|
35 |
// -----------------------------------------------------------------------------
|
|
36 |
// CXnNode::NewL()
|
|
37 |
// Two-phased constructor.
|
|
38 |
// -----------------------------------------------------------------------------
|
|
39 |
//
|
|
40 |
CXnNode* CXnNode::NewL()
|
|
41 |
{
|
|
42 |
CXnNode* self = new ( ELeave ) CXnNode;
|
|
43 |
|
|
44 |
CleanupStack::PushL( self );
|
|
45 |
self->ConstructL();
|
|
46 |
CleanupStack::Pop();
|
|
47 |
|
|
48 |
return self;
|
|
49 |
}
|
|
50 |
|
|
51 |
// -----------------------------------------------------------------------------
|
|
52 |
// CXnNode::ConstructL()
|
|
53 |
// Symbian 2nd phase constructor can leave.
|
|
54 |
// -----------------------------------------------------------------------------
|
|
55 |
//
|
|
56 |
void CXnNode::ConstructL()
|
|
57 |
{
|
|
58 |
}
|
|
59 |
|
|
60 |
// -----------------------------------------------------------------------------
|
|
61 |
// CXnNode::CXnNode()
|
|
62 |
// C++ default constructor can NOT contain any code, that
|
|
63 |
// might leave.
|
|
64 |
// -----------------------------------------------------------------------------
|
|
65 |
//
|
|
66 |
CXnNode::CXnNode()
|
|
67 |
{
|
|
68 |
}
|
|
69 |
|
|
70 |
// -----------------------------------------------------------------------------
|
|
71 |
// CXnNode::~CXnNode()
|
|
72 |
// C++ default destructor.
|
|
73 |
// -----------------------------------------------------------------------------
|
|
74 |
//
|
|
75 |
CXnNode::~CXnNode()
|
|
76 |
{
|
|
77 |
delete iImpl;
|
|
78 |
delete iPluginIf;
|
|
79 |
delete iAppIf;
|
|
80 |
}
|
|
81 |
|
|
82 |
// -----------------------------------------------------------------------------
|
|
83 |
// CXnNode::Impl
|
|
84 |
// -----------------------------------------------------------------------------
|
|
85 |
//
|
|
86 |
CXnNodeImpl* CXnNode::Impl()
|
|
87 |
{
|
|
88 |
return iImpl;
|
|
89 |
}
|
|
90 |
|
|
91 |
// -----------------------------------------------------------------------------
|
|
92 |
// CXnNode::RootNodeImpl
|
|
93 |
// -----------------------------------------------------------------------------
|
|
94 |
//
|
|
95 |
CXnNodeImpl* CXnNode::RootNodeImpl()
|
|
96 |
{
|
|
97 |
return iRootNodeImpl;
|
|
98 |
}
|
|
99 |
|
|
100 |
// -----------------------------------------------------------------------------
|
|
101 |
// CXnNode::ViewNodeImpl
|
|
102 |
// -----------------------------------------------------------------------------
|
|
103 |
//
|
|
104 |
CXnViewNodeImpl* CXnNode::ViewNodeImpl()
|
|
105 |
{
|
|
106 |
return iViewNodeImpl;
|
|
107 |
}
|
|
108 |
|
|
109 |
// -----------------------------------------------------------------------------
|
|
110 |
// CXnNode::ComponentNodeImpl
|
|
111 |
// -----------------------------------------------------------------------------
|
|
112 |
//
|
|
113 |
CXnComponentNodeImpl* CXnNode::ComponentNodeImpl()
|
|
114 |
{
|
|
115 |
return iComponentNodeImpl;
|
|
116 |
}
|
|
117 |
|
|
118 |
// -----------------------------------------------------------------------------
|
|
119 |
// CXnNode::SetImpl
|
|
120 |
// -----------------------------------------------------------------------------
|
|
121 |
//
|
|
122 |
void CXnNode::SetImpl( CXnNodeImpl* aImpl )
|
|
123 |
{
|
|
124 |
if ( aImpl )
|
|
125 |
{
|
|
126 |
delete iImpl;
|
|
127 |
iImpl = aImpl;
|
|
128 |
iImpl->SetNode( *this );
|
|
129 |
}
|
|
130 |
}
|
|
131 |
|
|
132 |
// -----------------------------------------------------------------------------
|
|
133 |
// CXnNode::SetRootNodeImpl
|
|
134 |
// -----------------------------------------------------------------------------
|
|
135 |
//
|
|
136 |
void CXnNode::SetRootNodeImpl( CXnNodeImpl* aRootNodeImpl )
|
|
137 |
{
|
|
138 |
if ( aRootNodeImpl )
|
|
139 |
{
|
|
140 |
delete iImpl;
|
|
141 |
iRootNodeImpl = aRootNodeImpl;
|
|
142 |
iImpl = iRootNodeImpl;
|
|
143 |
iImpl->SetNode( *this );
|
|
144 |
}
|
|
145 |
}
|
|
146 |
|
|
147 |
// -----------------------------------------------------------------------------
|
|
148 |
// CXnNode::SetViewsNodeImpl
|
|
149 |
// -----------------------------------------------------------------------------
|
|
150 |
//
|
|
151 |
void CXnNode::SetViewsNodeImpl( CXnViewsNodeImpl* aViewsNodeImpl )
|
|
152 |
{
|
|
153 |
if ( aViewsNodeImpl )
|
|
154 |
{
|
|
155 |
delete iImpl;
|
|
156 |
iViewsNodeImpl = aViewsNodeImpl;
|
|
157 |
iImpl = iViewsNodeImpl;
|
|
158 |
iImpl->SetNode( *this );
|
|
159 |
}
|
|
160 |
}
|
|
161 |
|
|
162 |
// -----------------------------------------------------------------------------
|
|
163 |
// CXnNode::SetViewNodeImpl
|
|
164 |
// -----------------------------------------------------------------------------
|
|
165 |
//
|
|
166 |
void CXnNode::SetViewNodeImpl( CXnViewNodeImpl* aViewNodeImpl )
|
|
167 |
{
|
|
168 |
if ( aViewNodeImpl )
|
|
169 |
{
|
|
170 |
delete iImpl;
|
|
171 |
iViewNodeImpl = aViewNodeImpl;
|
|
172 |
iImpl = iViewNodeImpl;
|
|
173 |
iImpl->SetNode( *this );
|
|
174 |
}
|
|
175 |
}
|
|
176 |
|
|
177 |
// -----------------------------------------------------------------------------
|
|
178 |
// CXnNode::SetComponentNodeImpl
|
|
179 |
// -----------------------------------------------------------------------------
|
|
180 |
//
|
|
181 |
void CXnNode::SetComponentNodeImpl( CXnComponentNodeImpl* aComponentNodeImpl )
|
|
182 |
{
|
|
183 |
if ( aComponentNodeImpl )
|
|
184 |
{
|
|
185 |
delete iImpl;
|
|
186 |
iComponentNodeImpl = aComponentNodeImpl;
|
|
187 |
iImpl = iComponentNodeImpl;
|
|
188 |
iImpl->SetNode( *this );
|
|
189 |
}
|
|
190 |
}
|
|
191 |
|
|
192 |
// -----------------------------------------------------------------------------
|
|
193 |
// CXnNode::SetDropped
|
|
194 |
// -----------------------------------------------------------------------------
|
|
195 |
//
|
|
196 |
void CXnNode::SetDropped( const TInt aDropped )
|
|
197 |
{
|
|
198 |
iImpl->SetDropped( aDropped );
|
|
199 |
}
|
|
200 |
|
|
201 |
// -----------------------------------------------------------------------------
|
|
202 |
// CXnNode::IsDropped
|
|
203 |
// -----------------------------------------------------------------------------
|
|
204 |
//
|
|
205 |
TInt CXnNode::IsDropped() const
|
|
206 |
{
|
|
207 |
return iImpl->IsDropped();
|
|
208 |
}
|
|
209 |
|
|
210 |
// -----------------------------------------------------------------------------
|
|
211 |
// CXnNode::Type()
|
|
212 |
// Returns control type.
|
|
213 |
// -----------------------------------------------------------------------------
|
|
214 |
//
|
|
215 |
CXnType* CXnNode::Type()
|
|
216 |
{
|
|
217 |
return iImpl->Type();
|
|
218 |
}
|
|
219 |
|
|
220 |
// -----------------------------------------------------------------------------
|
|
221 |
// CXnNode::Parent
|
|
222 |
// Get component parent
|
|
223 |
// -----------------------------------------------------------------------------
|
|
224 |
//
|
|
225 |
CXnNode* CXnNode::Parent() const
|
|
226 |
{
|
|
227 |
return iImpl->Parent();
|
|
228 |
}
|
|
229 |
|
|
230 |
// -----------------------------------------------------------------------------
|
|
231 |
// CXnNode::SetParent
|
|
232 |
// Set component parent
|
|
233 |
// -----------------------------------------------------------------------------
|
|
234 |
//
|
|
235 |
void CXnNode::SetParent( CXnNode& aParent )
|
|
236 |
{
|
|
237 |
iImpl->SetParent( aParent );
|
|
238 |
}
|
|
239 |
|
|
240 |
// -----------------------------------------------------------------------------
|
|
241 |
// CXnNode::AddChildL
|
|
242 |
// Adds a child to this container.
|
|
243 |
// -----------------------------------------------------------------------------
|
|
244 |
//
|
|
245 |
void CXnNode::AddChildL( CXnNode* aChild )
|
|
246 |
{
|
|
247 |
if ( aChild )
|
|
248 |
{
|
|
249 |
iImpl->AddChildL( aChild );
|
|
250 |
}
|
|
251 |
}
|
|
252 |
|
|
253 |
// -----------------------------------------------------------------------------
|
|
254 |
// CXnNode::Children
|
|
255 |
// -----------------------------------------------------------------------------
|
|
256 |
//
|
|
257 |
RPointerArray< CXnNode >& CXnNode::Children()
|
|
258 |
{
|
|
259 |
return iImpl->Children();
|
|
260 |
}
|
|
261 |
|
|
262 |
// -----------------------------------------------------------------------------
|
|
263 |
// CXnNode::SetPCDataL
|
|
264 |
// -----------------------------------------------------------------------------
|
|
265 |
void CXnNode::SetPCDataL( const TDesC8& aData )
|
|
266 |
{
|
|
267 |
iImpl->SetPCDataL( aData );
|
|
268 |
}
|
|
269 |
|
|
270 |
// -----------------------------------------------------------------------------
|
|
271 |
// CXnNode::GetPCData
|
|
272 |
// -----------------------------------------------------------------------------
|
|
273 |
const TDesC8& CXnNode::GetPCData() const
|
|
274 |
{
|
|
275 |
return iImpl->GetPCData();
|
|
276 |
}
|
|
277 |
|
|
278 |
// -----------------------------------------------------------------------------
|
|
279 |
// CXnNode::SetPropertyWithoutNotificationL
|
|
280 |
// Set a property.
|
|
281 |
// -----------------------------------------------------------------------------
|
|
282 |
//
|
|
283 |
void CXnNode::SetPropertyWithoutNotificationL( CXnProperty* aProperty )
|
|
284 |
{
|
|
285 |
if ( aProperty )
|
|
286 |
{
|
|
287 |
iImpl->SetPropertyWithoutNotificationL( aProperty );
|
|
288 |
}
|
|
289 |
}
|
|
290 |
|
|
291 |
// -----------------------------------------------------------------------------
|
|
292 |
// CXnNode::SetPropertyL
|
|
293 |
// Set a property.
|
|
294 |
// -----------------------------------------------------------------------------
|
|
295 |
//
|
|
296 |
void CXnNode::SetPropertyL( CXnProperty* aProperty )
|
|
297 |
{
|
|
298 |
if ( aProperty )
|
|
299 |
{
|
|
300 |
iImpl->SetPropertyL( aProperty );
|
|
301 |
}
|
|
302 |
}
|
|
303 |
|
|
304 |
// -----------------------------------------------------------------------------
|
|
305 |
// CXnNode::SetPropertyArrayL
|
|
306 |
// Set a property array.
|
|
307 |
// -----------------------------------------------------------------------------
|
|
308 |
//
|
|
309 |
void CXnNode::SetPropertyArrayL( RPointerArray< CXnProperty >* aPropertyArray )
|
|
310 |
{
|
|
311 |
if ( aPropertyArray )
|
|
312 |
{
|
|
313 |
iImpl->SetPropertyArrayL( *aPropertyArray );
|
|
314 |
}
|
|
315 |
}
|
|
316 |
|
|
317 |
// -----------------------------------------------------------------------------
|
|
318 |
// CXnNode::InitializePropertyL
|
|
319 |
// Set a property.
|
|
320 |
// -----------------------------------------------------------------------------
|
|
321 |
//
|
|
322 |
void CXnNode::InitializePropertyL( CXnProperty* aProperty )
|
|
323 |
{
|
|
324 |
if ( aProperty )
|
|
325 |
{
|
|
326 |
iImpl->InitializePropertyL( aProperty );
|
|
327 |
}
|
|
328 |
}
|
|
329 |
|
|
330 |
// -----------------------------------------------------------------------------
|
|
331 |
// CXnNode::GetProperty
|
|
332 |
// Gets a property.
|
|
333 |
// -----------------------------------------------------------------------------
|
|
334 |
//
|
|
335 |
CXnProperty* CXnNode::GetPropertyL( const TDesC8& aKey ) const
|
|
336 |
{
|
|
337 |
return iImpl->GetPropertyL( aKey );
|
|
338 |
}
|
|
339 |
|
|
340 |
// -----------------------------------------------------------------------------
|
|
341 |
// CXnNode::SetStateL
|
|
342 |
// Set a state
|
|
343 |
// -----------------------------------------------------------------------------
|
|
344 |
//
|
|
345 |
void CXnNode::SetStateL( const TDesC8& aState, TInt aSource )
|
|
346 |
{
|
|
347 |
iImpl->SetStateL( aState, aSource );
|
|
348 |
}
|
|
349 |
|
|
350 |
// -----------------------------------------------------------------------------
|
|
351 |
// CXnNode::IsStateSet
|
|
352 |
// Check whether a state is set or not
|
|
353 |
// -----------------------------------------------------------------------------
|
|
354 |
//
|
|
355 |
TBool CXnNode::IsStateSet( const TDesC8& aState )
|
|
356 |
{
|
|
357 |
return iImpl->IsStateSet( aState );
|
|
358 |
}
|
|
359 |
|
|
360 |
// -----------------------------------------------------------------------------
|
|
361 |
// CXnNode::SetStateWithoutNotificationL
|
|
362 |
// Set a state
|
|
363 |
// -----------------------------------------------------------------------------
|
|
364 |
//
|
|
365 |
void CXnNode::SetStateWithoutNotificationL( const TDesC8& aState )
|
|
366 |
{
|
|
367 |
iImpl->SetStateWithoutNotificationL( aState );
|
|
368 |
}
|
|
369 |
|
|
370 |
// -----------------------------------------------------------------------------
|
|
371 |
// CXnNode::UnsetState
|
|
372 |
// Unset a pseudoclass
|
|
373 |
// -----------------------------------------------------------------------------
|
|
374 |
//
|
|
375 |
void CXnNode::UnsetStateL( const TDesC8& aState )
|
|
376 |
{
|
|
377 |
iImpl->UnsetStateL( aState );
|
|
378 |
}
|
|
379 |
|
|
380 |
// -----------------------------------------------------------------------------
|
|
381 |
// CXnNode::SetRect
|
|
382 |
// -----------------------------------------------------------------------------
|
|
383 |
//
|
|
384 |
void CXnNode::SetRect( const TRect& aRect )
|
|
385 |
{
|
|
386 |
iImpl->SetRect( aRect );
|
|
387 |
}
|
|
388 |
|
|
389 |
// -----------------------------------------------------------------------------
|
|
390 |
// CXnNode::Rect
|
|
391 |
// -----------------------------------------------------------------------------
|
|
392 |
//
|
|
393 |
TRect CXnNode::Rect()
|
|
394 |
{
|
|
395 |
return iImpl->Rect();
|
|
396 |
}
|
|
397 |
|
|
398 |
// -----------------------------------------------------------------------------
|
|
399 |
// CXnNode::SetBorderRect
|
|
400 |
// -----------------------------------------------------------------------------
|
|
401 |
//
|
|
402 |
void CXnNode::SetBorderRect( const TRect& aRect )
|
|
403 |
{
|
|
404 |
iImpl->SetBorderRect( aRect );
|
|
405 |
}
|
|
406 |
|
|
407 |
// -----------------------------------------------------------------------------
|
|
408 |
// CXnNode::BorderRect
|
|
409 |
// -----------------------------------------------------------------------------
|
|
410 |
//
|
|
411 |
TRect CXnNode::BorderRect()
|
|
412 |
{
|
|
413 |
return iImpl->BorderRect();
|
|
414 |
}
|
|
415 |
|
|
416 |
// -----------------------------------------------------------------------------
|
|
417 |
// CXnNode::SetNormalFlowBorderRect
|
|
418 |
// -----------------------------------------------------------------------------
|
|
419 |
//
|
|
420 |
void CXnNode::SetNormalFlowBorderRect( const TRect& aRect )
|
|
421 |
{
|
|
422 |
iImpl->SetNormalFlowBorderRect( aRect );
|
|
423 |
}
|
|
424 |
|
|
425 |
// -----------------------------------------------------------------------------
|
|
426 |
// CXnNode::NormalFlowBorderRect
|
|
427 |
// -----------------------------------------------------------------------------
|
|
428 |
//
|
|
429 |
TRect CXnNode::NormalFlowBorderRect()
|
|
430 |
{
|
|
431 |
return iImpl->NormalFlowBorderRect();
|
|
432 |
}
|
|
433 |
|
|
434 |
// -----------------------------------------------------------------------------
|
|
435 |
// CXnNode::SetMarginRect
|
|
436 |
// -----------------------------------------------------------------------------
|
|
437 |
//
|
|
438 |
void CXnNode::SetMarginRect( const TRect& aRect )
|
|
439 |
{
|
|
440 |
iImpl->SetMarginRect( aRect );
|
|
441 |
}
|
|
442 |
|
|
443 |
// -----------------------------------------------------------------------------
|
|
444 |
// CXnNode::MarginRect
|
|
445 |
// -----------------------------------------------------------------------------
|
|
446 |
//
|
|
447 |
TRect CXnNode::MarginRect()
|
|
448 |
{
|
|
449 |
return iImpl->MarginRect();
|
|
450 |
}
|
|
451 |
|
|
452 |
// -----------------------------------------------------------------------------
|
|
453 |
// CXnNode::SetPaddingRect
|
|
454 |
// -----------------------------------------------------------------------------
|
|
455 |
//
|
|
456 |
void CXnNode::SetPaddingRect( const TRect& aRect )
|
|
457 |
{
|
|
458 |
iImpl->SetPaddingRect( aRect );
|
|
459 |
}
|
|
460 |
|
|
461 |
// -----------------------------------------------------------------------------
|
|
462 |
// CXnNode::PaddingRect
|
|
463 |
// -----------------------------------------------------------------------------
|
|
464 |
//
|
|
465 |
TRect CXnNode::PaddingRect()
|
|
466 |
{
|
|
467 |
return iImpl->PaddingRect();
|
|
468 |
}
|
|
469 |
|
|
470 |
// -----------------------------------------------------------------------------
|
|
471 |
// CXnNode::SetUiEngine
|
|
472 |
// -----------------------------------------------------------------------------
|
|
473 |
//
|
|
474 |
void CXnNode::SetUiEngine( CXnUiEngine& aEngine )
|
|
475 |
{
|
|
476 |
iImpl->SetUiEngine( aEngine );
|
|
477 |
}
|
|
478 |
|
|
479 |
// -----------------------------------------------------------------------------
|
|
480 |
// CXnNode::UiEngine
|
|
481 |
// -----------------------------------------------------------------------------
|
|
482 |
//
|
|
483 |
CXnUiEngine* CXnNode::UiEngine()
|
|
484 |
{
|
|
485 |
return iImpl->UiEngine();
|
|
486 |
}
|
|
487 |
|
|
488 |
// -----------------------------------------------------------------------------
|
|
489 |
// CXnNode::ReportXuikonEventL
|
|
490 |
// -----------------------------------------------------------------------------
|
|
491 |
//
|
|
492 |
TBool CXnNode::ReportXuikonEventL( CXnNode& aEventData, TInt aSource )
|
|
493 |
{
|
|
494 |
return iImpl->ReportXuikonEventL( aEventData, aSource );
|
|
495 |
}
|
|
496 |
|
|
497 |
// -----------------------------------------------------------------------------
|
|
498 |
// CXnNode::OfferKeyEventL
|
|
499 |
// -----------------------------------------------------------------------------
|
|
500 |
//
|
|
501 |
void CXnNode::OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType )
|
|
502 |
{
|
|
503 |
iImpl->OfferKeyEventL( aKeyEvent, aType );
|
|
504 |
}
|
|
505 |
|
|
506 |
// -----------------------------------------------------------------------------
|
|
507 |
// CXnNode::SetLayoutCapable
|
|
508 |
// -----------------------------------------------------------------------------
|
|
509 |
//
|
|
510 |
void CXnNode::SetLayoutCapable( const TBool aLayoutCapable )
|
|
511 |
{
|
|
512 |
iImpl->SetLayoutCapable( aLayoutCapable );
|
|
513 |
}
|
|
514 |
|
|
515 |
// -----------------------------------------------------------------------------
|
|
516 |
// CXnNode::SetLayoutCapable
|
|
517 |
// -----------------------------------------------------------------------------
|
|
518 |
//
|
|
519 |
TBool CXnNode::IsLayoutCapable() const
|
|
520 |
{
|
|
521 |
return iImpl->IsLayoutCapable();
|
|
522 |
}
|
|
523 |
|
|
524 |
// -----------------------------------------------------------------------------
|
|
525 |
// CXnNodeImpl::SetRenderedL
|
|
526 |
// -----------------------------------------------------------------------------
|
|
527 |
//
|
|
528 |
void CXnNode::SetRenderedL()
|
|
529 |
{
|
|
530 |
iImpl->SetRenderedL();
|
|
531 |
}
|
|
532 |
|
|
533 |
// -----------------------------------------------------------------------------
|
|
534 |
// CXnNodeImpl::SetLaidOutL
|
|
535 |
// -----------------------------------------------------------------------------
|
|
536 |
//
|
|
537 |
void CXnNode::SetLaidOutL()
|
|
538 |
{
|
|
539 |
iImpl->SetLaidOutL();
|
|
540 |
}
|
|
541 |
|
|
542 |
// -----------------------------------------------------------------------------
|
|
543 |
// CXnNodeImpl::IsLaidOut
|
|
544 |
// -----------------------------------------------------------------------------
|
|
545 |
//
|
|
546 |
TBool CXnNode::IsLaidOut() const
|
|
547 |
{
|
|
548 |
return iImpl->IsLaidOut();
|
|
549 |
}
|
|
550 |
|
|
551 |
// -----------------------------------------------------------------------------
|
|
552 |
// CXnNode::ClearRenderedAndLaidOut
|
|
553 |
// -----------------------------------------------------------------------------
|
|
554 |
//
|
|
555 |
void CXnNode::ClearRenderedAndLaidOut()
|
|
556 |
{
|
|
557 |
iImpl->ClearRenderedAndLaidOut();
|
|
558 |
}
|
|
559 |
|
|
560 |
// -----------------------------------------------------------------------------
|
|
561 |
// CXnNode::PluginIfL
|
|
562 |
// Get node plugin interface
|
|
563 |
// -----------------------------------------------------------------------------
|
|
564 |
//
|
|
565 |
CXnNodePluginIf& CXnNode::PluginIfL()
|
|
566 |
{
|
|
567 |
if ( iPluginIf )
|
|
568 |
{
|
|
569 |
return *iPluginIf;
|
|
570 |
}
|
|
571 |
else
|
|
572 |
{
|
|
573 |
iPluginIf = new ( ELeave ) CXnNodePluginIf( *this );
|
|
574 |
return *iPluginIf;
|
|
575 |
}
|
|
576 |
}
|
|
577 |
|
|
578 |
// -----------------------------------------------------------------------------
|
|
579 |
// CXnNode::AppIfL
|
|
580 |
// Get node plugin interface
|
|
581 |
// -----------------------------------------------------------------------------
|
|
582 |
//
|
|
583 |
CXnNodeAppIf& CXnNode::AppIfL()
|
|
584 |
{
|
|
585 |
if ( iAppIf )
|
|
586 |
{
|
|
587 |
return *iAppIf;
|
|
588 |
}
|
|
589 |
else
|
|
590 |
{
|
|
591 |
iAppIf = new ( ELeave ) CXnNodeAppIf( *this );
|
|
592 |
return *iAppIf;
|
|
593 |
}
|
|
594 |
}
|
|
595 |
|
|
596 |
// -----------------------------------------------------------------------------
|
|
597 |
// CXnNode::MakeInterfaceL
|
|
598 |
// Create a component interface according to the given type.
|
|
599 |
// -----------------------------------------------------------------------------
|
|
600 |
//
|
|
601 |
XnComponentInterface::MXnComponentInterface* CXnNode::MakeInterfaceL(
|
|
602 |
const TDesC8& aType )
|
|
603 |
{
|
|
604 |
return iImpl->MakeInterfaceL( aType );
|
|
605 |
}
|
|
606 |
|
|
607 |
CXnProperty* CXnNode::WidthL()
|
|
608 |
{
|
|
609 |
return iImpl->WidthL();
|
|
610 |
}
|
|
611 |
|
|
612 |
CXnProperty* CXnNode::HeightL()
|
|
613 |
{
|
|
614 |
return iImpl->HeightL();
|
|
615 |
}
|
|
616 |
|
|
617 |
CXnProperty* CXnNode::MarginLeftL()
|
|
618 |
{
|
|
619 |
return iImpl->MarginLeftL();
|
|
620 |
}
|
|
621 |
|
|
622 |
CXnProperty* CXnNode::MarginRightL()
|
|
623 |
{
|
|
624 |
return iImpl->MarginRightL();
|
|
625 |
}
|
|
626 |
|
|
627 |
CXnProperty* CXnNode::BorderLeftL()
|
|
628 |
{
|
|
629 |
return iImpl->BorderLeftL();
|
|
630 |
}
|
|
631 |
|
|
632 |
CXnProperty* CXnNode::BorderRightL()
|
|
633 |
{
|
|
634 |
return iImpl->BorderRightL();
|
|
635 |
}
|
|
636 |
|
|
637 |
CXnProperty* CXnNode::PaddingLeftL()
|
|
638 |
{
|
|
639 |
return iImpl->PaddingLeftL();
|
|
640 |
}
|
|
641 |
|
|
642 |
CXnProperty* CXnNode::PaddingRightL()
|
|
643 |
{
|
|
644 |
return iImpl->PaddingRightL();
|
|
645 |
}
|
|
646 |
|
|
647 |
CXnProperty* CXnNode::MarginTopL()
|
|
648 |
{
|
|
649 |
return iImpl->MarginTopL();
|
|
650 |
}
|
|
651 |
|
|
652 |
CXnProperty* CXnNode::MarginBottomL()
|
|
653 |
{
|
|
654 |
return iImpl->MarginBottomL();
|
|
655 |
}
|
|
656 |
|
|
657 |
CXnProperty* CXnNode::BorderTopL()
|
|
658 |
{
|
|
659 |
return iImpl->BorderTopL();
|
|
660 |
}
|
|
661 |
|
|
662 |
CXnProperty* CXnNode::BorderBottomL()
|
|
663 |
{
|
|
664 |
return iImpl->BorderBottomL();
|
|
665 |
}
|
|
666 |
|
|
667 |
CXnProperty* CXnNode::PaddingTopL()
|
|
668 |
{
|
|
669 |
return iImpl->PaddingTopL();
|
|
670 |
}
|
|
671 |
|
|
672 |
CXnProperty* CXnNode::PaddingBottomL()
|
|
673 |
{
|
|
674 |
return iImpl->PaddingBottomL();
|
|
675 |
}
|
|
676 |
|
|
677 |
CXnProperty* CXnNode::BorderWidthL()
|
|
678 |
{
|
|
679 |
return iImpl->BorderWidthL();
|
|
680 |
}
|
|
681 |
|
|
682 |
CXnProperty* CXnNode::BlockProgressionL()
|
|
683 |
{
|
|
684 |
return iImpl->BlockProgressionL();
|
|
685 |
}
|
|
686 |
|
|
687 |
CXnProperty* CXnNode::DirectionL()
|
|
688 |
{
|
|
689 |
return iImpl->DirectionL();
|
|
690 |
}
|
|
691 |
|
|
692 |
CXnProperty* CXnNode::PositionL()
|
|
693 |
{
|
|
694 |
return iImpl->PositionL();
|
|
695 |
}
|
|
696 |
|
|
697 |
CXnProperty* CXnNode::MaxHeightL()
|
|
698 |
{
|
|
699 |
return iImpl->MaxHeightL();
|
|
700 |
}
|
|
701 |
|
|
702 |
CXnProperty* CXnNode::MinHeightL()
|
|
703 |
{
|
|
704 |
return iImpl->MinHeightL();
|
|
705 |
}
|
|
706 |
|
|
707 |
CXnProperty* CXnNode::MaxWidthL()
|
|
708 |
{
|
|
709 |
return iImpl->MaxWidthL();
|
|
710 |
}
|
|
711 |
|
|
712 |
CXnProperty* CXnNode::MinWidthL()
|
|
713 |
{
|
|
714 |
return iImpl->MinWidthL();
|
|
715 |
}
|
|
716 |
|
|
717 |
CXnProperty* CXnNode::DisplayL()
|
|
718 |
{
|
|
719 |
return iImpl->DisplayL();
|
|
720 |
}
|
|
721 |
|
|
722 |
CXnProperty* CXnNode::VisibilityL()
|
|
723 |
{
|
|
724 |
return iImpl->VisibilityL();
|
|
725 |
}
|
|
726 |
|
|
727 |
CXnProperty* CXnNode::LeftL()
|
|
728 |
{
|
|
729 |
return iImpl->LeftL();
|
|
730 |
}
|
|
731 |
|
|
732 |
CXnProperty* CXnNode::RightL()
|
|
733 |
{
|
|
734 |
return iImpl->RightL();
|
|
735 |
}
|
|
736 |
|
|
737 |
CXnProperty* CXnNode::TopL()
|
|
738 |
{
|
|
739 |
return iImpl->TopL();
|
|
740 |
}
|
|
741 |
|
|
742 |
CXnProperty* CXnNode::BottomL()
|
|
743 |
{
|
|
744 |
return iImpl->BottomL();
|
|
745 |
}
|
|
746 |
|
|
747 |
CXnProperty* CXnNode::BorderLeftStyleL()
|
|
748 |
{
|
|
749 |
return iImpl->BorderLeftStyleL();
|
|
750 |
}
|
|
751 |
|
|
752 |
CXnProperty* CXnNode::BorderRightStyleL()
|
|
753 |
{
|
|
754 |
return iImpl->BorderRightStyleL();
|
|
755 |
}
|
|
756 |
|
|
757 |
CXnProperty* CXnNode::BorderTopStyleL()
|
|
758 |
{
|
|
759 |
return iImpl->BorderTopStyleL();
|
|
760 |
}
|
|
761 |
|
|
762 |
CXnProperty* CXnNode::BorderBottomStyleL()
|
|
763 |
{
|
|
764 |
return iImpl->BorderBottomStyleL();
|
|
765 |
}
|
|
766 |
|
|
767 |
CXnProperty* CXnNode::BorderStyleL()
|
|
768 |
{
|
|
769 |
return iImpl->BorderStyleL();
|
|
770 |
}
|
|
771 |
|
|
772 |
CXnProperty* CXnNode::BorderImageL()
|
|
773 |
{
|
|
774 |
return iImpl->BorderImageL();
|
|
775 |
}
|
|
776 |
|
|
777 |
CXnProperty* CXnNode::DisplayPriorityL()
|
|
778 |
{
|
|
779 |
return iImpl->DisplayPriorityL();
|
|
780 |
}
|
|
781 |
|
|
782 |
CXnProperty* CXnNode::NameL()
|
|
783 |
{
|
|
784 |
return iImpl->NameL();
|
|
785 |
}
|
|
786 |
|
|
787 |
CXnProperty* CXnNode::ValueL()
|
|
788 |
{
|
|
789 |
return iImpl->ValueL();
|
|
790 |
}
|
|
791 |
|
|
792 |
CXnProperty* CXnNode::LabelL()
|
|
793 |
{
|
|
794 |
return iImpl->LabelL();
|
|
795 |
}
|
|
796 |
|
|
797 |
CXnProperty* CXnNode::InitialFocusL()
|
|
798 |
{
|
|
799 |
return iImpl->InitialFocusL();
|
|
800 |
}
|
|
801 |
|
|
802 |
CXnProperty* CXnNode::ClassL()
|
|
803 |
{
|
|
804 |
return iImpl->ClassL();
|
|
805 |
}
|
|
806 |
|
|
807 |
CXnProperty* CXnNode::IdL()
|
|
808 |
{
|
|
809 |
return iImpl->IdL();
|
|
810 |
}
|
|
811 |
CXnProperty* CXnNode::PathL()
|
|
812 |
{
|
|
813 |
return iImpl->PathL();
|
|
814 |
}
|
|
815 |
CXnProperty* CXnNode::MaskPathL()
|
|
816 |
{
|
|
817 |
return iImpl->MaskPathL();
|
|
818 |
}
|
|
819 |
|
|
820 |
CXnProperty* CXnNode::NavIndexL()
|
|
821 |
{
|
|
822 |
return iImpl->NavIndexL();
|
|
823 |
}
|
|
824 |
|
|
825 |
CXnProperty* CXnNode::ZIndexL()
|
|
826 |
{
|
|
827 |
return iImpl->ZIndexL();
|
|
828 |
}
|
|
829 |
|
|
830 |
CXnProperty* CXnNode::BackgroundColorL()
|
|
831 |
{
|
|
832 |
return iImpl->BackgroundColorL();
|
|
833 |
}
|
|
834 |
|
|
835 |
CXnProperty* CXnNode::BackgroundImageL()
|
|
836 |
{
|
|
837 |
return iImpl->BackgroundImageL();
|
|
838 |
}
|
|
839 |
|
|
840 |
CXnProperty* CXnNode::FocusBackgroundL()
|
|
841 |
{
|
|
842 |
return iImpl->FocusBackgroundL();
|
|
843 |
}
|
|
844 |
|
|
845 |
// -----------------------------------------------------------------------------
|
|
846 |
// CXnNode::SetDomNode
|
|
847 |
// Sets the DOM node pointer
|
|
848 |
// -----------------------------------------------------------------------------
|
|
849 |
//
|
|
850 |
void CXnNode::SetDomNode( CXnDomNode* aDomNode )
|
|
851 |
{
|
|
852 |
if ( aDomNode )
|
|
853 |
{
|
|
854 |
iImpl->SetDomNode( aDomNode );
|
|
855 |
}
|
|
856 |
}
|
|
857 |
|
|
858 |
// -----------------------------------------------------------------------------
|
|
859 |
// CXnNode::DomNode
|
|
860 |
// Returns the DOM node pointer
|
|
861 |
// -----------------------------------------------------------------------------
|
|
862 |
//
|
|
863 |
CXnDomNode* CXnNode::DomNode()
|
|
864 |
{
|
|
865 |
return iImpl->DomNode();
|
|
866 |
}
|
|
867 |
|
|
868 |
// -----------------------------------------------------------------------------
|
|
869 |
// CXnNode::SetHandleTooltip
|
|
870 |
// Sets handle tooltip flag.
|
|
871 |
// -----------------------------------------------------------------------------
|
|
872 |
//
|
|
873 |
void CXnNode::SetHandleTooltip( TBool aFlag )
|
|
874 |
{
|
|
875 |
iImpl->SetHandleTooltip( aFlag );
|
|
876 |
}
|
|
877 |
|
|
878 |
// -----------------------------------------------------------------------------
|
|
879 |
// CXnNode::MeasureAdaptiveContentL
|
|
880 |
// Measures the adaptive content dimensions.
|
|
881 |
// -----------------------------------------------------------------------------
|
|
882 |
//
|
|
883 |
TSize CXnNode::MeasureAdaptiveContentL( const TSize& aAvailableSize )
|
|
884 |
{
|
|
885 |
return iImpl->MeasureAdaptiveContentL( aAvailableSize );
|
|
886 |
}
|
|
887 |
|
|
888 |
// -----------------------------------------------------------------------------
|
|
889 |
// CXnNode::IsAdaptive
|
|
890 |
// Checks if the node has adaptive content
|
|
891 |
// -----------------------------------------------------------------------------
|
|
892 |
//
|
|
893 |
TInt CXnNode::IsAdaptive( TBool aIgnoreSizeFixed ) const
|
|
894 |
{
|
|
895 |
return iImpl->IsAdaptive( aIgnoreSizeFixed );
|
|
896 |
}
|
|
897 |
|
|
898 |
// -----------------------------------------------------------------------------
|
|
899 |
// CXnNode::SetAdaptiveL
|
|
900 |
// Marks the node as content based.
|
|
901 |
// -----------------------------------------------------------------------------
|
|
902 |
//
|
|
903 |
void CXnNode::SetAdaptiveL( const TInt aAdaptive )
|
|
904 |
{
|
|
905 |
iImpl->SetAdaptiveL( aAdaptive );
|
|
906 |
}
|
|
907 |
|
|
908 |
// -----------------------------------------------------------------------------
|
|
909 |
// CXnNode::FixAdaptiveSizeL
|
|
910 |
// Marks the node as content based.
|
|
911 |
// -----------------------------------------------------------------------------
|
|
912 |
//
|
|
913 |
void CXnNode::FixAdaptiveSizeL( const TSize& aFixedSize )
|
|
914 |
{
|
|
915 |
iImpl->FixAdaptiveSizeL( aFixedSize );
|
|
916 |
}
|
|
917 |
|
|
918 |
// -----------------------------------------------------------------------------
|
|
919 |
// CXnNode::SetDirtyL
|
|
920 |
// Marks the node dirty
|
|
921 |
// -----------------------------------------------------------------------------
|
|
922 |
//
|
|
923 |
void CXnNode::SetDirtyL( TInt aLevel, TBool aDisplayedState )
|
|
924 |
{
|
|
925 |
iImpl->SetDirtyL( aLevel, aDisplayedState );
|
|
926 |
}
|
|
927 |
|
|
928 |
// -----------------------------------------------------------------------------
|
|
929 |
// CXnNode::RunFocusChangeL
|
|
930 |
// Runs focus change
|
|
931 |
// -----------------------------------------------------------------------------
|
|
932 |
//
|
|
933 |
TBool CXnNode::RunFocusChangeL( RPointerArray< CXnNode >& aFocusCandidates )
|
|
934 |
{
|
|
935 |
return iImpl->RunFocusChangeL( aFocusCandidates );
|
|
936 |
}
|
|
937 |
|
|
938 |
// -----------------------------------------------------------------------------
|
|
939 |
// CXnNode::ReorderNodesL
|
|
940 |
// -----------------------------------------------------------------------------
|
|
941 |
//
|
|
942 |
void CXnNode::ReorderNodesL( CXnNode* aSource, CXnNode* aTarget )
|
|
943 |
{
|
|
944 |
if ( aSource && aTarget )
|
|
945 |
{
|
|
946 |
iImpl->ReorderNodesL( aSource, aTarget );
|
|
947 |
}
|
|
948 |
}
|
|
949 |
|
|
950 |
// -----------------------------------------------------------------------------
|
|
951 |
// CXnNode::FindViewNode
|
|
952 |
// -----------------------------------------------------------------------------
|
|
953 |
//
|
|
954 |
CXnNode* CXnNode::FindViewNode()
|
|
955 |
{
|
|
956 |
CXnNode* tmp = NULL;
|
|
957 |
tmp = Parent();
|
|
958 |
while( tmp )
|
|
959 |
{
|
|
960 |
if ( tmp->Type()->Type() == KView )
|
|
961 |
{
|
|
962 |
break;
|
|
963 |
}
|
|
964 |
else
|
|
965 |
{
|
|
966 |
tmp = tmp->Parent();
|
|
967 |
}
|
|
968 |
}
|
|
969 |
return tmp;
|
|
970 |
}
|
|
971 |
|
|
972 |
// -----------------------------------------------------------------------------
|
|
973 |
// CXnNode::ShowTooltipsL
|
|
974 |
// -----------------------------------------------------------------------------
|
|
975 |
//
|
|
976 |
void CXnNode::ShowTooltipsL()
|
|
977 |
{
|
|
978 |
if ( IsStateSet( XnPropertyNames::action::trigger::name::KFocus ) )
|
|
979 |
{
|
|
980 |
iImpl->HidePopupsL();
|
|
981 |
iImpl->ShowPopupsL( Rect() );
|
|
982 |
}
|
|
983 |
}
|
|
984 |
|
|
985 |
// -----------------------------------------------------------------------------
|
|
986 |
// CXnNode::HideTooltipsL
|
|
987 |
// -----------------------------------------------------------------------------
|
|
988 |
//
|
|
989 |
void CXnNode::HideTooltipsL()
|
|
990 |
{
|
|
991 |
iImpl->HidePopupsL();
|
|
992 |
}
|
|
993 |
|
|
994 |
// -----------------------------------------------------------------------------
|
|
995 |
// CXnNode::Namespace
|
|
996 |
// -----------------------------------------------------------------------------
|
|
997 |
//
|
|
998 |
const TDesC8& CXnNode::Namespace()
|
|
999 |
{
|
|
1000 |
return iImpl->Namespace();
|
|
1001 |
}
|
|
1002 |
|
|
1003 |
// -----------------------------------------------------------------------------
|
|
1004 |
// CXnNode::ControlL
|
|
1005 |
// -----------------------------------------------------------------------------
|
|
1006 |
//
|
|
1007 |
CXnControlAdapter* CXnNode::Control() const
|
|
1008 |
{
|
|
1009 |
CXnComponent* component( NULL );
|
|
1010 |
|
|
1011 |
if ( iViewNodeImpl )
|
|
1012 |
{
|
|
1013 |
component = iViewNodeImpl->Component();
|
|
1014 |
}
|
|
1015 |
else if ( iComponentNodeImpl )
|
|
1016 |
{
|
|
1017 |
component = iComponentNodeImpl->Component();
|
|
1018 |
}
|
|
1019 |
|
|
1020 |
if ( component )
|
|
1021 |
{
|
|
1022 |
return component->ControlAdapter();
|
|
1023 |
}
|
|
1024 |
|
|
1025 |
return NULL;
|
|
1026 |
}
|
|
1027 |
|
|
1028 |
// -----------------------------------------------------------------------------
|
|
1029 |
// CXnNode::SetScrollableControl()
|
|
1030 |
// -----------------------------------------------------------------------------
|
|
1031 |
//
|
|
1032 |
void CXnNode::SetScrollableControl( CXnScrollableControlAdapter* aScrollableControl )
|
|
1033 |
{
|
|
1034 |
iImpl->SetScrollableControl( aScrollableControl );
|
|
1035 |
}
|
|
1036 |
|
|
1037 |
// -----------------------------------------------------------------------------
|
|
1038 |
// CXnNode::ScrollableControl()
|
|
1039 |
// -----------------------------------------------------------------------------
|
|
1040 |
//
|
|
1041 |
CXnScrollableControlAdapter* CXnNode::ScrollableControl()
|
|
1042 |
{
|
|
1043 |
return iImpl->ScrollableControl();
|
|
1044 |
}
|
|
1045 |
|