idlehomescreen/xmluirendering/uiengine/src/xnodtparser.cpp
branchRCL_3
changeset 16 9674c1a575e9
parent 15 ff572dfe6d86
equal deleted inserted replaced
15:ff572dfe6d86 16:9674c1a575e9
    30 
    30 
    31 #include "xnecomhandler.h"
    31 #include "xnecomhandler.h"
    32 #include "xnuiengine.h"
    32 #include "xnuiengine.h"
    33 #include "xntype.h"
    33 #include "xntype.h"
    34 #include "xncontroladapter.h"
    34 #include "xncontroladapter.h"
       
    35 #include "xnviewcontroladapter.h"
    35 #include "xnpopupcontroladapter.h"
    36 #include "xnpopupcontroladapter.h"
    36 #include "xnwidgetextensionadapter.h"
    37 #include "xnwidgetextensionadapter.h"
    37 #include "xnscrollablecontroladapter.h"
    38 #include "xnscrollablecontroladapter.h"
    38 #include "xnlistquerydialogadapter.h"
    39 #include "xnlistquerydialogadapter.h"
    39 
    40 
  1177     const TDesC8& aName )
  1178     const TDesC8& aName )
  1178     {
  1179     {
  1179     if ( aName != KBoxNodeName && aName != KButtonNodeName &&
  1180     if ( aName != KBoxNodeName && aName != KButtonNodeName &&
  1180          aName != KStylusPopupNodeName && aName != KScrollableBoxNodeName&& 
  1181          aName != KStylusPopupNodeName && aName != KScrollableBoxNodeName&& 
  1181          aName != KWidgetExtensionNodeName && 
  1182          aName != KWidgetExtensionNodeName && 
  1182                   aName != KPopUpNodeName &&
  1183          aName != KPopUpNodeName && aName != KViewNodeName &&
  1183 		 aName != XnPropertyNames::listquerydialog::KListQueryDialog )         
  1184 		 aName != XnPropertyNames::listquerydialog::KListQueryDialog )         
  1184         {
  1185         {
  1185         return CreateExternalControlL( aNode, aName );
  1186         return CreateExternalControlL( aNode, aName );
  1186         }
  1187         }
  1187 
  1188 
  1224                 {
  1225                 {
  1225                 break;
  1226                 break;
  1226                 }
  1227                 }
  1227             }
  1228             }
  1228         }
  1229         }
  1229 
       
  1230     __ASSERT_DEBUG( parentAdapter, User::Leave( KErrGeneral ) );
       
  1231     
  1230     
  1232     CXnControlAdapter* adapter( NULL );
  1231     CXnControlAdapter* adapter( NULL );
  1233     
  1232 
  1234     if( aName == KStylusPopupNodeName )
  1233     if( aName == KViewNodeName )
       
  1234         {
       
  1235         adapter = CXnViewControlAdapter::NewL( aNode.PluginIfL() );
       
  1236         CleanupStack::PushL( adapter );
       
  1237         }
       
  1238     else if( aName == KStylusPopupNodeName )
  1235         {
  1239         {
  1236         adapter = CXnPopupControlAdapter::NewL( aNode.PluginIfL() );
  1240         adapter = CXnPopupControlAdapter::NewL( aNode.PluginIfL() );
  1237         CleanupStack::PushL( adapter );
  1241         CleanupStack::PushL( adapter );
  1238         }
  1242         }
  1239     else if( aName == KWidgetExtensionNodeName ||
  1243     else if( aName == KWidgetExtensionNodeName ||
  1268         {
  1272         {
  1269         adapter = CXnControlAdapter::NewL( aNode.PluginIfL() );
  1273         adapter = CXnControlAdapter::NewL( aNode.PluginIfL() );
  1270         CleanupStack::PushL( adapter );
  1274         CleanupStack::PushL( adapter );
  1271         }
  1275         }
  1272     
  1276     
  1273     parentAdapter->AppendChildL( *adapter, aNode );
  1277     if ( parentAdapter )
       
  1278         {
       
  1279         parentAdapter->AppendChildL( *adapter, aNode );
       
  1280         }
       
  1281     
       
  1282     component->SetControlAdapter( adapter ); // ovnership transferred
  1274     CleanupStack::Pop( adapter );
  1283     CleanupStack::Pop( adapter );
  1275     
  1284 
  1276     component->SetControlAdapter( adapter );
  1285     __ASSERT_DEBUG( adapter, User::Leave( KErrGeneral ) );
  1277 
  1286     
  1278     aNode.ComponentNodeImpl()->SetComponent( component );
  1287     if( aName == KViewNodeName )
       
  1288         {
       
  1289         aNode.ViewNodeImpl()->SetComponent( component );
       
  1290         }
       
  1291     else
       
  1292         {
       
  1293         aNode.ComponentNodeImpl()->SetComponent( component );
       
  1294         }
  1279 
  1295 
  1280     component->SetNode( aNode.PluginIfL() );
  1296     component->SetNode( aNode.PluginIfL() );
  1281 
  1297 
  1282     adapter->SetComponent( component );
  1298     adapter->SetComponent( component );
  1283 
  1299