Revert "Revert "KeyEvent class pimpling""
[platform/core/uifw/dali-demo.git] / examples / size-negotiation / size-negotiation-example.cpp
index 5fe5daa..8fff2d3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -19,6 +19,8 @@
 #include <dali/dali.h>
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali-toolkit/devel-api/controls/popup/popup.h>
+#include <dali-toolkit/devel-api/controls/table-view/table-view.h>
+#include <dali-toolkit/devel-api/focus-manager/keyinput-focus-manager.h>
 
 using namespace Dali;
 
@@ -72,6 +74,19 @@ const ButtonItem TABLEVIEW_BUTTON_ITEMS[] = {
 
 const unsigned int TABLEVIEW_BUTTON_ITEMS_COUNT = sizeof( TABLEVIEW_BUTTON_ITEMS ) / sizeof( TABLEVIEW_BUTTON_ITEMS[0] );
 
+
+Actor CreateSolidColor( Vector4 color )
+{
+  Toolkit::Control control = Toolkit::Control::New();
+
+  Property::Map map;
+  map[ Toolkit::Visual::Property::TYPE ] = Toolkit::Visual::COLOR;
+  map[ Toolkit::ColorVisual::Property::MIX_COLOR ] = color;
+  control.SetProperty( Toolkit::Control::Property::BACKGROUND, map );
+
+  return control;
+}
+
 }  // anonymous namespace
 
 
@@ -97,13 +112,13 @@ public:
   void Create( Application& application )
   {
     // The Init signal is received once (only) during the Application lifetime
-    Stage stage = Stage::GetCurrent();
+    Window window = application.GetWindow();
 
-    // Respond to key events
-    stage.KeyEventSignal().Connect(this, &SizeNegotiationController::OnKeyEvent);
+    // Respond to key events if not handled
+    window.KeyEventSignal().Connect(this, &SizeNegotiationController::OnKeyEvent);
 
     // Creates a default view with a default tool bar.
-    // The view is added to the stage.
+    // The view is added to the window.
     mContentLayer = DemoHelper::CreateView( application,
                                             mView,
                                             mToolBar,
@@ -119,27 +134,27 @@ public:
     mToolBar.AddControl( mTitleActor, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarTitlePercentage, Toolkit::Alignment::HorizontalCenter, Toolkit::Alignment::Padding( padding, padding, padding, padding ) );
 
     mItemView = Toolkit::ItemView::New( *this );
-    mItemView.SetParentOrigin( ParentOrigin::CENTER );
-    mItemView.SetAnchorPoint( AnchorPoint::CENTER );
+    mItemView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+    mItemView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
     mItemView.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
 
     // Use a grid layout for tests
-    Vector2 stageSize = stage.GetSize();
+    Vector2 windowSize = window.GetSize();
     Toolkit::ItemLayoutPtr gridLayout = Toolkit::DefaultItemLayout::New( Toolkit::DefaultItemLayout::LIST );
     Vector3 itemSize;
-    gridLayout->GetItemSize( 0, Vector3( stageSize ), itemSize );
-    itemSize.height = stageSize.y / 10;
+    gridLayout->GetItemSize( 0, Vector3( windowSize ), itemSize );
+    itemSize.height = windowSize.y / 10;
     gridLayout->SetItemSize( itemSize );
     mItemView.AddLayout( *gridLayout );
 
-    mItemView.ActivateLayout( 0, Vector3(stageSize.x, stageSize.y, stageSize.x), 0.0f );
+    mItemView.ActivateLayout( 0, Vector3(windowSize.x, windowSize.y, windowSize.x), 0.0f );
 
     mContentLayer.Add( mItemView );
   }
 
-  void StagePopup( Toolkit::Popup popup )
+  void ShowPopup( Toolkit::Popup popup )
   {
-    Stage::GetCurrent().Add( popup );
+    mApplication.GetWindow().Add( popup );
     popup.SetDisplayState( Toolkit::Popup::SHOWN );
   }
 
@@ -162,14 +177,14 @@ public:
 
   Toolkit::Popup CreatePopup()
   {
-    Stage stage = Stage::GetCurrent();
-    const float POPUP_WIDTH_DP = stage.GetSize().width * 0.75f;
+    Window window = mApplication.GetWindow();
+    const float POPUP_WIDTH_DP = window.GetSize().GetWidth() * 0.75f;
 
     Toolkit::Popup popup = Toolkit::Popup::New();
-    popup.SetName( "popup" );
-    popup.SetParentOrigin( ParentOrigin::CENTER );
-    popup.SetAnchorPoint( AnchorPoint::CENTER );
-    popup.SetSize( POPUP_WIDTH_DP, 0.0f );
+    popup.SetProperty( Dali::Actor::Property::NAME, "popup" );
+    popup.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+    popup.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+    popup.SetProperty( Actor::Property::SIZE, Vector2( POPUP_WIDTH_DP, 0.0f ) );
     popup.SetProperty( Toolkit::Popup::Property::TAIL_VISIBILITY, false );
 
     popup.OutsideTouchedSignal().Connect( this, &SizeNegotiationController::OnPopupOutsideTouched );
@@ -180,133 +195,133 @@ public:
 
   bool OnButtonClicked( Toolkit::Button button )
   {
-    if( button.GetName() == TABLEVIEW_BUTTON_1CELL_ID )
+    if( button.GetProperty< std::string >( Dali::Actor::Property::NAME ) == TABLEVIEW_BUTTON_1CELL_ID )
     {
       mPopup = CreatePopup();
       mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
-      mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
+      mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 0.5f, 1.0f ) );
 
       Toolkit::TableView table = Toolkit::TableView::New( 0, 0 );
-      table.SetName( "TABLEVIEW_BUTTON_1CELL_ID" );
+      table.SetProperty( Dali::Actor::Property::NAME, "TABLEVIEW_BUTTON_1CELL_ID" );
       table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
 
-      Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
+      Actor backing = CreateSolidColor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
       backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
       table.Add( backing );
 
       mPopup.Add( table );
 
-      StagePopup( mPopup );
+      ShowPopup( mPopup );
     }
-    else if( button.GetName() == TABLEVIEW_BUTTON_3CELL_ID )
+    else if( button.GetProperty< std::string >( Dali::Actor::Property::NAME ) == TABLEVIEW_BUTTON_3CELL_ID )
     {
       mPopup = CreatePopup();
       mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
-      mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
+      mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 0.5f, 1.0f ) );
 
       Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
       table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
 
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         table.AddChild( backing, Toolkit::TableView::CellPosition( 0, 0 ) );
       }
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         table.AddChild( backing, Toolkit::TableView::CellPosition( 1, 0 ) );
       }
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         table.AddChild( backing, Toolkit::TableView::CellPosition( 2, 0 ) );
       }
 
       mPopup.SetContent( table );
 
-      StagePopup( mPopup );
+      ShowPopup( mPopup );
     }
-    else if( button.GetName() == TABLEVIEW_BUTTON_3X3CELL_ID )
+    else if( button.GetProperty< std::string >( Dali::Actor::Property::NAME ) == TABLEVIEW_BUTTON_3X3CELL_ID )
     {
       mPopup = CreatePopup();
       mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
-      mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
+      mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 0.5f, 1.0f ) );
 
       Toolkit::TableView table = Toolkit::TableView::New( 3, 3 );
       table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
 
       // Column 0
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         table.AddChild( backing, Toolkit::TableView::CellPosition( 0, 0 ) );
       }
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         table.AddChild( backing, Toolkit::TableView::CellPosition( 1, 0 ) );
       }
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         table.AddChild( backing, Toolkit::TableView::CellPosition( 2, 0 ) );
       }
 
       // Column 1
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         table.AddChild( backing, Toolkit::TableView::CellPosition( 0, 1 ) );
       }
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 1.0f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 1.0f, 1.0f, 1.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         table.AddChild( backing, Toolkit::TableView::CellPosition( 1, 1 ) );
       }
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 0.0f, 1.0f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 0.0f, 0.0f, 1.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         table.AddChild( backing, Toolkit::TableView::CellPosition( 2, 1 ) );
       }
 
       // Column 2
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 0.0f, 0.0f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 0.0f, 0.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         table.AddChild( backing, Toolkit::TableView::CellPosition( 0, 2 ) );
       }
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.5f, 0.5f, 0.5f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 0.5f, 0.5f, 0.5f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         table.AddChild( backing, Toolkit::TableView::CellPosition( 1, 2 ) );
       }
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.5f, 0.0f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 1.0f, 0.5f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         table.AddChild( backing, Toolkit::TableView::CellPosition( 2, 2 ) );
       }
 
       mPopup.Add( table );
 
-      StagePopup( mPopup );
+      ShowPopup( mPopup );
     }
-    else if( button.GetName() == TABLEVIEW_BUTTON_FIXED1_ID )
+    else if( button.GetProperty< std::string >( Dali::Actor::Property::NAME ) == TABLEVIEW_BUTTON_FIXED1_ID )
     {
       mPopup = CreatePopup();
       mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
-      mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
+      mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 0.5f, 1.0f ) );
 
       Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
       table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
       table.SetFixedHeight( 0, 50.0f );
 
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fixed" );
         text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
-        text.SetParentOrigin( ParentOrigin::CENTER );
+        text.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
         text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
         text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
@@ -314,24 +329,24 @@ public:
         table.Add( backing );
       }
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" );
         text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
         text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
-        text.SetParentOrigin( ParentOrigin::CENTER );
+        text.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
         text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
         text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
         backing.Add( text );
         table.Add( backing );
       }
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" );
         text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
         text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
-        text.SetParentOrigin( ParentOrigin::CENTER );
+        text.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
         text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
         text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
         backing.Add( text );
@@ -340,13 +355,13 @@ public:
 
       mPopup.Add( table );
 
-      StagePopup( mPopup );
+      ShowPopup( mPopup );
     }
-    else if( button.GetName() == TABLEVIEW_BUTTON_FIXED2_ID )
+    else if( button.GetProperty< std::string >( Dali::Actor::Property::NAME ) == TABLEVIEW_BUTTON_FIXED2_ID )
     {
       mPopup = CreatePopup();
       mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
-      mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
+      mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 0.5f, 1.0f ) );
 
       Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
       table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
@@ -354,12 +369,12 @@ public:
       table.SetFixedHeight( 2, 50.0f );
 
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fixed" );
         text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
-        text.SetAnchorPoint( AnchorPoint::CENTER );
-        text.SetParentOrigin( ParentOrigin::CENTER );
+        text.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+        text.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
         text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
         text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
@@ -368,12 +383,12 @@ public:
         table.Add( backing );
       }
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" );
         text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
-        text.SetAnchorPoint( AnchorPoint::CENTER );
-        text.SetParentOrigin( ParentOrigin::CENTER );
+        text.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+        text.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
         text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
         text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
@@ -382,12 +397,12 @@ public:
         table.Add( backing );
       }
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fixed" );
         text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
-        text.SetAnchorPoint( AnchorPoint::CENTER );
-        text.SetParentOrigin( ParentOrigin::CENTER );
+        text.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+        text.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
         text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
         text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
@@ -398,13 +413,13 @@ public:
 
       mPopup.Add( table );
 
-      StagePopup( mPopup );
+      ShowPopup( mPopup );
     }
-    else if( button.GetName() == TABLEVIEW_BUTTON_FIT1_ID )
+    else if( button.GetProperty< std::string >( Dali::Actor::Property::NAME ) == TABLEVIEW_BUTTON_FIT1_ID )
     {
       mPopup = CreatePopup();
       mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
-      mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
+      mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 0.5f, 1.0f ) );
 
       Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
       table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
@@ -412,14 +427,14 @@ public:
       table.SetFitHeight( 2 );
 
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
-        backing.SetSize( 0.0f, 100.0f );
+        backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 100.0f ) );
 
         Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
         text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
-        text.SetAnchorPoint( AnchorPoint::CENTER );
-        text.SetParentOrigin( ParentOrigin::CENTER );
+        text.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+        text.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
         text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
         text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
@@ -429,13 +444,13 @@ public:
         table.Add( backing );
       }
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
 
         Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" );
         text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
-        text.SetAnchorPoint( AnchorPoint::CENTER );
-        text.SetParentOrigin( ParentOrigin::CENTER );
+        text.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+        text.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
         text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
         text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
@@ -445,14 +460,14 @@ public:
         table.Add( backing );
       }
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
-        backing.SetSize( 0.0f, 100.0f );
+        backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 100.0f ) );
 
         Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
         text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
-        text.SetAnchorPoint( AnchorPoint::CENTER );
-        text.SetParentOrigin( ParentOrigin::CENTER );
+        text.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+        text.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
         text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
         text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
@@ -464,26 +479,26 @@ public:
 
       mPopup.Add( table );
 
-      StagePopup( mPopup );
+      ShowPopup( mPopup );
     }
-    else if( button.GetName() == TABLEVIEW_BUTTON_FIT2_ID )
+    else if( button.GetProperty< std::string >( Dali::Actor::Property::NAME ) == TABLEVIEW_BUTTON_FIT2_ID )
     {
       mPopup = CreatePopup();
       mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
-      mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
+      mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 0.5f, 1.0f ) );
 
       Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
       table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
       table.SetFitHeight( 1 );
 
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
 
         Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" );
         text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
-        text.SetAnchorPoint( AnchorPoint::CENTER );
-        text.SetParentOrigin( ParentOrigin::CENTER );
+        text.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+        text.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
         text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
         text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
@@ -493,9 +508,9 @@ public:
         table.Add( backing );
       }
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
-        backing.SetSize( 0.0f, 200.0f );
+        backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 200.0f ) );
 
         Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
         text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
@@ -503,20 +518,20 @@ public:
         text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
         text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
 
-        text.SetAnchorPoint( AnchorPoint::CENTER );
-        text.SetParentOrigin( ParentOrigin::CENTER );
+        text.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+        text.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
         backing.Add( text );
 
         table.Add( backing );
       }
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
 
         Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fill" );
         text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
-        text.SetAnchorPoint( AnchorPoint::CENTER );
-        text.SetParentOrigin( ParentOrigin::CENTER );
+        text.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+        text.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
         text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
         text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
@@ -528,13 +543,13 @@ public:
 
       mPopup.Add( table );
 
-      StagePopup( mPopup );
+      ShowPopup( mPopup );
     }
-    else if( button.GetName() == TABLEVIEW_BUTTON_NATURAL1_ID )
+    else if( button.GetProperty< std::string >( Dali::Actor::Property::NAME ) == TABLEVIEW_BUTTON_NATURAL1_ID )
     {
       mPopup = CreatePopup();
       mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::WIDTH );
-      mPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) );
+      mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 1.0f, 1.0f ) );
       mPopup.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::HEIGHT );
 
       Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
@@ -545,14 +560,14 @@ public:
       table.SetFitHeight( 2 );
 
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
-        backing.SetSize( 0.0f, 100.0f );
+        backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 100.0f ) );
 
         Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
         text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
-        text.SetAnchorPoint( AnchorPoint::CENTER );
-        text.SetParentOrigin( ParentOrigin::CENTER );
+        text.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+        text.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
         text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
         text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
@@ -562,14 +577,14 @@ public:
         table.Add( backing );
       }
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
-        backing.SetSize( 0.0f, 200.0f );
+        backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 200.0f ) );
 
         Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
         text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
-        text.SetAnchorPoint( AnchorPoint::CENTER );
-        text.SetParentOrigin( ParentOrigin::CENTER );
+        text.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+        text.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
         text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
         text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
@@ -579,14 +594,14 @@ public:
         table.Add( backing );
       }
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
-        backing.SetSize( 0.0f, 300.0f );
+        backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 300.0f ) );
 
         Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
         text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
-        text.SetAnchorPoint( AnchorPoint::CENTER );
-        text.SetParentOrigin( ParentOrigin::CENTER );
+        text.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+        text.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
         text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
         text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
@@ -598,13 +613,13 @@ public:
 
       mPopup.Add( table );
 
-      StagePopup( mPopup );
+      ShowPopup( mPopup );
     }
-    else if( button.GetName() == TABLEVIEW_BUTTON_NATURAL2_ID )
+    else if( button.GetProperty< std::string >( Dali::Actor::Property::NAME ) == TABLEVIEW_BUTTON_NATURAL2_ID )
     {
       mPopup = CreatePopup();
       mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::WIDTH );
-      mPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) );
+      mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 1.0f, 1.0f ) );
       mPopup.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::HEIGHT );
 
       Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
@@ -614,15 +629,15 @@ public:
       table.SetFitHeight( 1 );
 
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
         backing.SetResizePolicy( ResizePolicy::FIXED, Dimension::HEIGHT );
-        backing.SetSize( 0.0f, 100.0f );
+        backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 100.0f ) );
 
         Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
         text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
-        text.SetAnchorPoint( AnchorPoint::CENTER );
-        text.SetParentOrigin( ParentOrigin::CENTER );
+        text.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+        text.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
         text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
         text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
@@ -632,14 +647,14 @@ public:
         table.Add( backing );
       }
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
-        backing.SetSize( 0.0f, 200.0f );
+        backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 200.0f ) );
 
         Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
         text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
-        text.SetAnchorPoint( AnchorPoint::CENTER );
-        text.SetParentOrigin( ParentOrigin::CENTER );
+        text.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+        text.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
         text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
         text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
@@ -651,13 +666,13 @@ public:
 
       mPopup.Add( table );
 
-      StagePopup( mPopup );
+      ShowPopup( mPopup );
     }
-    else if( button.GetName() == TABLEVIEW_BUTTON_NATURAL3_ID )
+    else if( button.GetProperty< std::string >( Dali::Actor::Property::NAME ) == TABLEVIEW_BUTTON_NATURAL3_ID )
     {
       mPopup = CreatePopup();
       mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::WIDTH );
-      mPopup.SetSizeModeFactor( Vector3( 0.75f, 1.0f, 1.0f ) );
+      mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 1.0f, 1.0f ) );
       mPopup.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::HEIGHT );
 
       Toolkit::TableView table = Toolkit::TableView::New( 3, 1 );
@@ -667,13 +682,13 @@ public:
       table.SetFitHeight( 1 );
 
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
 
         Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fixed" );
         text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
-        text.SetAnchorPoint( AnchorPoint::CENTER );
-        text.SetParentOrigin( ParentOrigin::CENTER );
+        text.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+        text.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
         text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
         text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
@@ -683,14 +698,14 @@ public:
         table.Add( backing );
       }
       {
-        Actor backing = Toolkit::CreateSolidColorActor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
+        Actor backing = CreateSolidColor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
         backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
-        backing.SetSize( 0.0f, 200.0f );
+        backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 200.0f ) );
 
         Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
         text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
-        text.SetAnchorPoint( AnchorPoint::CENTER );
-        text.SetParentOrigin( ParentOrigin::CENTER );
+        text.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+        text.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
         text.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
         text.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
         text.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
@@ -701,48 +716,48 @@ public:
       }
       mPopup.Add( table );
 
-      StagePopup( mPopup );
+      ShowPopup( mPopup );
     }
-    else if( button.GetName() == POPUP_BUTTON_CONTENT_IMAGE_SCALE_ID )
+    else if( button.GetProperty< std::string >( Dali::Actor::Property::NAME ) == POPUP_BUTTON_CONTENT_IMAGE_SCALE_ID )
     {
       mPopup = CreatePopup();
       mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
-      mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
+      mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 0.5f, 1.0f ) );
 
       Toolkit::ImageView image = Toolkit::ImageView::New( IMAGE );
       image.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
 
       mPopup.Add( image );
 
-      StagePopup( mPopup );
+      ShowPopup( mPopup );
     }
-    else if( button.GetName() == POPUP_BUTTON_CONTENT_IMAGE_FIT_ID )
+    else if( button.GetProperty< std::string >( Dali::Actor::Property::NAME ) == POPUP_BUTTON_CONTENT_IMAGE_FIT_ID )
     {
       mPopup = CreatePopup();
       mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
-      mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
+      mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 0.5f, 1.0f ) );
 
       Toolkit::ImageView image = Toolkit::ImageView::New( IMAGE );
       image.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
-      image.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO );
+      image.SetProperty( Actor::Property::SIZE_SCALE_POLICY, SizeScalePolicy::FIT_WITH_ASPECT_RATIO );
 
       mPopup.Add( image );
 
-      StagePopup( mPopup );
+      ShowPopup( mPopup );
     }
-    else if( button.GetName() == POPUP_BUTTON_CONTENT_IMAGE_FILL_ID )
+    else if( button.GetProperty< std::string >( Dali::Actor::Property::NAME ) == POPUP_BUTTON_CONTENT_IMAGE_FILL_ID )
     {
       mPopup = CreatePopup();
       mPopup.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
-      mPopup.SetSizeModeFactor( Vector3( 0.75f, 0.5f, 1.0f ) );
+      mPopup.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75f, 0.5f, 1.0f ) );
 
       Toolkit::ImageView image = Toolkit::ImageView::New( IMAGE );
       image.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
-      image.SetSizeScalePolicy( SizeScalePolicy::FILL_WITH_ASPECT_RATIO );
+      image.SetProperty( Actor::Property::SIZE_SCALE_POLICY, SizeScalePolicy::FILL_WITH_ASPECT_RATIO );
 
       mPopup.Add( image );
 
-      StagePopup( mPopup );
+      ShowPopup( mPopup );
     }
 
     return true;
@@ -750,7 +765,7 @@ public:
 
   void OnKeyEvent( const KeyEvent& event )
   {
-    if( event.state == KeyEvent::Down )
+    if( event.GetState() == KeyEvent::Down )
     {
       if( IsKey( event, Dali::DALI_KEY_ESCAPE ) || IsKey( event, Dali::DALI_KEY_BACK ) )
       {
@@ -781,8 +796,8 @@ public: // From ItemFactory
   virtual Actor NewItem(unsigned int itemId)
   {
     Toolkit::PushButton popupButton = Toolkit::PushButton::New();
-    popupButton.SetName( TABLEVIEW_BUTTON_ITEMS[ itemId ].name );
-    popupButton.SetLabelText( TABLEVIEW_BUTTON_ITEMS[ itemId ].text );
+    popupButton.SetProperty( Dali::Actor::Property::NAME, TABLEVIEW_BUTTON_ITEMS[ itemId ].name );
+    popupButton.SetProperty( Toolkit::Button::Property::LABEL, TABLEVIEW_BUTTON_ITEMS[ itemId ].text );
     popupButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
 
     popupButton.ClickedSignal().Connect( this, &SizeNegotiationController::OnButtonClicked );
@@ -805,19 +820,10 @@ private:
 
 };
 
-void RunTest( Application& application )
-{
-  SizeNegotiationController test( application );
-
-  application.MainLoop();
-}
-
-// Entry point for Linux & SLP applications
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
-
-  RunTest( application );
-
+  SizeNegotiationController test( application );
+  application.MainLoop();
   return 0;
 }