idlehomescreen/xmluirendering/uiengine/src/xnuiengineimpl.cpp
branchRCL_3
changeset 9 f966699dea19
parent 5 c743ef5928ba
child 15 ff572dfe6d86
equal deleted inserted replaced
5:c743ef5928ba 9:f966699dea19
    19 // System includes
    19 // System includes
    20 #include <utf.h>
    20 #include <utf.h>
    21 #include <eikapp.h>
    21 #include <eikapp.h>
    22 #include <AknUtils.h>
    22 #include <AknUtils.h>
    23 #include <layoutmetadata.cdl.h>
    23 #include <layoutmetadata.cdl.h>
       
    24 #include <aknpriv.hrh> 
    24 
    25 
    25 // User includes
    26 // User includes
    26 #include "xnuiengine.h"
    27 #include "xnuiengine.h"
    27 #include "xnuiengineimpl.h"
    28 #include "xnuiengineimpl.h"
    28 #include "xnuistatelistener.h"
    29 #include "xnuistatelistener.h"
    52 #include "xnnode.h"
    53 #include "xnnode.h"
    53 #include "xnpanic.h"
    54 #include "xnpanic.h"
    54 #include "xneffectmanager.h"
    55 #include "xneffectmanager.h"
    55 #include "xneditor.h"
    56 #include "xneditor.h"
    56 #include "xnbackgroundmanager.h"
    57 #include "xnbackgroundmanager.h"
       
    58 #include "xntexteditor.h"
    57 
    59 
    58 #ifdef _XN_PERFORMANCE_TEST_
    60 #ifdef _XN_PERFORMANCE_TEST_
    59 #include "xntimemon.h"
    61 #include "xntimemon.h"
    60 #endif
    62 #endif
    61 
    63 
   280 #ifdef _XN3_DEBUG_
   282 #ifdef _XN3_DEBUG_
   281 static void TraceTreeL( CXnNode* aRootNode );
   283 static void TraceTreeL( CXnNode* aRootNode );
   282 #endif
   284 #endif
   283 
   285 
   284 // ============================= LOCAL FUNCTIONS ===============================
   286 // ============================= LOCAL FUNCTIONS ===============================
       
   287 
       
   288 // -----------------------------------------------------------------------------
       
   289 // -----------------------------------------------------------------------------
       
   290 //
       
   291 CXnNode* FindPlugin( CXnNode& aNode )
       
   292     {
       
   293     CXnNode* pluginNode( NULL );
       
   294     for( CXnNode* node = &aNode; node; node = node->Parent() )
       
   295         {
       
   296         if( node->DomNode()->Name() == KPlugin )
       
   297             {
       
   298             pluginNode = node;
       
   299             break;
       
   300             }
       
   301         }
       
   302     return pluginNode;
       
   303     }
       
   304 
   285 // -----------------------------------------------------------------------------
   305 // -----------------------------------------------------------------------------
   286 // GrowIfNeeded()
   306 // GrowIfNeeded()
   287 // When a plugin is focused, the focus is a bit bigger than its control 
   307 // When a plugin is focused, the focus is a bit bigger than its control 
   288 // (this is a hack fix to get focus visible with WRT widgets).
   308 // (this is a hack fix to get focus visible with WRT widgets).
   289 // Therefore we need to check if focused node is a plugin, 
   309 // Therefore we need to check if focused node is a plugin, 
  8126     
  8146     
  8127     iViewManager.RemoveObserver( *this );
  8147     iViewManager.RemoveObserver( *this );
  8128            
  8148            
  8129     delete iEditMode;
  8149     delete iEditMode;
  8130     delete iHitTest;
  8150     delete iHitTest;
       
  8151     delete iSplitScreenState.iPartialScreenBlock;
  8131 
  8152 
  8132     iFocusCandidateList.Reset();
  8153     iFocusCandidateList.Reset();
  8133     iRedrawRegions.ResetAndDestroy();
  8154     iRedrawRegions.ResetAndDestroy();
  8134     iDirtyList.Reset();
  8155     iDirtyList.Reset();
  8135     }
  8156     }
  8393         redrawRegion.Clear();  
  8414         redrawRegion.Clear();  
  8394         }
  8415         }
  8395 
  8416 
  8396     RefreshMenuL();
  8417     RefreshMenuL();
  8397 
  8418 
  8398     if ( iLayoutControl & XnLayoutControl::EFirstPassDraw )
       
  8399         {
       
  8400         iViewManager.SetFirstPassDrawCompleteL();
       
  8401         iLayoutControl &= ~XnLayoutControl::EFirstPassDraw;
       
  8402         }
       
  8403 
       
  8404     iLayoutControl &= ~XnLayoutControl::ERenderUI;
  8419     iLayoutControl &= ~XnLayoutControl::ERenderUI;
  8405     
  8420     
  8406     iAppUiAdapter.EffectManager()->UiRendered();
  8421     iAppUiAdapter.EffectManager()->UiRendered();
  8407     }
  8422     }
  8408 
  8423 
  8559     iCurrentView = iViewManager.ViewNode();
  8574     iCurrentView = iViewManager.ViewNode();
  8560 
  8575 
  8561     iControlAdapterList = &iViewManager.Controls();
  8576     iControlAdapterList = &iViewManager.Controls();
  8562     iCurrentViewControlAdapter = iCurrentView->Control();
  8577     iCurrentViewControlAdapter = iCurrentView->Control();
  8563     
  8578     
  8564     iLayoutControl |= XnLayoutControl::EFirstPassDraw;
       
  8565 
       
  8566     iDirtyList.Reset();
  8579     iDirtyList.Reset();
  8567 
  8580 
  8568     iRedrawRegions.ResetAndDestroy();
  8581     iRedrawRegions.ResetAndDestroy();
  8569     
  8582     
  8570     // Set status pane layout
  8583     // Set status pane layout
  8637 // -----------------------------------------------------------------------------
  8650 // -----------------------------------------------------------------------------
  8638 //
  8651 //
  8639 void CXnUiEngineImpl::NotifyWidgetAdditionL(
  8652 void CXnUiEngineImpl::NotifyWidgetAdditionL(
  8640     const CXnPluginData& /*aPluginData*/ )
  8653     const CXnPluginData& /*aPluginData*/ )
  8641     {
  8654     {
  8642     iLayoutControl |= XnLayoutControl::EFirstPassDraw;
       
  8643     }
  8655     }
  8644 
  8656 
  8645 // -----------------------------------------------------------------------------
  8657 // -----------------------------------------------------------------------------
  8646 // CXnUiEngineImpl::DynInitMenuItemL()
  8658 // CXnUiEngineImpl::DynInitMenuItemL()
  8647 // -----------------------------------------------------------------------------
  8659 // -----------------------------------------------------------------------------
  8914 // CXnUiEngineImpl::HandleResourceChangeL
  8926 // CXnUiEngineImpl::HandleResourceChangeL
  8915 // Handles a change to the control's resources of type aType
  8927 // Handles a change to the control's resources of type aType
  8916 // -----------------------------------------------------------------------------
  8928 // -----------------------------------------------------------------------------
  8917 //
  8929 //
  8918 void CXnUiEngineImpl::HandleResourceChangeL( TInt aType )
  8930 void CXnUiEngineImpl::HandleResourceChangeL( TInt aType )
  8919     {    
  8931     {
       
  8932     
       
  8933     if ( aType == KAknSplitInputEnabled ) 
       
  8934         {
       
  8935         if(!iSplitScreenState.isPartialScreenEnabled )
       
  8936             {
       
  8937             DisableRenderUiLC();
       
  8938             HandlePartialTouchInputL( aType );
       
  8939             RootNode()->SetDirtyL();
       
  8940             CleanupStack::PopAndDestroy();
       
  8941             }
       
  8942         }    
       
  8943     
       
  8944      if ( aType == KAknSplitInputDisabled ) 
       
  8945         {
       
  8946         if( iSplitScreenState.isPartialScreenEnabled )    
       
  8947             {
       
  8948             DisableRenderUiLC();
       
  8949             HandlePartialTouchInputL( aType );
       
  8950             RootNode()->SetDirtyL();
       
  8951             CleanupStack::PopAndDestroy();        
       
  8952             }
       
  8953         }    
       
  8954 
  8920     if ( iMenuNode )
  8955     if ( iMenuNode )
  8921         {
  8956         {
  8922         CXnControlAdapter* adapter( iMenuNode->Control() );
  8957         CXnControlAdapter* adapter( iMenuNode->Control() );
  8923         
  8958         
  8924         if ( adapter )
  8959         if ( adapter )
  9512     {
  9547     {
  9513     return *iHitTest;
  9548     return *iHitTest;
  9514     }
  9549     }
  9515 
  9550 
  9516 // -----------------------------------------------------------------------------
  9551 // -----------------------------------------------------------------------------
  9517 // CXnUiEngineImpl::PositionStylusPopupL
       
  9518 // -----------------------------------------------------------------------------
       
  9519 //
       
  9520 void CXnUiEngineImpl::PositionStylusPopupL( CXnNode& aNode,
       
  9521     CXnNode& aReference, const TPoint& aPosition )
       
  9522     {
       
  9523     CXnDomStringPool* sp( aNode.DomNode()->StringPool() );
       
  9524     TXnDirtyRegion* dirtyRegion = FindDirtyRegionL( *iCurrentView );
       
  9525     RRegion region;
       
  9526     region.Copy( dirtyRegion->iRegion );    
       
  9527     CleanupClosePushL( region );
       
  9528 
       
  9529     // Set initial position to (0, 0) to calculate popup metrics
       
  9530     CXnProperty* top = CXnProperty::NewL(
       
  9531         XnPropertyNames::style::common::KTop, 0,
       
  9532         CXnDomPropertyValue::EPx, *sp );
       
  9533     CleanupStack::PushL( top );
       
  9534     aNode.SetPropertyL( top );
       
  9535     CleanupStack::Pop( top );
       
  9536     top = NULL;
       
  9537     CXnProperty* left = CXnProperty::NewL(
       
  9538         XnPropertyNames::style::common::KLeft, 0,
       
  9539         CXnDomPropertyValue::EPx, *sp );
       
  9540     CleanupStack::PushL( left );
       
  9541     aNode.SetPropertyL( left );
       
  9542     CleanupStack::Pop( left );
       
  9543     left = NULL;
       
  9544 
       
  9545     // Make it visible
       
  9546     CXnProperty* display = CXnProperty::NewL(
       
  9547         XnPropertyNames::style::common::KDisplay,
       
  9548         XnPropertyNames::style::common::display::KBlock,
       
  9549         CXnDomPropertyValue::EString, *sp );
       
  9550     CleanupStack::PushL( display );
       
  9551     aNode.SetPropertyL( display );
       
  9552     CleanupStack::Pop( display );
       
  9553 
       
  9554     if ( !aNode.IsLaidOut() || !aReference.IsLaidOut() )
       
  9555         {
       
  9556         ForceRenderUIL( ETrue );
       
  9557         }
       
  9558 
       
  9559     if ( !aNode.IsLaidOut() || !aReference.IsLaidOut() )
       
  9560         {
       
  9561         // Something went wrong
       
  9562         CleanupStack::PopAndDestroy( &region );
       
  9563 
       
  9564         return;
       
  9565         }
       
  9566 
       
  9567     TRect rectToFit( aReference.MarginRect() );
       
  9568     TRect marginRect( aNode.MarginRect() );
       
  9569 
       
  9570     if ( marginRect.Height() > rectToFit.Height() ||
       
  9571         marginRect.Width() > rectToFit.Width() )
       
  9572         {
       
  9573         // Won't fit even how much is moved
       
  9574         CleanupStack::PopAndDestroy( &region );
       
  9575 
       
  9576         return;
       
  9577         }
       
  9578 
       
  9579     TPoint tl;
       
  9580     TPoint br;
       
  9581 
       
  9582     // Remove the initial 0,0 from redraw region and rects
       
  9583     dirtyRegion->iRegion.Clear();
       
  9584     ClearRects( aNode, ETrue );
       
  9585     CXnProperty* positionHint( aNode.GetPropertyL(
       
  9586         XnPropertyNames::styluspopup::KPositionHint ) );
       
  9587 
       
  9588     // Default
       
  9589     const TDesC8* value( &XnPropertyNames::styluspopup::positionhint::KAbove );
       
  9590 
       
  9591     if ( positionHint )
       
  9592         {
       
  9593         value = &positionHint->StringValue();
       
  9594         }
       
  9595 
       
  9596     if ( *value == XnPropertyNames::styluspopup::positionhint::KAbove )
       
  9597         {
       
  9598         if ( AknLayoutUtils::LayoutMirrored() )
       
  9599             {
       
  9600             tl = aPosition;
       
  9601             tl.iY -= marginRect.Height();
       
  9602             tl.iX -= marginRect.Width();
       
  9603 
       
  9604             // Will the popup float out?
       
  9605             if ( !rectToFit.Contains( tl ) )
       
  9606                 {
       
  9607                 // top left floated out
       
  9608                 TInt y( rectToFit.iTl.iY - tl.iY + 1 );
       
  9609 
       
  9610                 if ( y >= 0 )
       
  9611                     {
       
  9612                     // y-coordinate floated out, move it position
       
  9613                     // so that it will be inside reference rect
       
  9614                     tl.iY = tl.iY + y;
       
  9615                     }
       
  9616 
       
  9617                 TInt x( rectToFit.iTl.iX - tl.iX + 1 );
       
  9618 
       
  9619                 if ( x >= 0 )
       
  9620                     {
       
  9621                     // x-coordinate floated out, move it position
       
  9622                     // so that it will be inside reference rect
       
  9623                     tl.iX = tl.iX + x;
       
  9624                     }
       
  9625                 }
       
  9626             }
       
  9627         else
       
  9628             {
       
  9629             tl = aPosition;
       
  9630             tl.iY -= marginRect.Height();
       
  9631 
       
  9632             // Will the popup float out?
       
  9633             if ( !rectToFit.Contains( tl ) )
       
  9634                 {
       
  9635                 // top left floated out
       
  9636                 TInt y( rectToFit.iTl.iY - tl.iY + 1 );
       
  9637 
       
  9638                 if ( y >= 0 )
       
  9639                     {
       
  9640                     // y-coordinate floated out, move it position
       
  9641                     // so that it will be inside reference rect
       
  9642                     tl.iY = tl.iY + y;
       
  9643                     }
       
  9644                 }
       
  9645 
       
  9646             br = TPoint( tl.iX + marginRect.Width(),
       
  9647                          tl.iY + marginRect.Height() );
       
  9648 
       
  9649             if ( !rectToFit.Contains( br ) )
       
  9650                 {
       
  9651                 // bottom right floated out
       
  9652                 TInt x( br.iX - rectToFit.iBr.iX + 1 );
       
  9653 
       
  9654                 if ( x >= 0 )
       
  9655                     {
       
  9656                     // x-coordinate floated out, move it position
       
  9657                     // so that it will be inside reference rect
       
  9658                     tl.iX = tl.iX - x;
       
  9659                     }
       
  9660                 }
       
  9661             }
       
  9662         }
       
  9663     else // value == XnPropertyNames::styluspopup::positionhint::KBelow
       
  9664         {
       
  9665         if ( AknLayoutUtils::LayoutMirrored() )
       
  9666             {
       
  9667             tl = aPosition;
       
  9668             tl.iX = tl.iX - marginRect.Width();
       
  9669 
       
  9670             if ( !rectToFit.Contains( tl ) )
       
  9671                 {
       
  9672                 // Top left floated out
       
  9673                 TInt x( rectToFit.iTl.iX - tl.iX + 1 );
       
  9674 
       
  9675                 if ( x >= 0 )
       
  9676                     {
       
  9677                     // x-coordinate floated out, move it position
       
  9678                     // so that it will be inside reference rect
       
  9679                     tl.iX = tl.iX + x;
       
  9680                     }
       
  9681                 }
       
  9682 
       
  9683             br = TPoint( tl.iX + marginRect.Width(),
       
  9684                          tl.iY + marginRect.Height() );
       
  9685 
       
  9686             if ( !rectToFit.Contains( br ) )
       
  9687                 {
       
  9688                 // bottom right floated out
       
  9689                 TInt y( br.iY - rectToFit.iBr.iY + 1 );
       
  9690 
       
  9691                 if ( y >= 0 )
       
  9692                     {
       
  9693                     // y-coordinate floated out, move it position
       
  9694                     // so that it will be inside reference rect
       
  9695                     tl.iY = tl.iY - y;
       
  9696                     }
       
  9697                 }
       
  9698             }
       
  9699         else
       
  9700             {
       
  9701             tl = aPosition;
       
  9702             br = TPoint( tl.iX + marginRect.Width(),
       
  9703                          tl.iY + marginRect.Height() );
       
  9704 
       
  9705             // Will the popup float out?
       
  9706             if ( !rectToFit.Contains( br ) )
       
  9707                 {
       
  9708                 // Bottom right floated out
       
  9709                 TInt x( br.iX - rectToFit.iBr.iX + 1 );
       
  9710 
       
  9711                 if ( x >= 0 )
       
  9712                     {
       
  9713                     // x-coordinate floated out, move it position
       
  9714                     // so that it will be inside reference rect
       
  9715                     tl.iX = tl.iX - x;
       
  9716                     }
       
  9717 
       
  9718                 TInt y( br.iY - rectToFit.iBr.iY + 1 );
       
  9719 
       
  9720                 if ( y >= 0 )
       
  9721                     {
       
  9722                     // y-coordinate floated out, move it position
       
  9723                     // so that it will be inside reference rect
       
  9724                     tl.iY = tl.iY - y;
       
  9725                     }
       
  9726                 }
       
  9727             }
       
  9728         }
       
  9729 
       
  9730     // Set positions
       
  9731     top = CXnProperty::NewL(
       
  9732         XnPropertyNames::style::common::KTop, tl.iY,
       
  9733         CXnDomPropertyValue::EPx, *sp );
       
  9734     CleanupStack::PushL( top );
       
  9735     aNode.SetPropertyL( top );
       
  9736     CleanupStack::Pop( top );
       
  9737     left = CXnProperty::NewL(
       
  9738         XnPropertyNames::style::common::KLeft, tl.iX,
       
  9739         CXnDomPropertyValue::EPx, *sp );
       
  9740     CleanupStack::PushL( left );
       
  9741     aNode.SetPropertyL( left );
       
  9742     CleanupStack::Pop( left );
       
  9743 
       
  9744     // Copy stored region back
       
  9745     dirtyRegion->iRegion.Copy( region );                 
       
  9746     CleanupStack::PopAndDestroy( &region );
       
  9747     }
       
  9748 
       
  9749 // -----------------------------------------------------------------------------
       
  9750 // CXnUiEngineImpl::GetThemeResource
  9552 // CXnUiEngineImpl::GetThemeResource
  9751 // -----------------------------------------------------------------------------
  9553 // -----------------------------------------------------------------------------
  9752 //
  9554 //
  9753 TInt CXnUiEngineImpl::GetThemeResource( const TDesC& aPath, RFile& aFile )
  9555 TInt CXnUiEngineImpl::GetThemeResource( const TDesC& aPath, RFile& aFile )
  9754     {
  9556     {
  9945     
  9747     
  9946     CleanupStack::PopAndDestroy(); // trigger    
  9748     CleanupStack::PopAndDestroy(); // trigger    
  9947     }
  9749     }
  9948 
  9750 
  9949 // -----------------------------------------------------------------------------
  9751 // -----------------------------------------------------------------------------
       
  9752 // CXnUiEngineImpl::HandlePartialTouchInputL()
       
  9753 // -----------------------------------------------------------------------------
       
  9754 void CXnUiEngineImpl::HandlePartialTouchInputL( TInt aType )
       
  9755     {
       
  9756     if( !iSplitScreenState.iPartialScreenEditorNode )
       
  9757         {
       
  9758         return;
       
  9759         }
       
  9760     if ( aType == KAknSplitInputEnabled ) 
       
  9761         {        
       
  9762         // don't remove input from stack if split input is enabled
       
  9763         XnTextEditorInterface::MXnTextEditorInterface* editorControl = NULL;             
       
  9764         XnComponentInterface::MakeInterfaceL( editorControl, 
       
  9765             iSplitScreenState.iPartialScreenEditorNode->AppIfL() );
       
  9766         if( editorControl )
       
  9767             {
       
  9768             editorControl->HandleEditorEvent(CXnTextEditor::KKeepSplitInputInStack);
       
  9769             }
       
  9770 
       
  9771         RPointerArray<CXnNode> plugins = *Plugins();        
       
  9772      
       
  9773          for( TInt i=0; i<plugins.Count(); i++ )     
       
  9774              {         
       
  9775              CXnNode* pluginNode = plugins[i];
       
  9776              CXnNode* editorplugin = FindPlugin( *iSplitScreenState.iPartialScreenEditorNode );
       
  9777              
       
  9778              if ( pluginNode != editorplugin )
       
  9779                 {
       
  9780                 SetNodeVisibleL(pluginNode, EFalse);
       
  9781                 }      
       
  9782              }
       
  9783             
       
  9784         StorePartialScreenBlockProgressionL();
       
  9785            
       
  9786         iSplitScreenState.isPartialScreenEnabled = ETrue;           
       
  9787         SetPartialScreenBlockProgressionL( 
       
  9788             XnPropertyNames::style::common::block_progression::KBT );
       
  9789         iAppUiAdapter.StatusPane()->MakeVisible( EFalse );
       
  9790         } 
       
  9791      
       
  9792      if ( aType == KAknSplitInputDisabled ) 
       
  9793          {
       
  9794          
       
  9795          // set remove stack true if disable event does not come from widget controls
       
  9796          if(iSplitScreenState.isPartialScreenOpen)
       
  9797              {
       
  9798              XnTextEditorInterface::MXnTextEditorInterface* editorControl = NULL;             
       
  9799              XnComponentInterface::MakeInterfaceL( editorControl, 
       
  9800                  iSplitScreenState.iPartialScreenEditorNode->AppIfL() );
       
  9801              if( editorControl )
       
  9802                  {
       
  9803                  editorControl->HandleEditorEvent(CXnTextEditor::KRemoveSplitInputFromStack);
       
  9804                  }
       
  9805              }
       
  9806 
       
  9807          RPointerArray<CXnNode> plugins = *Plugins();
       
  9808     
       
  9809             for( TInt i=0; i<plugins.Count(); i++ )
       
  9810                {           
       
  9811                CXnNode* pluginNode = plugins[i];               
       
  9812                
       
  9813                if ( pluginNode != iSplitScreenState.iPartialScreenEditorNode )
       
  9814                     {
       
  9815                     SetNodeVisibleL(pluginNode, ETrue);
       
  9816                     }           
       
  9817                }
       
  9818             
       
  9819         if( iSplitScreenState.iPartialScreenBlock == NULL )
       
  9820             {
       
  9821             SetPartialScreenBlockProgressionL( 
       
  9822                         XnPropertyNames::style::common::block_progression::KTB );
       
  9823             }
       
  9824         else
       
  9825             {
       
  9826             SetPartialScreenBlockProgressionL(iSplitScreenState.iPartialScreenBlock->Des());
       
  9827             }
       
  9828         
       
  9829          iSplitScreenState.isPartialScreenEnabled = EFalse;
       
  9830          iAppUiAdapter.StatusPane()->MakeVisible(ETrue);
       
  9831          }
       
  9832     }
       
  9833 
       
  9834 // -----------------------------------------------------------------------------
  9950 // -----------------------------------------------------------------------------
  9835 // -----------------------------------------------------------------------------
  9951 CCoeControl* CXnUiEngineImpl::WindowOwningControl( CXnNode& aNode )
  9836 CCoeControl* CXnUiEngineImpl::WindowOwningControl( CXnNode& aNode )
  9952     {
  9837     {
  9953     CXnNode* parent = &aNode;
  9838     CXnNode* parent = &aNode;
  9954     while( parent )
  9839     while( parent )
 10036 void CXnUiEngineImpl::NotifyResourceChanged( TInt aType )
  9921 void CXnUiEngineImpl::NotifyResourceChanged( TInt aType )
 10037     {
  9922     {
 10038     TRAP_IGNORE( HandleResourceChangeL( aType ) );
  9923     TRAP_IGNORE( HandleResourceChangeL( aType ) );
 10039     }
  9924     }
 10040 
  9925 
       
  9926 // -----------------------------------------------------------------------------
       
  9927 // EnablePartialTouchInput 
       
  9928 // -----------------------------------------------------------------------------
       
  9929 void CXnUiEngineImpl::EnablePartialTouchInput( CXnNode& aNode, TBool aEnable )
       
  9930     {    
       
  9931     iSplitScreenState.iPartialScreenEditorNode = &aNode;
       
  9932     iSplitScreenState.isPartialScreenOpen = aEnable;
       
  9933     }
       
  9934 
       
  9935 // -----------------------------------------------------------------------------
       
  9936 // SetNodeVisibleL
       
  9937 // -----------------------------------------------------------------------------
       
  9938 void CXnUiEngineImpl::SetNodeVisibleL( CXnNode* aNode , TBool aVisible )
       
  9939     {    
       
  9940     CXnDomStringPool* sp( iUiEngine->ODT()->DomDocument().StringPool()); 
       
  9941     
       
  9942     if(!aVisible)
       
  9943         {
       
  9944         CXnProperty* display = CXnProperty::NewL(
       
  9945         XnPropertyNames::style::common::KDisplay,
       
  9946         XnPropertyNames::style::common::display::KNone,
       
  9947         CXnDomPropertyValue::EString, *sp );
       
  9948         
       
  9949         CleanupStack::PushL( display );         
       
  9950         aNode->SetPropertyL(display);             
       
  9951         CleanupStack::Pop( display );
       
  9952         }
       
  9953     else
       
  9954         {
       
  9955          CXnProperty* visible = CXnProperty::NewL(
       
  9956          XnPropertyNames::style::common::KDisplay,
       
  9957          XnPropertyNames::style::common::display::KBlock,
       
  9958          CXnDomPropertyValue::EString, *sp );
       
  9959          
       
  9960          CleanupStack::PushL( visible );                
       
  9961          aNode->SetPropertyL(visible);                
       
  9962          CleanupStack::Pop( visible );
       
  9963         }
       
  9964     }
       
  9965 
       
  9966 // -----------------------------------------------------------------------------
       
  9967 // SetPartialScreenBlockProgressionL
       
  9968 // -----------------------------------------------------------------------------
       
  9969 void CXnUiEngineImpl::SetPartialScreenBlockProgressionL( const TDesC8& aBlockProgression )
       
  9970     {
       
  9971     CXnNode* plugin = FindPlugin( *iSplitScreenState.iPartialScreenEditorNode );
       
  9972     CXnNode* parent( NULL );    
       
  9973     if( plugin )
       
  9974         {
       
  9975         parent = plugin->Parent();
       
  9976         }
       
  9977     
       
  9978     CXnDomStringPool* sp( iUiEngine->ODT()->DomDocument().StringPool());   
       
  9979     if(parent)
       
  9980         {
       
  9981         CXnProperty* block_progression = CXnProperty::NewL(
       
  9982         XnPropertyNames::style::common::KBlockProgression,
       
  9983         aBlockProgression,
       
  9984         CXnDomPropertyValue::EString, *sp );
       
  9985         
       
  9986         CleanupStack::PushL( block_progression );            
       
  9987         parent->SetPropertyL(block_progression);            
       
  9988         CleanupStack::Pop( block_progression );
       
  9989         }
       
  9990     }
       
  9991 
       
  9992 // -----------------------------------------------------------------------------
       
  9993 // SetPartialScreenBlockProgressionL
       
  9994 // -----------------------------------------------------------------------------
       
  9995 void CXnUiEngineImpl::StorePartialScreenBlockProgressionL()
       
  9996     {    
       
  9997     CXnNode* parent = iSplitScreenState.iPartialScreenEditorNode->Parent();
       
  9998     
       
  9999     if(parent)
       
 10000         {
       
 10001         CXnProperty* blocProgressionProperty( 
       
 10002           parent->GetPropertyL( XnPropertyNames::style::common::KBlockProgression ) );               
       
 10003         
       
 10004         HBufC* blocProgressionValue (blocProgressionProperty->StringValueL());
       
 10005         CleanupStack::PushL( blocProgressionValue );
       
 10006         if(iSplitScreenState.iPartialScreenBlock)
       
 10007             {
       
 10008             delete iSplitScreenState.iPartialScreenBlock;
       
 10009             iSplitScreenState.iPartialScreenBlock = NULL;
       
 10010             }
       
 10011         iSplitScreenState.iPartialScreenBlock =
       
 10012                 CnvUtfConverter::ConvertFromUnicodeToUtf8L(blocProgressionValue->Des() );
       
 10013         CleanupStack::PopAndDestroy( blocProgressionValue );
       
 10014         }    
       
 10015     }
       
 10016 
       
 10017 // -----------------------------------------------------------------------------
       
 10018 // isPartialInputActive
       
 10019 // -----------------------------------------------------------------------------
       
 10020 TBool CXnUiEngineImpl::IsPartialInputActive()
       
 10021     {
       
 10022     return iSplitScreenState.isPartialScreenEnabled;
       
 10023     }
       
 10024 
       
 10025 
 10041 // End of file
 10026 // End of file