(TableView) Move from devel-api to public-api
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / utc-Dali-TableView.cpp
index 0e99819..45dd92c 100644 (file)
@@ -58,9 +58,9 @@ struct Constraint100
   /**
    * function operator to apply the parent size
    */
-  Dali::Vector3 operator()(const Dali::Vector3& current)
+  void operator()( Dali::Vector3& current, const PropertyInputContainer& /* inputs */ )
   {
-    return Dali::Vector3( 100.0f, 100.0f, 100.0f );
+    current.x = current.y = current.z = 100.0f;
   }
 };
 
@@ -70,8 +70,6 @@ static void SetupTableViewAndActors(TableView& tableView, Actor& actor1, Actor&
   tableView = TableView::New( 10, 10 ); // 10 by 10 grid.
   DALI_TEST_CHECK( tableView );
 
-  tableView.SetRelayoutEnabled( true );
-
   Stage::GetCurrent().Add( tableView );
   tableView.SetSize( Dali::Vector2( 100.0f, 100.0f ) );
 
@@ -79,11 +77,8 @@ static void SetupTableViewAndActors(TableView& tableView, Actor& actor1, Actor&
   actor2 = Actor::New();
   actor3 = Actor::New();
 
-  actor1.SetRelayoutEnabled( true );
   actor1.SetSize( Dali::Vector2( 10, 10 ) );
-  actor2.SetRelayoutEnabled( true );
   actor2.SetSize( Dali::Vector2( 10, 10 ) );
-  actor3.SetRelayoutEnabled( true );
   actor3.SetSize( Dali::Vector2( 10, 10 ) );
 
   tableView.AddChild( actor1, TableView::CellPosition( 0, 0 ) );
@@ -642,7 +637,8 @@ int UtcDaliTableViewCustomProperties(void)
 
   // Create a 10x10 table-view
   TableView tableView = TableView::New(10,10);
-  tableView.ApplyConstraint( Constraint::New<Vector3>( Actor::Property::SIZE, Constraint100() ) );
+  Constraint constraint = Constraint::New<Vector3>( tableView, Actor::Property::SIZE, Constraint100() );
+  constraint.Apply();
   DALI_TEST_CHECK( tableView );
 
   // Create a child actor with the custom properties