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