idlehomescreen/xmluirendering/uiengine/src/xnnode.cpp
changeset 0 f72a12da539e
child 15 ff572dfe6d86
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     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::VisibleRowsL()
       
   826     {
       
   827     return iImpl->VisibleRowsL();
       
   828     }
       
   829 
       
   830 CXnProperty* CXnNode::GridColumnsL()
       
   831     {
       
   832     return iImpl->GridColumnsL();
       
   833     }
       
   834 
       
   835 CXnProperty* CXnNode::GridOrientationL()
       
   836     {
       
   837     return iImpl->GridOrientationL();
       
   838     }
       
   839 
       
   840 CXnProperty* CXnNode::GridVerDirectionL()
       
   841     {
       
   842     return iImpl->GridVerDirectionL();
       
   843     }
       
   844 
       
   845 CXnProperty* CXnNode::GridHorDirectionL()
       
   846     {
       
   847     return iImpl->GridHorDirectionL();
       
   848     }
       
   849 
       
   850 CXnProperty* CXnNode::FocusHorLoopingL()
       
   851     {
       
   852     return iImpl->FocusHorLoopingL();
       
   853     }
       
   854 
       
   855 CXnProperty* CXnNode::FocusVerLoopingL()
       
   856     {
       
   857     return iImpl->FocusVerLoopingL();
       
   858     }
       
   859 
       
   860 CXnProperty* CXnNode::ZIndexL()
       
   861     {
       
   862     return iImpl->ZIndexL();
       
   863     }
       
   864 
       
   865 CXnProperty* CXnNode::BackgroundColorL()
       
   866     {
       
   867     return iImpl->BackgroundColorL();
       
   868     }
       
   869 
       
   870 CXnProperty* CXnNode::BackgroundImageL()
       
   871     {
       
   872     return iImpl->BackgroundImageL();
       
   873     }
       
   874 
       
   875 CXnProperty* CXnNode::FocusBackgroundL()
       
   876     {
       
   877     return iImpl->FocusBackgroundL();
       
   878     }
       
   879 
       
   880 CXnProperty* CXnNode::RefL()
       
   881     {
       
   882     return iImpl->RefL();
       
   883     }
       
   884 
       
   885 CXnProperty* CXnNode::GridScrollBarMarginL()
       
   886     {
       
   887     return iImpl->GridScrollBarMarginL();
       
   888     }
       
   889 
       
   890 CXnProperty* CXnNode::GridScrollBarWidthL()
       
   891     {
       
   892     return iImpl->GridScrollBarWidthL();
       
   893     }
       
   894 
       
   895 // -----------------------------------------------------------------------------
       
   896 // CXnNode::SetDomNode
       
   897 // Sets the DOM node pointer
       
   898 // -----------------------------------------------------------------------------
       
   899 //
       
   900 void CXnNode::SetDomNode( CXnDomNode* aDomNode )
       
   901     {
       
   902     if ( aDomNode )
       
   903         {
       
   904         iImpl->SetDomNode( aDomNode );
       
   905         }
       
   906     }
       
   907 
       
   908 // -----------------------------------------------------------------------------
       
   909 // CXnNode::DomNode
       
   910 // Returns the DOM node pointer
       
   911 // -----------------------------------------------------------------------------
       
   912 //
       
   913 CXnDomNode* CXnNode::DomNode()
       
   914     {
       
   915     return iImpl->DomNode();
       
   916     }
       
   917 
       
   918 // -----------------------------------------------------------------------------
       
   919 // CXnNode::SetHandleTooltip
       
   920 // Sets handle tooltip flag.
       
   921 // -----------------------------------------------------------------------------
       
   922 //
       
   923 void CXnNode::SetHandleTooltip( TBool aFlag )
       
   924     {
       
   925     iImpl->SetHandleTooltip( aFlag );
       
   926     }
       
   927 
       
   928 // -----------------------------------------------------------------------------
       
   929 // CXnNode::MeasureAdaptiveContentL
       
   930 // Measures the adaptive content dimensions.
       
   931 // -----------------------------------------------------------------------------
       
   932 //
       
   933 TSize CXnNode::MeasureAdaptiveContentL( const TSize& aAvailableSize )
       
   934     {
       
   935     return iImpl->MeasureAdaptiveContentL( aAvailableSize );
       
   936     }
       
   937 
       
   938 // -----------------------------------------------------------------------------
       
   939 // CXnNode::IsAdaptive
       
   940 // Checks if the node has adaptive content
       
   941 // -----------------------------------------------------------------------------
       
   942 //
       
   943 TInt CXnNode::IsAdaptive( TBool aIgnoreSizeFixed ) const
       
   944     {
       
   945     return iImpl->IsAdaptive( aIgnoreSizeFixed );
       
   946     }
       
   947 
       
   948 // -----------------------------------------------------------------------------
       
   949 // CXnNode::SetAdaptiveL
       
   950 // Marks the node as content based.
       
   951 // -----------------------------------------------------------------------------
       
   952 //
       
   953 void CXnNode::SetAdaptiveL( const TInt aAdaptive )
       
   954     {
       
   955     iImpl->SetAdaptiveL( aAdaptive );
       
   956     }
       
   957 
       
   958 // -----------------------------------------------------------------------------
       
   959 // CXnNode::FixAdaptiveSizeL
       
   960 // Marks the node as content based.
       
   961 // -----------------------------------------------------------------------------
       
   962 //
       
   963 void CXnNode::FixAdaptiveSizeL( const TSize& aFixedSize )
       
   964     {
       
   965     iImpl->FixAdaptiveSizeL( aFixedSize );
       
   966     }
       
   967 
       
   968 // -----------------------------------------------------------------------------
       
   969 // CXnNode::RestartTimedTrigger
       
   970 // Restarts the timed trigger.
       
   971 // -----------------------------------------------------------------------------
       
   972 //
       
   973 void CXnNode::RestartTimedTrigger( TInt aDelay )
       
   974     {
       
   975     CPeriodic* timer = iImpl->PeriodicTimer();
       
   976     if ( timer )
       
   977         {
       
   978         if ( timer->IsActive() )
       
   979             {
       
   980             timer->Cancel();
       
   981             if ( aDelay > 0 )
       
   982                 {
       
   983                 timer->After( aDelay );
       
   984                 }
       
   985             else
       
   986                 {
       
   987                 iImpl->DeletePeriodic();
       
   988                 }
       
   989             }
       
   990         }
       
   991     }
       
   992 
       
   993 // -----------------------------------------------------------------------------
       
   994 // CXnNode::SetTriggerDelay
       
   995 // Sets default trigger delay
       
   996 // -----------------------------------------------------------------------------
       
   997 //
       
   998 void CXnNode::SetTriggerDelay( TTimeIntervalMicroSeconds32 aDelay )
       
   999     {
       
  1000     iTriggerDelay = aDelay;
       
  1001     }
       
  1002 
       
  1003 // -----------------------------------------------------------------------------
       
  1004 // CXnNode::TriggerDelay
       
  1005 // Returns default trigger delay
       
  1006 // -----------------------------------------------------------------------------
       
  1007 //
       
  1008 TTimeIntervalMicroSeconds32 CXnNode::TriggerDelay()
       
  1009     {
       
  1010     return iTriggerDelay;
       
  1011     }
       
  1012 
       
  1013 // -----------------------------------------------------------------------------
       
  1014 // CXnNode::SetDirtyL
       
  1015 // Marks the node dirty
       
  1016 // -----------------------------------------------------------------------------
       
  1017 //
       
  1018 void CXnNode::SetDirtyL( TInt aLevel, TBool aDisplayedState )
       
  1019     {
       
  1020     iImpl->SetDirtyL( aLevel, aDisplayedState );
       
  1021     }
       
  1022 
       
  1023 // -----------------------------------------------------------------------------
       
  1024 // CXnNode::RunFocusChangeL
       
  1025 // Runs focus change
       
  1026 // -----------------------------------------------------------------------------
       
  1027 //
       
  1028 TBool CXnNode::RunFocusChangeL( RPointerArray< CXnNode >& aFocusCandidates )
       
  1029     {
       
  1030     return iImpl->RunFocusChangeL( aFocusCandidates );
       
  1031     }
       
  1032 
       
  1033 // -----------------------------------------------------------------------------
       
  1034 // CXnNode::ReorderNodesL
       
  1035 // -----------------------------------------------------------------------------
       
  1036 //
       
  1037 void CXnNode::ReorderNodesL( CXnNode* aSource, CXnNode* aTarget )
       
  1038     {
       
  1039     if ( aSource && aTarget )
       
  1040         {
       
  1041         iImpl->ReorderNodesL( aSource, aTarget );
       
  1042         }
       
  1043     }
       
  1044 
       
  1045 // -----------------------------------------------------------------------------
       
  1046 // CXnNode::FindViewNode
       
  1047 // -----------------------------------------------------------------------------
       
  1048 //
       
  1049 CXnNode* CXnNode::FindViewNode()
       
  1050     {
       
  1051     CXnNode* tmp = NULL;
       
  1052     tmp = Parent();
       
  1053     while( tmp )
       
  1054         {
       
  1055         if ( tmp->Type()->Type() == KView )
       
  1056             {
       
  1057             break;
       
  1058             }
       
  1059         else
       
  1060             {
       
  1061             tmp = tmp->Parent();
       
  1062             }
       
  1063         }
       
  1064     return tmp;
       
  1065     }
       
  1066 
       
  1067 // -----------------------------------------------------------------------------
       
  1068 // CXnNode::ShowTooltipsL
       
  1069 // -----------------------------------------------------------------------------
       
  1070 //
       
  1071 void CXnNode::ShowTooltipsL()
       
  1072     {
       
  1073     if ( IsStateSet( XnPropertyNames::action::trigger::name::KFocus ) )
       
  1074         {
       
  1075         iImpl->HidePopupsL();
       
  1076         iImpl->ShowPopupsL( Rect() );
       
  1077         }
       
  1078     }
       
  1079 
       
  1080 // -----------------------------------------------------------------------------
       
  1081 // CXnNode::HideTooltipsL
       
  1082 // -----------------------------------------------------------------------------
       
  1083 //
       
  1084 void CXnNode::HideTooltipsL()
       
  1085     {
       
  1086     iImpl->HidePopupsL();
       
  1087     }
       
  1088 
       
  1089 // -----------------------------------------------------------------------------
       
  1090 // CXnNode::Namespace
       
  1091 // -----------------------------------------------------------------------------
       
  1092 //
       
  1093 const TDesC8& CXnNode::Namespace()
       
  1094     {
       
  1095     return iImpl->Namespace();
       
  1096     }
       
  1097 
       
  1098 // -----------------------------------------------------------------------------
       
  1099 // CXnNode::ControlL
       
  1100 // -----------------------------------------------------------------------------
       
  1101 //
       
  1102 CXnControlAdapter* CXnNode::Control() const
       
  1103     {
       
  1104     CXnComponent* component( NULL );
       
  1105 
       
  1106     if ( iViewNodeImpl )
       
  1107         {
       
  1108         component = iViewNodeImpl->Component();
       
  1109         }
       
  1110     else if ( iComponentNodeImpl )
       
  1111         {
       
  1112         component = iComponentNodeImpl->Component();
       
  1113         }
       
  1114 
       
  1115     if ( component )
       
  1116         {
       
  1117         return component->ControlAdapter();
       
  1118         }
       
  1119 
       
  1120     return NULL;
       
  1121     }
       
  1122 
       
  1123 // -----------------------------------------------------------------------------
       
  1124 // CXnNode::SetScrollableControl()
       
  1125 // -----------------------------------------------------------------------------
       
  1126 //      
       
  1127 void CXnNode::SetScrollableControl( CXnScrollableControlAdapter* aScrollableControl )
       
  1128     {
       
  1129     iImpl->SetScrollableControl( aScrollableControl );
       
  1130     }
       
  1131 
       
  1132 // -----------------------------------------------------------------------------
       
  1133 // CXnNode::ScrollableControl()
       
  1134 // -----------------------------------------------------------------------------
       
  1135 //      
       
  1136 CXnScrollableControlAdapter* CXnNode::ScrollableControl()
       
  1137     {
       
  1138     return iImpl->ScrollableControl();
       
  1139     }
       
  1140