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