idlehomescreen/inc/xnnodeimpl.h
branchRCL_3
changeset 83 5456b4e8b3a8
child 88 3321d3e205b6
equal deleted inserted replaced
82:5f0182e07bfb 83:5456b4e8b3a8
       
     1 /*
       
     2 * Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 * Implementation part of the bridge pattern of  CXnNode
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef XNNODEIMPL_H
       
    20 #define XNNODEIMPL_H
       
    21 
       
    22 // System includes
       
    23 #include <e32base.h>
       
    24 #include <w32std.h>
       
    25 
       
    26 // User includes
       
    27 #include "xndomproperty.h"
       
    28 #include "xnnode.h"
       
    29 
       
    30 // Forward declarations
       
    31 class CXnType;
       
    32 class CXnPropertyList;
       
    33 class CXnProperty;
       
    34 class CXnNode;
       
    35 class CXnUiEngine;
       
    36 class CLayoutPropertyCache;
       
    37 class CXnDomNode;
       
    38 class CXnScrollableControlAdapter;
       
    39 
       
    40 namespace XnComponentInterface
       
    41     {
       
    42     class MXnComponentInterface;
       
    43     }
       
    44 
       
    45 // Class declaration
       
    46 /**
       
    47  * Implementation part of the bridge pattern in CXnNode.
       
    48  *
       
    49  * @ingroup group_xnlayoutengine
       
    50  * @lib xnlayoutengine.lib
       
    51  * @since Series 60 3.1
       
    52  */
       
    53 NONSHARABLE_CLASS( CXnNodeImpl ) : public CBase
       
    54     {
       
    55 public:
       
    56     // Constructors and destructor
       
    57 
       
    58     /**
       
    59      * Two-phased constructor.
       
    60      *
       
    61      * @param aType Type.
       
    62      */
       
    63     static CXnNodeImpl* NewL( CXnType* aType );
       
    64 
       
    65     /**
       
    66      * Destructor.
       
    67      */
       
    68     virtual ~CXnNodeImpl();
       
    69 
       
    70 public:
       
    71     // New functions
       
    72 
       
    73     /**
       
    74      * Sets wheter to handle tooltips
       
    75      * @since S60 5.1
       
    76      * @param aFlag ETrue to handle, EFalse otherwise
       
    77      */
       
    78     void SetHandleTooltip( TBool aFlag );
       
    79 
       
    80     /**
       
    81      * Hides all popups
       
    82      * @since S60 5.1
       
    83      */
       
    84     void HidePopupsL();
       
    85 
       
    86     /**
       
    87      * Shows all popups
       
    88      *
       
    89      * @param aRect content rect
       
    90      * @param aSource Event source
       
    91      * @since S60 5.1
       
    92      */
       
    93     void ShowPopupsL( TRect aRect, TInt aSource = XnEventSource::EUnknown );
       
    94 
       
    95     /**
       
    96      * Set content rect
       
    97      *
       
    98      * @since Series 60 3.1
       
    99      * @param aRect content rect
       
   100      */
       
   101     void SetRect( const TRect& aRect );
       
   102 
       
   103     /**
       
   104      * Get content rect
       
   105      *
       
   106      * @since Series 60 3.1
       
   107      * @return Content rect
       
   108      */
       
   109     TRect Rect();
       
   110 
       
   111     /**
       
   112      * Set border rect
       
   113      *
       
   114      * @since Series 60 3.1
       
   115      * @param aRect border rect
       
   116      */
       
   117     void SetBorderRect( const TRect& aRect );
       
   118 
       
   119     /**
       
   120      * Get border rect
       
   121      * @since Series 60 3.1
       
   122      * @return Border rect
       
   123      */
       
   124     TRect BorderRect();
       
   125 
       
   126     /**
       
   127      * Set normal flow border rect
       
   128      *
       
   129      * @since Series 60 3.1
       
   130      * @param aRect border rect
       
   131      */
       
   132     void SetNormalFlowBorderRect( const TRect& aRect );
       
   133 
       
   134     /**
       
   135      * Get normal flow border rect
       
   136      *
       
   137      * @since Series 60 3.1
       
   138      * @return Border rect
       
   139      */
       
   140     TRect NormalFlowBorderRect();
       
   141 
       
   142     /**
       
   143      * Set margin rect
       
   144      *
       
   145      * @since Series 60 3.1
       
   146      * @param aRect margin rect
       
   147      */
       
   148     void SetMarginRect( const TRect& aRect );
       
   149 
       
   150     /**
       
   151      * Get margin rect
       
   152      *
       
   153      * @since Series 60 3.1
       
   154      * @return Margin rect
       
   155      */
       
   156     TRect MarginRect();
       
   157 
       
   158     /**
       
   159      * Set padding rect
       
   160      *
       
   161      * @since Series 60 3.1
       
   162      * @param aRect padding rect
       
   163      */
       
   164     void SetPaddingRect( const TRect& aRect );
       
   165 
       
   166     /**
       
   167      * Get padding rect
       
   168      *
       
   169      * @since Series 60 3.1
       
   170      * @return Padding rect
       
   171      */
       
   172     TRect PaddingRect();
       
   173 
       
   174     /**
       
   175      * Set node
       
   176      *
       
   177      * @since Series 60 3.1
       
   178      * @param aNode Node
       
   179      */
       
   180     void SetNode( CXnNode& aNode );
       
   181 
       
   182     /**
       
   183      * Get node
       
   184      *
       
   185      * @since Series 60 3.1
       
   186      * @return Node
       
   187      */
       
   188     CXnNode* Node();
       
   189 
       
   190     /**
       
   191      * Set UI engine
       
   192      *
       
   193      * @since Series 60 3.1
       
   194      * @param aEngine UI engine
       
   195      */
       
   196      void SetUiEngine( CXnUiEngine& aEngine );
       
   197 
       
   198     /**
       
   199      * Get UI engine
       
   200      *
       
   201      * @since Series 60 3.1
       
   202      * @return UI engine
       
   203      */
       
   204     CXnUiEngine* UiEngine();
       
   205 
       
   206     /**
       
   207      * Handle interaction events
       
   208      *
       
   209      * @since Series 60 3.1
       
   210      * @param aEventData Event data
       
   211      * @param aSource A source of event, e.g. XnEventSource::EStylus.
       
   212      */
       
   213     TBool ReportXuikonEventL( CXnNode& aEventData, TInt aSource = 0 );
       
   214 
       
   215     /**
       
   216      * Handle key event
       
   217      *
       
   218      * @since Series 60 3.1
       
   219      * @param aKeyEvent Key event data
       
   220      * @param aType Event type
       
   221      */
       
   222     void OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
       
   223 
       
   224     /**
       
   225      * Set character data
       
   226      *
       
   227      * @since Series 60 3.1
       
   228      * @param aData Character data
       
   229      */
       
   230     void SetPCDataL( const TDesC8& aData );
       
   231 
       
   232     /**
       
   233      * Get character data
       
   234      *
       
   235      * @since Series 60 3.1
       
   236      * @return Character data
       
   237      */
       
   238     const TDesC8& GetPCData();
       
   239 
       
   240     /**
       
   241      * Set a property.
       
   242      *
       
   243      * The list will assume ownership of the property.
       
   244      * If an equal property is already in the list, it will be replaced
       
   245      * with the new property and the old property will be destroyed.
       
   246      * @since Series 60 3.1
       
   247      * @param aProperty Property to set.
       
   248      * @param aNotify Boolean flag indicating whether notifications should be
       
   249      *        sent
       
   250      */
       
   251     void SetPropertyL( CXnProperty* aProperty, TBool aNotify = ETrue );
       
   252 
       
   253     /**
       
   254      * Set a property without notification being sent.
       
   255      *
       
   256      * @see SetPropertyL
       
   257      * @param aProperty Property to set.
       
   258      */
       
   259     void SetPropertyWithoutNotificationL( CXnProperty* aProperty );
       
   260 
       
   261     /**
       
   262      * Set a property NOT replacing an equal property if already in the list.
       
   263      *
       
   264      * @see SetPropertyL
       
   265      * @param aProperty Property to set.
       
   266      */
       
   267     void InitializePropertyL( CXnProperty* aProperty );
       
   268 
       
   269     /**
       
   270      * Set an array of properties.
       
   271      *
       
   272      * Improves the performance when many properties need to be
       
   273      * set e.g. in construction phase.
       
   274      * The list will assume ownership of the property.
       
   275      * If an equal property is already in the list, it will be
       
   276      * replaced with the new property and the old property will be destroyed.
       
   277      * @see SetPropertyL
       
   278      */
       
   279     void SetPropertyArrayL( RPointerArray< CXnProperty >& aPropertyArray );
       
   280 
       
   281     /**
       
   282      * Gets a property.
       
   283      *
       
   284      * The list will retain ownership of the property,
       
   285      * the caller must not destroy the property. The returned pointer will
       
   286      * become invalid if the property is replaced in the list by a subsequent
       
   287      * SetL().
       
   288      * @since Series 60 3.1
       
   289      * @param aKey Property name
       
   290      * @return The property mapped to the key or NULL if not found.
       
   291      */
       
   292     CXnProperty* GetPropertyL( const TDesC8& aKey );
       
   293 
       
   294     /**
       
   295      * Set a state
       
   296      *
       
   297      * @since Series 60 3.1
       
   298      * @param aState State to set
       
   299      * @param aSource A source that triggered this event     
       
   300      */
       
   301     void SetStateL( const TDesC8& aState, TInt aSource );
       
   302 
       
   303     /**
       
   304      * Check whether a state is set
       
   305      *
       
   306      * @since Series 60 3.1
       
   307      * @return ETrue if set, EFalse if not
       
   308      */
       
   309     TBool IsStateSet( const TDesC8& aState );
       
   310 
       
   311     /**
       
   312      * Set a state without performing notifications and re-rendering
       
   313      *
       
   314      * @since Series 60 3.1
       
   315      * @param aState State to set
       
   316      */
       
   317     void SetStateWithoutNotificationL( const TDesC8& aState );
       
   318 
       
   319     /**
       
   320      * Unset a state
       
   321      *
       
   322      * @since Series 60 3.1
       
   323      * @param aState State to unset.
       
   324      */
       
   325     void UnsetStateL( const TDesC8& aState );
       
   326 
       
   327     /**
       
   328      * Get node type
       
   329      *
       
   330      * @since Series 60 3.1
       
   331      * @return Node type
       
   332      */
       
   333     CXnType* Type();
       
   334 
       
   335     /**
       
   336      * Returns the parent. The ownership is not transferred.
       
   337      *      
       
   338      * @since Series 60 3.1
       
   339      * @return The parent area, NULL if not set.
       
   340      */
       
   341     CXnNode* Parent() const;
       
   342 
       
   343     /**
       
   344      * Sets the parent.
       
   345      *
       
   346      * @since Series 60 3.1
       
   347      * @param aParent Parent area
       
   348      */
       
   349     void SetParent( CXnNode& aParent );
       
   350 
       
   351     /**
       
   352      * Adds a child node. Assumes ownership of the node.
       
   353      *
       
   354      * @since Series 60 3.1
       
   355      * @param aChild Child to be added
       
   356      * @exception KXnErrAddChildToAreaFailed Adding child failed.
       
   357      */
       
   358     void AddChildL( CXnNode* aChild );
       
   359 
       
   360     /**
       
   361      * Get child nodes.
       
   362      *
       
   363      * @since Series 60 3.1
       
   364      * @return Child nodes
       
   365      */
       
   366     RPointerArray< CXnNode >& Children();
       
   367 
       
   368     /**
       
   369      * Set whether the node is dropped from layout
       
   370      *
       
   371      * @since Series 60 3.1
       
   372      * @param aDropped Flag indicating whether the node is dropped from layout
       
   373      */
       
   374     void SetDropped( const TInt aDropped );
       
   375 
       
   376     /**
       
   377      * Get whether the node is dropped from layout
       
   378      *
       
   379      * @since Series 60 3.1
       
   380      * @return Flag indicating whether the node is dropped from layout
       
   381      */
       
   382     TInt IsDropped() const;
       
   383 
       
   384     /**
       
   385      * Set layout capability
       
   386      *
       
   387      * @since Series 60 3.1
       
   388      * @param aLayoutCapable Layout capability
       
   389      */
       
   390     void SetLayoutCapable( const TBool aLayoutCapable );
       
   391 
       
   392     /**
       
   393      * Get layout capability
       
   394      *
       
   395      * @since Series 60 3.1
       
   396      * @return Layout capability
       
   397      */
       
   398     TBool IsLayoutCapable() const;
       
   399 
       
   400     /**
       
   401      * Set node rendered, which means it will not be rendered again until its
       
   402      * properties, states or rects change
       
   403      *
       
   404      * @since Series 60 3.1
       
   405      */
       
   406     void SetRenderedL();
       
   407 
       
   408     /**
       
   409      * Set node laid out, which means it will not be laid out again until its
       
   410      * properties, states or rects change
       
   411      *
       
   412      * @since Series 60 3.1
       
   413      */
       
   414     void SetLaidOutL();
       
   415 
       
   416     /**
       
   417      * Get layout state
       
   418      *
       
   419      * @since Series 60 3.1
       
   420      * @return Layout state
       
   421      */
       
   422     TBool IsLaidOut() const;
       
   423 
       
   424     /**
       
   425      * Set node not rendered and not laid out
       
   426      *
       
   427      * @since Series 60 3.1
       
   428      */
       
   429     void ClearRenderedAndLaidOut();
       
   430 
       
   431     /**
       
   432      * Create a component interface according to the given type.
       
   433      *
       
   434      * This must be virtual because CXnComponentNodeImpl inherits this.
       
   435      * @param aType Type of the interface to create
       
   436      * @return Created interface or NULL if the provided type is not supported.
       
   437      */
       
   438     virtual XnComponentInterface::MXnComponentInterface* MakeInterfaceL(
       
   439         const TDesC8& aType );
       
   440 
       
   441     /**
       
   442      * Get property as indicated by method name.
       
   443      *
       
   444      * @see GetPropertyL
       
   445      * @return The property mapped to the key or NULL if not found.
       
   446      */
       
   447     CXnProperty* WidthL();
       
   448 
       
   449     /**
       
   450      * Get property as indicated by method name.
       
   451      *
       
   452      * @see GetPropertyL
       
   453      * @return The property mapped to the key or NULL if not found.
       
   454      */
       
   455     CXnProperty* HeightL();
       
   456 
       
   457     /**
       
   458      * Get property as indicated by method name.
       
   459      *
       
   460      * @see GetPropertyL
       
   461      * @return The property mapped to the key or NULL if not found.
       
   462      */
       
   463     CXnProperty* MarginLeftL();
       
   464 
       
   465     /**
       
   466      * Get property as indicated by method name.
       
   467      *
       
   468      * @see GetPropertyL
       
   469      * @return The property mapped to the key or NULL if not found.
       
   470      */
       
   471     CXnProperty* MarginRightL();
       
   472 
       
   473     /**
       
   474      * Get property as indicated by method name.
       
   475      *
       
   476      * @see GetPropertyL
       
   477      * @return The property mapped to the key or NULL if not found.
       
   478      */
       
   479     CXnProperty* BorderLeftL();
       
   480 
       
   481     /**
       
   482      * Get property as indicated by method name.
       
   483      *
       
   484      * @see GetPropertyL
       
   485      * @return The property mapped to the key or NULL if not found.
       
   486      */
       
   487     CXnProperty* BorderRightL();
       
   488 
       
   489     /**
       
   490      * Get property as indicated by method name.
       
   491      *
       
   492      * @see GetPropertyL
       
   493      * @return The property mapped to the key or NULL if not found.
       
   494      */
       
   495     CXnProperty* PaddingLeftL();
       
   496 
       
   497     /**
       
   498      * Get property as indicated by method name.
       
   499      *
       
   500      * @see GetPropertyL
       
   501      * @return The property mapped to the key or NULL if not found.
       
   502      */
       
   503     CXnProperty* PaddingRightL();
       
   504 
       
   505     /**
       
   506      * Get property as indicated by method name.
       
   507      *
       
   508      * @see GetPropertyL
       
   509      * @return The property mapped to the key or NULL if not found.
       
   510      */
       
   511     CXnProperty* MarginTopL();
       
   512 
       
   513     /**
       
   514      * Get property as indicated by method name.
       
   515      *
       
   516      * @see GetPropertyL
       
   517      * @return The property mapped to the key or NULL if not found.
       
   518      */
       
   519     CXnProperty* MarginBottomL();
       
   520 
       
   521     /**
       
   522      * Get property as indicated by method name.
       
   523      *
       
   524      * @see GetPropertyL
       
   525      * @return The property mapped to the key or NULL if not found.
       
   526      */
       
   527     CXnProperty* BorderTopL();
       
   528 
       
   529     /**
       
   530      * Get property as indicated by method name.
       
   531      *
       
   532      * @see GetPropertyL
       
   533      * @return The property mapped to the key or NULL if not found.
       
   534      */
       
   535     CXnProperty* BorderBottomL();
       
   536 
       
   537     /**
       
   538      * Get property as indicated by method name.
       
   539      *
       
   540      * @see GetPropertyL
       
   541      * @return The property mapped to the key or NULL if not found.
       
   542      */
       
   543     CXnProperty* PaddingTopL();
       
   544 
       
   545     /**
       
   546      * Get property as indicated by method name.
       
   547      *
       
   548      * @see GetPropertyL
       
   549      * @return The property mapped to the key or NULL if not found.
       
   550      */
       
   551     CXnProperty* PaddingBottomL();
       
   552 
       
   553     /**
       
   554      * Get property as indicated by method name.
       
   555      *
       
   556      * @see GetPropertyL
       
   557      * @return The property mapped to the key or NULL if not found.
       
   558      */
       
   559     CXnProperty* BorderWidthL();
       
   560 
       
   561     /**
       
   562      * Get property as indicated by method name.
       
   563      *
       
   564      * @see GetPropertyL
       
   565      * @return The property mapped to the key or NULL if not found.
       
   566      */
       
   567     CXnProperty* BlockProgressionL();
       
   568 
       
   569     /**
       
   570      * Get property as indicated by method name.
       
   571      *
       
   572      * @see GetPropertyL
       
   573      * @return The property mapped to the key or NULL if not found.
       
   574      */
       
   575     CXnProperty* DirectionL();
       
   576 
       
   577     /**
       
   578      * Get property as indicated by method name.
       
   579      *
       
   580      * @see GetPropertyL
       
   581      * @return The property mapped to the key or NULL if not found.
       
   582      */
       
   583     CXnProperty* PositionL();
       
   584 
       
   585     /**
       
   586      * Get property as indicated by method name.
       
   587      *
       
   588      * @see GetPropertyL
       
   589      * @return The property mapped to the key or NULL if not found.
       
   590      */
       
   591     CXnProperty* MaxHeightL();
       
   592 
       
   593     /**
       
   594      * Get property as indicated by method name.
       
   595      *
       
   596      * @see GetPropertyL
       
   597      * @return The property mapped to the key or NULL if not found.
       
   598      */
       
   599     CXnProperty* MinHeightL();
       
   600 
       
   601     /**
       
   602      * Get property as indicated by method name.
       
   603      *
       
   604      * @see GetPropertyL
       
   605      * @return The property mapped to the key or NULL if not found.
       
   606      */
       
   607     CXnProperty* MaxWidthL();
       
   608 
       
   609     /**
       
   610      * Get property as indicated by method name.
       
   611      *
       
   612      * @see GetPropertyL
       
   613      * @return The property mapped to the key or NULL if not found.
       
   614      */
       
   615     CXnProperty* MinWidthL();
       
   616 
       
   617     /**
       
   618      * Get property as indicated by method name.
       
   619      *
       
   620      * @see GetPropertyL
       
   621      * @return The property mapped to the key or NULL if not found.
       
   622      */
       
   623     CXnProperty* DisplayL();
       
   624 
       
   625     /**
       
   626      * Get property as indicated by method name.
       
   627      *
       
   628      * @see GetPropertyL
       
   629      * @return The property mapped to the key or NULL if not found.
       
   630      */
       
   631     CXnProperty* VisibilityL();
       
   632 
       
   633     /**
       
   634      * Get property as indicated by method name.
       
   635      *
       
   636      * @see GetPropertyL
       
   637      * @return The property mapped to the key or NULL if not found.
       
   638      */
       
   639     CXnProperty* LeftL();
       
   640 
       
   641     /**
       
   642      * Get property as indicated by method name.
       
   643      *
       
   644      * @see GetPropertyL
       
   645      * @return The property mapped to the key or NULL if not found.
       
   646      */
       
   647     CXnProperty* RightL();
       
   648 
       
   649     /**
       
   650      * Get property as indicated by method name.
       
   651      *
       
   652      * @see GetPropertyL
       
   653      * @return The property mapped to the key or NULL if not found.
       
   654      */
       
   655     CXnProperty* TopL();
       
   656 
       
   657     /**
       
   658      * Get property as indicated by method name.
       
   659      *
       
   660      * @see GetPropertyL
       
   661      * @return The property mapped to the key or NULL if not found.
       
   662      */
       
   663     CXnProperty* BottomL();
       
   664 
       
   665     /**
       
   666      * Get property as indicated by method name.
       
   667      *
       
   668      * @see GetPropertyL
       
   669      * @return The property mapped to the key or NULL if not found.
       
   670      */
       
   671     CXnProperty* BorderLeftStyleL();
       
   672 
       
   673     /**
       
   674      * Get property as indicated by method name.
       
   675      *
       
   676      * @see GetPropertyL
       
   677      * @return The property mapped to the key or NULL if not found.
       
   678      */
       
   679     CXnProperty* BorderRightStyleL();
       
   680 
       
   681     /**
       
   682      * Get property as indicated by method name.
       
   683      *
       
   684      * @see GetPropertyL
       
   685      * @return The property mapped to the key or NULL if not found.
       
   686      */
       
   687     CXnProperty* BorderTopStyleL();
       
   688 
       
   689     /**
       
   690      * Get property as indicated by method name.
       
   691      *
       
   692      * @see GetPropertyL
       
   693      * @return The property mapped to the key or NULL if not found.
       
   694      */
       
   695     CXnProperty* BorderBottomStyleL();
       
   696 
       
   697     /**
       
   698      * Get property as indicated by method name.
       
   699      *
       
   700      * @see GetPropertyL
       
   701      * @return The property mapped to the key or NULL if not found.
       
   702      */
       
   703     CXnProperty* BorderStyleL();
       
   704 
       
   705     /**
       
   706      * Get property as indicated by method name.
       
   707      *
       
   708      * @see GetPropertyL
       
   709      * @return The property mapped to the key or NULL if not found.
       
   710      */
       
   711     CXnProperty* BorderImageL();
       
   712 
       
   713     /**
       
   714      * Get property as indicated by method name.
       
   715      *
       
   716      * @see GetPropertyL
       
   717      * @return The property mapped to the key or NULL if not found.
       
   718      */
       
   719     CXnProperty* DisplayPriorityL();
       
   720 
       
   721     /**
       
   722      * Get property as indicated by method name.
       
   723      *
       
   724      * @see GetPropertyL
       
   725      * @return The property mapped to the key or NULL if not found.
       
   726      */
       
   727     CXnProperty* NameL();
       
   728 
       
   729     /**
       
   730      * Get property as indicated by method name.
       
   731      *
       
   732      * @see GetPropertyL
       
   733      * @return The property mapped to the key or NULL if not found.
       
   734      */
       
   735     CXnProperty* ValueL();
       
   736 
       
   737     /**
       
   738      * Get property as indicated by method name.
       
   739      *
       
   740      * @see GetPropertyL
       
   741      * @return The property mapped to the key or NULL if not found.
       
   742      */
       
   743     CXnProperty* LabelL();
       
   744 
       
   745     /**
       
   746      * Get property as indicated by method name.
       
   747      *
       
   748      * @see GetPropertyL
       
   749      * @return The property mapped to the key or NULL if not found.
       
   750      */
       
   751     CXnProperty* InitialFocusL();
       
   752 
       
   753     /**
       
   754      * Get property as indicated by method name.
       
   755      *
       
   756      * @see GetPropertyL
       
   757      * @return The property mapped to the key or NULL if not found.
       
   758      */
       
   759     CXnProperty* ClassL();
       
   760 
       
   761     /**
       
   762      * Get property as indicated by method name.
       
   763      *
       
   764      * @see GetPropertyL
       
   765      * @return The property mapped to the key or NULL if not found.
       
   766      */
       
   767     CXnProperty* IdL();
       
   768 
       
   769     /**
       
   770      * Get property as indicated by method name.
       
   771      *
       
   772      * @see GetPropertyL
       
   773      * @return The property mapped to the key or NULL if not found.
       
   774      */
       
   775     CXnProperty* PathL();
       
   776 
       
   777     /**
       
   778      * Get property as indicated by method name.
       
   779      *
       
   780      * @see GetPropertyL
       
   781      * @return The property mapped to the key or NULL if not found.
       
   782      */
       
   783     CXnProperty* MaskPathL();
       
   784 
       
   785     /**
       
   786      * Get property as indicated by method name.
       
   787      *
       
   788      * @see GetPropertyL
       
   789      * @return The property mapped to the key or NULL if not found.
       
   790      */
       
   791     CXnProperty* NavIndexL();
       
   792 
       
   793     /**
       
   794      * Get property as indicated by method name.
       
   795      *
       
   796      * @see GetPropertyL
       
   797      * @return The property mapped to the key or NULL if not found.
       
   798      */
       
   799     CXnProperty* ZIndexL();
       
   800 
       
   801     /**
       
   802      * Get property as indicated by method name.
       
   803      *
       
   804      * @see GetPropertyL
       
   805      * @return The property mapped to the key or NULL if not found.
       
   806      */
       
   807     CXnProperty* BackgroundColorL();
       
   808 
       
   809     /**
       
   810      * Get property as indicated by method name.
       
   811      *
       
   812      * @see GetPropertyL
       
   813      * @return The property mapped to the key or NULL if not found.
       
   814      */
       
   815     CXnProperty* FocusBackgroundL();
       
   816 
       
   817     /**
       
   818      * Get property as indicated by method name.
       
   819      *
       
   820      * @see GetPropertyL
       
   821      * @return The property mapped to the key or NULL if not found.
       
   822      */
       
   823     CXnProperty* BackgroundImageL();
       
   824 
       
   825     /**
       
   826      * Sets the pointer of DOM node
       
   827      *
       
   828      * @since S60 3.1
       
   829      * @param aDomNode Corresponding DOM node
       
   830      */
       
   831     void SetDomNode( CXnDomNode* aDomNode );
       
   832 
       
   833     /**
       
   834      * Returns pointer to associated DOM node.
       
   835      *
       
   836      * @since S60 3.1
       
   837      * @return Pointer to DOM node
       
   838      */
       
   839     CXnDomNode* DomNode();
       
   840 
       
   841     /**
       
   842      * Measures the adaptive content dimensions.
       
   843      *
       
   844      * @since Series 60 3.2
       
   845      * @param aAvailableSize A size where adaptive content must fit
       
   846      * @return the content dimensions
       
   847      */
       
   848     TSize MeasureAdaptiveContentL( const TSize& aAvailableSize );
       
   849 
       
   850     /**
       
   851      * Checks if the node has adaptive content.
       
   852      *
       
   853      * @since Series 60 3.2
       
   854      * @return adaptive state (none, width/height or both)
       
   855      */
       
   856     TInt IsAdaptive(  TBool aIgnoreSizeFixed = EFalse ) const;
       
   857 
       
   858     /**
       
   859      * Set node's content based state (none, width, height, or both).
       
   860      *
       
   861      * @since Series 60 3.2
       
   862      * @param aAdaptive state (none, width/height or both)
       
   863      */
       
   864     void SetAdaptiveL( const TInt aAdaptive );
       
   865 
       
   866     /**
       
   867      * Set fixed size to adaptive node
       
   868      *
       
   869      * @since Series 60 3.2
       
   870      * @param aFixedSize the node's size determined by layout algorithm
       
   871      */
       
   872     void FixAdaptiveSizeL( const TSize& aFixedSize );
       
   873 
       
   874     /**
       
   875      * Marks node as dirty, adds it to UiEngine's dirty list and
       
   876      * clears rendered and laidout from the node and its children.
       
   877      *
       
   878      * @since S60 3.2
       
   879      */
       
   880     void SetDirtyL( TInt aLevel = XnDirtyLevel::ELayoutAndRender, 
       
   881         TBool aDisplayedState = EFalse );
       
   882 
       
   883     /**
       
   884      * Focuses first focusable node from the focus candidate array
       
   885      */
       
   886     TBool RunFocusChangeL( RPointerArray< CXnNode >& aFocusCandidates );
       
   887 
       
   888     /**
       
   889      * Change the order of the nodes. This is for drag and drop.
       
   890      */
       
   891     void ReorderNodesL( CXnNode* aSource, CXnNode* aTarget );
       
   892 
       
   893     /**
       
   894      * Find next node located aDirection from aNode.
       
   895      */
       
   896     CXnNode* FindNextNodeL(
       
   897         RPointerArray< CXnNode >& aArray,
       
   898         CXnNode& aNode,
       
   899         TInt aDirection );
       
   900 
       
   901     /**
       
   902      * Gets namespace of node
       
   903      */
       
   904     const TDesC8& Namespace();
       
   905 
       
   906     /**
       
   907      * Sets scrollable control
       
   908      */
       
   909     void SetScrollableControl( CXnScrollableControlAdapter* aScrollableControl );
       
   910 
       
   911     /**
       
   912      * Gets scrollable control.
       
   913      */
       
   914     CXnScrollableControlAdapter* ScrollableControl();
       
   915             
       
   916 private:
       
   917 
       
   918     TInt DoSetPropertyL( CXnProperty* aPropery );
       
   919     TRect AdjustRectIfNeeded( TRect aRect );
       
   920 
       
   921 protected:
       
   922     /**
       
   923      * C++ default constructor.
       
   924      */
       
   925     CXnNodeImpl();
       
   926 
       
   927     /**
       
   928      * Two-phased constructor.
       
   929      */
       
   930     void ConstructL( CXnType* aType );
       
   931 
       
   932 private:
       
   933     // Data
       
   934 
       
   935     /**
       
   936      * Component type.
       
   937      * Own.
       
   938      */
       
   939     CXnType* iType;
       
   940 
       
   941     /**
       
   942      * Pointer to property list.
       
   943      * Own.
       
   944      */
       
   945     CXnPropertyList* iPropertyList;
       
   946 
       
   947     /**
       
   948      * Pointer to parent node.
       
   949      * Not own.
       
   950      */
       
   951     CXnNode* iParent;
       
   952 
       
   953     /**
       
   954      * Pointer to node.
       
   955      * Not own.
       
   956      */
       
   957     CXnNode* iNode;
       
   958 
       
   959     /**
       
   960      * Content rect.
       
   961      */
       
   962     TRect iRect;
       
   963 
       
   964     /**
       
   965      * Border rect.
       
   966      */
       
   967     TRect iBorderRect;
       
   968 
       
   969     /**
       
   970      * Border rect according to normal flow
       
   971      */
       
   972     TRect iNormalFlowBorderRect;
       
   973 
       
   974     /**
       
   975      * Margin rect
       
   976      */
       
   977     TRect iMarginRect;
       
   978 
       
   979     /**
       
   980      * Padding rect
       
   981      */
       
   982     TRect iPaddingRect;
       
   983 
       
   984     /**
       
   985      * Is node dropped from layout
       
   986      */
       
   987     TInt iDropped;
       
   988 
       
   989     /**
       
   990      * Does node support layout
       
   991      */
       
   992     TBool iLayoutCapable;
       
   993 
       
   994     /**
       
   995      * Children of this node
       
   996      */
       
   997     RPointerArray< CXnNode > iChildren;
       
   998 
       
   999     /**
       
  1000      * UI engine.
       
  1001      * Not own.
       
  1002      */
       
  1003     CXnUiEngine* iUiEngine;
       
  1004 
       
  1005     /**
       
  1006      * Flag indicating render status
       
  1007      */
       
  1008     TBool iRendered;
       
  1009 
       
  1010     /**
       
  1011      * Flag indicating layout status
       
  1012      */
       
  1013     TBool iLaidOut;
       
  1014 
       
  1015     /**
       
  1016      * Array containing list of pseudo classes that have class-specific properties
       
  1017      */
       
  1018     RArray< CXnDomProperty::TPseudoClass > iPropertyPseudoClasses;
       
  1019 
       
  1020     /**
       
  1021      * Array containing list of pseudo classes that have a state set
       
  1022      *
       
  1023      * @see SetStateL
       
  1024      */
       
  1025     RArray< CXnDomProperty::TPseudoClass > iStates;
       
  1026 
       
  1027     /**
       
  1028      * Local cache for property with name KName.
       
  1029      * Not own.
       
  1030      */
       
  1031     CXnProperty* iName;
       
  1032 
       
  1033     /**
       
  1034      * Local cache for property with name KValue.
       
  1035      * Not own.
       
  1036      */
       
  1037     CXnProperty* iValue;
       
  1038 
       
  1039     /**
       
  1040      * Local cache for property with name KLabel.
       
  1041      * Not own.
       
  1042      */
       
  1043     CXnProperty* iLabel;
       
  1044 
       
  1045     /**
       
  1046      * Local cache for property with name KInitialFocus.
       
  1047      * Not own.
       
  1048      */
       
  1049     CXnProperty* iInitialFocus;
       
  1050 
       
  1051     /**
       
  1052      * Local cache for property with name KClass.
       
  1053      * Not own.
       
  1054      */
       
  1055     CXnProperty* iClass;
       
  1056 
       
  1057     /**
       
  1058      * Local cache for property with name KId.
       
  1059      * Not own.
       
  1060      */
       
  1061     CXnProperty* iId;
       
  1062 
       
  1063     /**
       
  1064      * Local cache for property with name KPath.
       
  1065      * Not own.
       
  1066      */
       
  1067     CXnProperty* iPath;
       
  1068 
       
  1069     /**
       
  1070      * Local cache for property with name KMaskPath.
       
  1071      * Not own.
       
  1072      */
       
  1073     CXnProperty* iMaskPath;
       
  1074 
       
  1075     /**
       
  1076      * Local property cache.
       
  1077      * Own.
       
  1078      */
       
  1079     CLayoutPropertyCache* iLayoutPropertyCache;
       
  1080 
       
  1081     /**
       
  1082      * Flag indicating tooltip handling status
       
  1083      */
       
  1084     TBool iHandleTooltip;
       
  1085 
       
  1086     /**
       
  1087      * Pointer to corresponding node in the DOM tree.
       
  1088      * Not own.
       
  1089      */
       
  1090     CXnDomNode* iDomNode;
       
  1091 
       
  1092     /**
       
  1093      * Pointer to scrollable control adapter
       
  1094      * Not own.
       
  1095      */
       
  1096     CXnScrollableControlAdapter* iScrollableControl;
       
  1097     
       
  1098     /**    
       
  1099      * States, if the nodes width, height or both are content based.
       
  1100      */
       
  1101     TInt iAdaptive;
       
  1102 
       
  1103     };
       
  1104 
       
  1105 #endif