Size negotiation patch 3: Scope size negotiation enums 47/38147/3
authorKingsley Stephens <k.stephens@samsung.com>
Thu, 9 Apr 2015 14:03:14 +0000 (15:03 +0100)
committerKingsley Stephens <k.stephens@samsung.com>
Mon, 13 Apr 2015 17:35:05 +0000 (18:35 +0100)
Fix FIT_TO_CHILDREN

Change-Id: Iac313b8df1e3e4febd3c3cf162ca1f7c033a4a34

15 files changed:
automated-tests/src/dali-internal/utc-Dali-Internal-RelayoutController.cpp
automated-tests/src/dali/utc-Dali-Actor.cpp
automated-tests/src/dali/utc-Dali-CustomActor.cpp
automated-tests/src/dali/utc-Dali-TypeRegistry.cpp
dali/internal/event/actors/actor-impl.cpp
dali/internal/event/actors/actor-impl.h
dali/internal/event/actors/custom-actor-internal.h
dali/internal/event/actors/image-actor-impl.cpp
dali/internal/event/size-negotiation/relayout-controller-impl.cpp
dali/internal/event/size-negotiation/relayout-controller-impl.h
dali/public-api/actors/actor-enumerations.h
dali/public-api/actors/actor.cpp
dali/public-api/actors/actor.h
dali/public-api/actors/custom-actor-impl.cpp
dali/public-api/actors/custom-actor-impl.h

index 077d836..6cb2657 100644 (file)
@@ -55,8 +55,8 @@ void CheckResults( Actor root )
 
   Internal::Actor& rootImpl = GetImplementation( root );
 
-  DALI_TEST_CHECK( rootImpl.IsLayoutDirty( WIDTH ) == expectedWidthDirty );
-  DALI_TEST_CHECK( rootImpl.IsLayoutDirty( HEIGHT ) == expectedHeightDirty );
+  DALI_TEST_CHECK( rootImpl.IsLayoutDirty( Dimension::WIDTH ) == expectedWidthDirty );
+  DALI_TEST_CHECK( rootImpl.IsLayoutDirty( Dimension::HEIGHT ) == expectedHeightDirty );
 
   for( unsigned int i = 0, numChildren = root.GetChildCount(); i < numChildren; ++i )
   {
@@ -71,14 +71,14 @@ void CheckResults( Actor root )
  *
  * @return Return the new actor
  */
-Actor NewRelayoutActor( bool expectedWidthDirty, bool expectedHeightDirty, ResizePolicy widthPolicy, ResizePolicy heightPolicy )
+Actor NewRelayoutActor( bool expectedWidthDirty, bool expectedHeightDirty, ResizePolicy::Type widthPolicy, ResizePolicy::Type heightPolicy )
 {
   Actor actor = Actor::New();
 
   actor.SetRelayoutEnabled( true );
 
-  actor.SetResizePolicy( widthPolicy, WIDTH );
-  actor.SetResizePolicy( heightPolicy, HEIGHT );
+  actor.SetResizePolicy( widthPolicy, Dimension::WIDTH );
+  actor.SetResizePolicy( heightPolicy, Dimension::HEIGHT );
 
   // Expected results for this actor
   actor.RegisterProperty( EXPECTED_WIDTH_DIRTY, expectedWidthDirty, Property::READ_WRITE );
@@ -92,7 +92,7 @@ Actor NewRelayoutActor( bool expectedWidthDirty, bool expectedHeightDirty, Resiz
  *
  * @return Return the new actor
  */
-Actor NewRelayoutRootActor( bool requestWidth, bool requestHeight, bool expectedWidthDirty, bool expectedHeightDirty, ResizePolicy widthPolicy, ResizePolicy heightPolicy )
+Actor NewRelayoutRootActor( bool requestWidth, bool requestHeight, bool expectedWidthDirty, bool expectedHeightDirty, ResizePolicy::Type widthPolicy, ResizePolicy::Type heightPolicy )
 {
   Actor actor = NewRelayoutActor( expectedWidthDirty, expectedHeightDirty, widthPolicy, heightPolicy );
 
@@ -115,7 +115,7 @@ void TestTree( TestApplication& application, Actor root, Actor entryPoint = Acto
   const bool widthRequest = root.GetProperty( root.GetPropertyIndex( REQUEST_WIDTH ) ).Get< bool >();
   const bool heightRequest = root.GetProperty( root.GetPropertyIndex( REQUEST_HEIGHT ) ).Get< bool >();
 
-  const Dimension dimensions = Dimension( ( ( widthRequest ) ? WIDTH : 0 ) | ( ( heightRequest ) ? HEIGHT : 0 ) );
+  const Dimension::Type dimensions = Dimension::Type( ( ( widthRequest ) ? Dimension::WIDTH : 0 ) | ( ( heightRequest ) ? Dimension::HEIGHT : 0 ) );
 
   controller->RequestRelayout( ( entryPoint ) ? entryPoint : root, dimensions );
 
@@ -158,7 +158,7 @@ int UtcDaliRelayoutController_Relayout_SingleActor(void)
   TestApplication application;
 
   // Construct scene
-  Actor parent = NewRelayoutRootActor( true, true, true, true, FIXED, FIXED );
+  Actor parent = NewRelayoutRootActor( true, true, true, true, ResizePolicy::FIXED, ResizePolicy::FIXED );
 
   TestTree( application, parent );
 
@@ -173,10 +173,10 @@ int UtcDaliRelayoutController_Relayout_FixedParent(void)
   controller->SetEnabled( false );
 
   // Construct scene
-  Actor parent = NewRelayoutRootActor( true, true, true, true, FIXED, FIXED );
+  Actor parent = NewRelayoutRootActor( true, true, true, true, ResizePolicy::FIXED, ResizePolicy::FIXED );
 
   // Add a child
-  Actor child = NewRelayoutActor( false, false, FIXED, FIXED );
+  Actor child = NewRelayoutActor( false, false, ResizePolicy::FIXED, ResizePolicy::FIXED );
   parent.Add( child );
 
   TestTree( application, parent );
@@ -192,10 +192,10 @@ int UtcDaliRelayoutController_Relayout_NaturalParent(void)
   controller->SetEnabled( false );
 
   // Construct scene
-  Actor parent = NewRelayoutRootActor( true, true, true, true, USE_NATURAL_SIZE, USE_NATURAL_SIZE );
+  Actor parent = NewRelayoutRootActor( true, true, true, true, ResizePolicy::USE_NATURAL_SIZE, ResizePolicy::USE_NATURAL_SIZE );
 
   // Add a child
-  Actor child = NewRelayoutActor( false, false, FIXED, FIXED );
+  Actor child = NewRelayoutActor( false, false, ResizePolicy::FIXED, ResizePolicy::FIXED );
   parent.Add( child );
 
   // Run the test
@@ -212,10 +212,10 @@ int UtcDaliRelayoutController_Relayout_FillParent(void)
   controller->SetEnabled( false );
 
   // Construct scene
-  Actor parent = NewRelayoutRootActor( true, true, true, true, FILL_TO_PARENT, FILL_TO_PARENT );
+  Actor parent = NewRelayoutRootActor( true, true, true, true, ResizePolicy::FILL_TO_PARENT, ResizePolicy::FILL_TO_PARENT );
 
   // Add a child
-  Actor child = NewRelayoutActor( false, false, FIXED, FIXED );
+  Actor child = NewRelayoutActor( false, false, ResizePolicy::FIXED, ResizePolicy::FIXED );
   parent.Add( child );
 
   // Run the test
@@ -232,10 +232,10 @@ int UtcDaliRelayoutController_Relayout_FitParent(void)
   controller->SetEnabled( false );
 
   // Construct scene
-  Actor parent = NewRelayoutRootActor( true, true, true, true, FIT_TO_CHILDREN, FIT_TO_CHILDREN );
+  Actor parent = NewRelayoutRootActor( true, true, true, true, ResizePolicy::FIT_TO_CHILDREN, ResizePolicy::FIT_TO_CHILDREN );
 
   // Add a child
-  Actor child = NewRelayoutActor( false, false, FIXED, FIXED );
+  Actor child = NewRelayoutActor( false, false, ResizePolicy::FIXED, ResizePolicy::FIXED );
   parent.Add( child );
 
   // Run the test
@@ -252,10 +252,10 @@ int UtcDaliRelayoutController_Relayout_DepParent1(void)
   controller->SetEnabled( false );
 
   // Construct scene
-  Actor parent = NewRelayoutRootActor( true, true, true, true, DIMENSION_DEPENDENCY, FIT_TO_CHILDREN );
+  Actor parent = NewRelayoutRootActor( true, true, true, true, ResizePolicy::DIMENSION_DEPENDENCY, ResizePolicy::FIT_TO_CHILDREN );
 
   // Add a child
-  Actor child = NewRelayoutActor( false, false, FIXED, FIXED );
+  Actor child = NewRelayoutActor( false, false, ResizePolicy::FIXED, ResizePolicy::FIXED );
   parent.Add( child );
 
   // Run the test
@@ -272,9 +272,9 @@ int UtcDaliRelayoutController_Relayout_DepParent2(void)
   controller->SetEnabled( false );
 
   // Construct scene
-  Actor parent = NewRelayoutRootActor( true, true, true, true, FIT_TO_CHILDREN, DIMENSION_DEPENDENCY );
+  Actor parent = NewRelayoutRootActor( true, true, true, true, ResizePolicy::FIT_TO_CHILDREN, ResizePolicy::DIMENSION_DEPENDENCY );
 
-  Actor child = NewRelayoutActor( false, false, FIXED, FIXED );
+  Actor child = NewRelayoutActor( false, false, ResizePolicy::FIXED, ResizePolicy::FIXED );
   parent.Add( child );
 
 
@@ -292,10 +292,10 @@ int UtcDaliRelayoutController_Relayout_Child1(void)
   controller->SetEnabled( false );
 
   // Construct scene
-  Actor parent = NewRelayoutRootActor( true, true, true, true, FIT_TO_CHILDREN, FIT_TO_CHILDREN );
+  Actor parent = NewRelayoutRootActor( true, true, true, true, ResizePolicy::FIT_TO_CHILDREN, ResizePolicy::FIT_TO_CHILDREN );
 
   // Add a child
-  Actor child = NewRelayoutActor( true, true, FIXED, FIXED );
+  Actor child = NewRelayoutActor( true, true, ResizePolicy::FIXED, ResizePolicy::FIXED );
   parent.Add( child );
 
   // Run the test
@@ -312,10 +312,10 @@ int UtcDaliRelayoutController_Relayout_Child2(void)
   controller->SetEnabled( false );
 
   // Construct scene
-  Actor parent = NewRelayoutRootActor( true, true, false, false, FIXED, FIXED );
+  Actor parent = NewRelayoutRootActor( true, true, false, false, ResizePolicy::FIXED, ResizePolicy::FIXED );
 
   // Add a child
-  Actor child = NewRelayoutActor( true, true, FIXED, FIXED );
+  Actor child = NewRelayoutActor( true, true, ResizePolicy::FIXED, ResizePolicy::FIXED );
   parent.Add( child );
 
   // Run the test
@@ -332,30 +332,30 @@ int UtcDaliRelayoutController_Relayout_Complex1(void)
   controller->SetEnabled( false );
 
   // Construct scene
-  Actor parent = NewRelayoutRootActor( true, true, true, true, FIXED, FIXED );
+  Actor parent = NewRelayoutRootActor( true, true, true, true, ResizePolicy::FIXED, ResizePolicy::FIXED );
 
   // Add children
-  Actor child1 = NewRelayoutActor( true, false, FILL_TO_PARENT, FIXED );
+  Actor child1 = NewRelayoutActor( true, false, ResizePolicy::FILL_TO_PARENT, ResizePolicy::FIXED );
   parent.Add( child1 );
 
-  Actor child2 = NewRelayoutActor( false, true, FIXED, FILL_TO_PARENT );
+  Actor child2 = NewRelayoutActor( false, true, ResizePolicy::FIXED, ResizePolicy::FILL_TO_PARENT );
   parent.Add( child2 );
 
-  Actor child3 = NewRelayoutActor( false, false, USE_NATURAL_SIZE, FIXED );
+  Actor child3 = NewRelayoutActor( false, false, ResizePolicy::USE_NATURAL_SIZE, ResizePolicy::FIXED );
   parent.Add( child3 );
 
   // Grand children 1
-  Actor grandChild1_1 = NewRelayoutActor( true, false, FILL_TO_PARENT, FIXED );
+  Actor grandChild1_1 = NewRelayoutActor( true, false, ResizePolicy::FILL_TO_PARENT, ResizePolicy::FIXED );
   child1.Add( grandChild1_1 );
 
-  Actor grandChild1_2 = NewRelayoutActor( false, false, FIXED, FILL_TO_PARENT );
+  Actor grandChild1_2 = NewRelayoutActor( false, false, ResizePolicy::FIXED, ResizePolicy::FILL_TO_PARENT );
   child1.Add( grandChild1_2 );
 
   // Grand children 2
-  Actor grandChild2_1 = NewRelayoutActor( false, false, FIXED, FIXED );
+  Actor grandChild2_1 = NewRelayoutActor( false, false, ResizePolicy::FIXED, ResizePolicy::FIXED );
   child2.Add( grandChild2_1 );
 
-  Actor grandChild2_2 = NewRelayoutActor( false, false, FIXED, FIXED );
+  Actor grandChild2_2 = NewRelayoutActor( false, false, ResizePolicy::FIXED, ResizePolicy::FIXED );
   child2.Add( grandChild2_2 );
 
   // Run the test
@@ -372,30 +372,30 @@ int UtcDaliRelayoutController_Relayout_Complex2(void)
   controller->SetEnabled( false );
 
   // Construct scene
-  Actor parent = NewRelayoutRootActor( true, false, true, false, FIXED, FIXED );
+  Actor parent = NewRelayoutRootActor( true, false, true, false, ResizePolicy::FIXED, ResizePolicy::FIXED );
 
   // Add children
-  Actor child1 = NewRelayoutActor( true, false, FILL_TO_PARENT, FIXED );
+  Actor child1 = NewRelayoutActor( true, false, ResizePolicy::FILL_TO_PARENT, ResizePolicy::FIXED );
   parent.Add( child1 );
 
-  Actor child2 = NewRelayoutActor( false, false, FIXED, FILL_TO_PARENT );
+  Actor child2 = NewRelayoutActor( false, false, ResizePolicy::FIXED, ResizePolicy::FILL_TO_PARENT );
   parent.Add( child2 );
 
-  Actor child3 = NewRelayoutActor( false, false, USE_NATURAL_SIZE, FIXED );
+  Actor child3 = NewRelayoutActor( false, false, ResizePolicy::USE_NATURAL_SIZE, ResizePolicy::FIXED );
   parent.Add( child3 );
 
   // Grand children 1
-  Actor grandChild1_1 = NewRelayoutActor( true, false, FILL_TO_PARENT, FIXED );
+  Actor grandChild1_1 = NewRelayoutActor( true, false, ResizePolicy::FILL_TO_PARENT, ResizePolicy::FIXED );
   child1.Add( grandChild1_1 );
 
-  Actor grandChild1_2 = NewRelayoutActor( false, false, FIXED, FILL_TO_PARENT );
+  Actor grandChild1_2 = NewRelayoutActor( false, false, ResizePolicy::FIXED, ResizePolicy::FILL_TO_PARENT );
   child1.Add( grandChild1_2 );
 
   // Grand children 2
-  Actor grandChild2_1 = NewRelayoutActor( false, false, FIXED, FIXED );
+  Actor grandChild2_1 = NewRelayoutActor( false, false, ResizePolicy::FIXED, ResizePolicy::FIXED );
   child2.Add( grandChild2_1 );
 
-  Actor grandChild2_2 = NewRelayoutActor( false, false, FIXED, FIXED );
+  Actor grandChild2_2 = NewRelayoutActor( false, false, ResizePolicy::FIXED, ResizePolicy::FIXED );
   child2.Add( grandChild2_2 );
 
   // Run the test
@@ -412,30 +412,30 @@ int UtcDaliRelayoutController_Relayout_Complex3(void)
   controller->SetEnabled( false );
 
   // Construct scene
-  Actor parent = NewRelayoutRootActor( false, true, false, true, FIXED, FIXED );
+  Actor parent = NewRelayoutRootActor( false, true, false, true, ResizePolicy::FIXED, ResizePolicy::FIXED );
 
   // Add children
-  Actor child1 = NewRelayoutActor( false, false, FILL_TO_PARENT, FIXED );
+  Actor child1 = NewRelayoutActor( false, false, ResizePolicy::FILL_TO_PARENT, ResizePolicy::FIXED );
   parent.Add( child1 );
 
-  Actor child2 = NewRelayoutActor( false, true, FIXED, FILL_TO_PARENT );
+  Actor child2 = NewRelayoutActor( false, true, ResizePolicy::FIXED, ResizePolicy::FILL_TO_PARENT );
   parent.Add( child2 );
 
-  Actor child3 = NewRelayoutActor( false, false, USE_NATURAL_SIZE, FIXED );
+  Actor child3 = NewRelayoutActor( false, false, ResizePolicy::USE_NATURAL_SIZE, ResizePolicy::FIXED );
   parent.Add( child3 );
 
   // Grand children 1
-  Actor grandChild1_1 = NewRelayoutActor( false, false, FILL_TO_PARENT, FIXED );
+  Actor grandChild1_1 = NewRelayoutActor( false, false, ResizePolicy::FILL_TO_PARENT, ResizePolicy::FIXED );
   child1.Add( grandChild1_1 );
 
-  Actor grandChild1_2 = NewRelayoutActor( false, false, FIXED, FILL_TO_PARENT );
+  Actor grandChild1_2 = NewRelayoutActor( false, false, ResizePolicy::FIXED, ResizePolicy::FILL_TO_PARENT );
   child1.Add( grandChild1_2 );
 
   // Grand children 2
-  Actor grandChild2_1 = NewRelayoutActor( false, false, FIXED, FIXED );
+  Actor grandChild2_1 = NewRelayoutActor( false, false, ResizePolicy::FIXED, ResizePolicy::FIXED );
   child2.Add( grandChild2_1 );
 
-  Actor grandChild2_2 = NewRelayoutActor( false, false, FIXED, FIXED );
+  Actor grandChild2_2 = NewRelayoutActor( false, false, ResizePolicy::FIXED, ResizePolicy::FIXED );
   child2.Add( grandChild2_2 );
 
   // Run the test
@@ -452,11 +452,11 @@ int UtcDaliRelayoutController_Relayout_Dependency(void)
   controller->SetEnabled( false );
 
   // Construct scene
-  Actor parent = NewRelayoutRootActor( true, true, false, false, FIXED, FIXED );
+  Actor parent = NewRelayoutRootActor( true, true, false, false, ResizePolicy::FIXED, ResizePolicy::FIXED );
 
   // Add a child
-  Actor child = NewRelayoutActor( true, true, FILL_TO_PARENT, FIXED );
-  child.SetResizePolicy( DIMENSION_DEPENDENCY, HEIGHT );
+  Actor child = NewRelayoutActor( true, true, ResizePolicy::FILL_TO_PARENT, ResizePolicy::FIXED );
+  child.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT );
   parent.Add( child );
 
   // Run the test
index 295965e..d883b56 100644 (file)
@@ -2688,10 +2688,10 @@ int UtcDaliRelayoutProperties_ResizePolicies(void)
   DALI_TEST_EQUALS( actor.GetProperty( Actor::Property::HEIGHT_RESIZE_POLICY ).Get< std::string >(), "FIXED", TEST_LOCATION );
 
   // Set resize policy for all dimensions
-  actor.SetResizePolicy( USE_NATURAL_SIZE, ALL_DIMENSIONS );
-  for( unsigned int i = 0; i < DIMENSION_COUNT; ++i)
+  actor.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
+  for( unsigned int i = 0; i < Dimension::DIMENSION_COUNT; ++i)
   {
-    DALI_TEST_EQUALS( actor.GetResizePolicy( static_cast< Dimension >( 1 << i ) ), USE_NATURAL_SIZE, TEST_LOCATION );
+    DALI_TEST_EQUALS( actor.GetResizePolicy( static_cast< Dimension::Type >( 1 << i ) ), ResizePolicy::USE_NATURAL_SIZE, TEST_LOCATION );
   }
 
   // Set individual dimensions
index 06a37dc..87dd3ca 100644 (file)
@@ -188,24 +188,24 @@ struct TestCustomActor : public CustomActorImpl
   {
   }
 
-  virtual void OnSetResizePolicy( ResizePolicy policy, Dimension dimension )
+  virtual void OnSetResizePolicy( ResizePolicy::Type policy, Dimension::Type dimension )
   {
   }
 
-  virtual void OnCalculateRelayoutSize( Dimension dimension )
+  virtual void OnCalculateRelayoutSize( Dimension::Type dimension )
   {
   }
 
-  virtual float CalculateChildSize( const Dali::Actor& child, Dimension dimension )
+  virtual float CalculateChildSize( const Dali::Actor& child, Dimension::Type dimension )
   {
     return 0.0f;
   }
 
-  virtual void OnLayoutNegotiated( float size, Dimension dimension )
+  virtual void OnLayoutNegotiated( float size, Dimension::Type dimension )
   {
   }
 
-  virtual bool RelayoutDependentOnChildren( Dimension dimension = ALL_DIMENSIONS )
+  virtual bool RelayoutDependentOnChildren( Dimension::Type dimension = Dimension::ALL_DIMENSIONS )
   {
     return false;
   }
@@ -523,24 +523,24 @@ public:
   {
   }
 
-  virtual void OnSetResizePolicy( ResizePolicy policy, Dimension dimension )
+  virtual void OnSetResizePolicy( ResizePolicy::Type policy, Dimension::Type dimension )
   {
   }
 
-  virtual void OnCalculateRelayoutSize( Dimension dimension )
+  virtual void OnCalculateRelayoutSize( Dimension::Type dimension )
   {
   }
 
-  virtual float CalculateChildSize( const Dali::Actor& child, Dimension dimension )
+  virtual float CalculateChildSize( const Dali::Actor& child, Dimension::Type dimension )
   {
     return 0.0f;
   }
 
-  virtual void OnLayoutNegotiated( float size, Dimension dimension )
+  virtual void OnLayoutNegotiated( float size, Dimension::Type dimension )
   {
   }
 
-  virtual bool RelayoutDependentOnChildren( Dimension dimension = ALL_DIMENSIONS )
+  virtual bool RelayoutDependentOnChildren( Dimension::Type dimension = Dimension::ALL_DIMENSIONS )
   {
     return false;
   }
@@ -702,11 +702,11 @@ public:
   {
   }
 
-  virtual void OnLayoutNegotiated( float size, Dimension dimension )
+  virtual void OnLayoutNegotiated( float size, Dimension::Type dimension )
   {
   }
 
-  virtual void OnCalculateRelayoutSize( Dimension dimension )
+  virtual void OnCalculateRelayoutSize( Dimension::Type dimension )
   {
   }
 
index 96cb8fa..7c4637a 100644 (file)
@@ -261,24 +261,24 @@ struct MyTestCustomActor : public CustomActorImpl
   {
   }
 
-  virtual void OnSetResizePolicy( ResizePolicy policy, Dimension dimension )
+  virtual void OnSetResizePolicy( ResizePolicy::Type policy, Dimension::Type dimension )
   {
   }
 
-  virtual void OnCalculateRelayoutSize( Dimension dimension )
+  virtual void OnCalculateRelayoutSize( Dimension::Type dimension )
   {
   }
 
-  virtual float CalculateChildSize( const Dali::Actor& child, Dimension dimension )
+  virtual float CalculateChildSize( const Dali::Actor& child, Dimension::Type dimension )
   {
     return 0.0f;
   }
 
-  virtual void OnLayoutNegotiated( float size, Dimension dimension )
+  virtual void OnLayoutNegotiated( float size, Dimension::Type dimension )
   {
   }
 
-  virtual bool RelayoutDependentOnChildren( Dimension dimension = ALL_DIMENSIONS )
+  virtual bool RelayoutDependentOnChildren( Dimension::Type dimension = Dimension::ALL_DIMENSIONS )
   {
     return false;
   }
index acfe0d7..b705387 100644 (file)
@@ -66,6 +66,35 @@ using Dali::Internal::SceneGraph::PropertyBase;
 
 namespace Dali
 {
+namespace ResizePolicy
+{
+
+namespace
+{
+DALI_ENUM_TO_STRING_TABLE_BEGIN( Type )DALI_ENUM_TO_STRING( FIXED )
+DALI_ENUM_TO_STRING( USE_NATURAL_SIZE )
+DALI_ENUM_TO_STRING( FILL_TO_PARENT )
+DALI_ENUM_TO_STRING( SIZE_RELATIVE_TO_PARENT )
+DALI_ENUM_TO_STRING( SIZE_FIXED_OFFSET_FROM_PARENT )
+DALI_ENUM_TO_STRING( FIT_TO_CHILDREN )
+DALI_ENUM_TO_STRING( DIMENSION_DEPENDENCY )
+DALI_ENUM_TO_STRING( USE_ASSIGNED_SIZE )
+DALI_ENUM_TO_STRING_TABLE_END( Type )
+
+} // unnamed namespace
+} // ResizePolicy
+
+namespace SizeScalePolicy
+{
+namespace
+{
+// Enumeration to / from string conversion tables
+DALI_ENUM_TO_STRING_TABLE_BEGIN( Type )DALI_ENUM_TO_STRING( USE_SIZE_SET )
+DALI_ENUM_TO_STRING( FIT_WITH_ASPECT_RATIO )
+DALI_ENUM_TO_STRING( FILL_WITH_ASPECT_RATIO )
+DALI_ENUM_TO_STRING_TABLE_END( Type )
+} // unnamed namespace
+} // SizeScalePolicy
 
 namespace Internal
 {
@@ -79,41 +108,41 @@ ActorContainer Actor::mNullChildren;
 struct Actor::RelayoutData
 {
   RelayoutData()
-      : sizeModeFactor( Vector3::ONE ), preferredSize( Vector2::ZERO ), sizeSetPolicy( USE_SIZE_SET ), relayoutEnabled( false ), insideRelayout( false )
+      : sizeModeFactor( Vector3::ONE ), preferredSize( Vector2::ZERO ), sizeSetPolicy( SizeScalePolicy::USE_SIZE_SET ), relayoutEnabled( false ), insideRelayout( false )
   {
     // Set size negotiation defaults
-    for( unsigned int i = 0; i < DIMENSION_COUNT; ++i )
+    for( unsigned int i = 0; i < Dimension::DIMENSION_COUNT; ++i )
     {
-      resizePolicies[ i ] = FIXED;
+      resizePolicies[ i ] = ResizePolicy::FIXED;
       negotiatedDimensions[ i ] = 0.0f;
       dimensionNegotiated[ i ] = false;
       dimensionDirty[ i ] = false;
-      dimensionDependencies[ i ] = ALL_DIMENSIONS;
+      dimensionDependencies[ i ] = Dimension::ALL_DIMENSIONS;
       dimensionPadding[ i ] = Vector2( 0.0f, 0.0f );
       minimumSize[ i ] = 0.0f;
       maximumSize[ i ] = FLT_MAX;
     }
   }
 
-  ResizePolicy resizePolicies[ DIMENSION_COUNT ];      ///< Resize policies
+  ResizePolicy::Type resizePolicies[ Dimension::DIMENSION_COUNT ];      ///< Resize policies
 
-  Dimension dimensionDependencies[ DIMENSION_COUNT ];  ///< A list of dimension dependencies
+  Dimension::Type dimensionDependencies[ Dimension::DIMENSION_COUNT ];  ///< A list of dimension dependencies
 
-  Vector2 dimensionPadding[ DIMENSION_COUNT ];         ///< Padding for each dimension. X = start (e.g. left, bottom), y = end (e.g. right, top)
+  Vector2 dimensionPadding[ Dimension::DIMENSION_COUNT ];         ///< Padding for each dimension. X = start (e.g. left, bottom), y = end (e.g. right, top)
 
-  float negotiatedDimensions[ DIMENSION_COUNT ];       ///< Storage for when a dimension is negotiated but before set on actor
+  float negotiatedDimensions[ Dimension::DIMENSION_COUNT ];       ///< Storage for when a dimension is negotiated but before set on actor
 
-  float minimumSize[ DIMENSION_COUNT ];                ///< The minimum size an actor can be
-  float maximumSize[ DIMENSION_COUNT ];                ///< The maximum size an actor can be
+  float minimumSize[ Dimension::DIMENSION_COUNT ];                ///< The minimum size an actor can be
+  float maximumSize[ Dimension::DIMENSION_COUNT ];                ///< The maximum size an actor can be
 
-  bool dimensionNegotiated[ DIMENSION_COUNT ];         ///< Has the dimension been negotiated
-  bool dimensionDirty[ DIMENSION_COUNT ];              ///< Flags indicating whether the layout dimension is dirty or not
+  bool dimensionNegotiated[ Dimension::DIMENSION_COUNT ];         ///< Has the dimension been negotiated
+  bool dimensionDirty[ Dimension::DIMENSION_COUNT ];              ///< Flags indicating whether the layout dimension is dirty or not
 
   Vector3 sizeModeFactor;                              ///< Factor of size used for certain SizeModes
 
   Vector2 preferredSize;                               ///< The preferred size of the actor
 
-  SizeScalePolicy sizeSetPolicy :3;            ///< Policy to apply when setting size. Enough room for the enum
+  SizeScalePolicy::Type sizeSetPolicy :3;            ///< Policy to apply when setting size. Enough room for the enum
 
   bool relayoutEnabled :1;                   ///< Flag to specify if this actor should be included in size negotiation or not (defaults to true)
   bool insideRelayout :1;                    ///< Locking flag to prevent recursive relayouts on size set
@@ -220,23 +249,6 @@ const char* const SIGNAL_OFF_STAGE = "off-stage";
 const char* const ACTION_SHOW = "show";
 const char* const ACTION_HIDE = "hide";
 
-// Enumeration to / from string conversion tables
-
-DALI_ENUM_TO_STRING_TABLE_BEGIN( ResizePolicy )DALI_ENUM_TO_STRING( FIXED )
-DALI_ENUM_TO_STRING( USE_NATURAL_SIZE )
-DALI_ENUM_TO_STRING( FILL_TO_PARENT )
-DALI_ENUM_TO_STRING( SIZE_RELATIVE_TO_PARENT )
-DALI_ENUM_TO_STRING( SIZE_FIXED_OFFSET_FROM_PARENT )
-DALI_ENUM_TO_STRING( FIT_TO_CHILDREN )
-DALI_ENUM_TO_STRING( DIMENSION_DEPENDENCY )
-DALI_ENUM_TO_STRING( USE_ASSIGNED_SIZE )
-DALI_ENUM_TO_STRING_TABLE_END( ResizePolicy )
-
-DALI_ENUM_TO_STRING_TABLE_BEGIN( SizeScalePolicy )DALI_ENUM_TO_STRING( USE_SIZE_SET )
-DALI_ENUM_TO_STRING( FIT_WITH_ASPECT_RATIO )
-DALI_ENUM_TO_STRING( FILL_WITH_ASPECT_RATIO )
-DALI_ENUM_TO_STRING_TABLE_END( SizeScalePolicy )
-
 BaseHandle CreateActor()
 {
   return Dali::Actor::New();
@@ -259,16 +271,16 @@ TypeAction a2( mType, ACTION_HIDE, &Actor::DoAction );
  * @param[in] dimension The dimension to extract
  * @return Return the value for the dimension
  */
-float GetDimensionValue( const Vector2& values, Dimension dimension )
+float GetDimensionValue( const Vector2& values, Dimension::Type dimension )
 {
   switch( dimension )
   {
-    case WIDTH:
+    case Dimension::WIDTH:
     {
       return values.width;
     }
 
-    case HEIGHT:
+    case Dimension::HEIGHT:
     {
       return values.height;
     }
@@ -289,7 +301,7 @@ float GetDimensionValue( const Vector2& values, Dimension dimension )
  * @param[in] dimension The dimension to extract
  * @return Return the value for the dimension
  */
-float GetDimensionValue( const Vector3& values, Dimension dimension )
+float GetDimensionValue( const Vector3& values, Dimension::Type dimension )
 {
   return GetDimensionValue( values.GetVectorXY(), dimension );
 }
@@ -727,6 +739,8 @@ void Actor::SetPosition( float x, float y, float z )
 
 void Actor::SetPosition( const Vector3& position )
 {
+  mTargetPosition = position;
+
   if( NULL != mNode )
   {
     // mNode is being used in a separate thread; queue a message to set the value & base value
@@ -736,6 +750,8 @@ void Actor::SetPosition( const Vector3& position )
 
 void Actor::SetX( float x )
 {
+  mTargetPosition.x = x;
+
   if( NULL != mNode )
   {
     // mNode is being used in a separate thread; queue a message to set the value & base value
@@ -745,6 +761,8 @@ void Actor::SetX( float x )
 
 void Actor::SetY( float y )
 {
+  mTargetPosition.y = y;
+
   if( NULL != mNode )
   {
     // mNode is being used in a separate thread; queue a message to set the value & base value
@@ -754,6 +772,8 @@ void Actor::SetY( float y )
 
 void Actor::SetZ( float z )
 {
+  mTargetPosition.z = z;
+
   if( NULL != mNode )
   {
     // mNode is being used in a separate thread; queue a message to set the value & base value
@@ -763,6 +783,8 @@ void Actor::SetZ( float z )
 
 void Actor::TranslateBy( const Vector3& distance )
 {
+  mTargetPosition += distance;
+
   if( NULL != mNode )
   {
     // mNode is being used in a separate thread; queue a message to set the value & base value
@@ -781,6 +803,11 @@ const Vector3& Actor::GetCurrentPosition() const
   return Vector3::ZERO;
 }
 
+const Vector3& Actor::GetTargetPosition() const
+{
+  return mTargetPosition;
+}
+
 const Vector3& Actor::GetCurrentWorldPosition() const
 {
   if( NULL != mNode )
@@ -1265,11 +1292,11 @@ Vector3 Actor::GetNaturalSize() const
   return Vector3( 0.0f, 0.0f, 0.0f );
 }
 
-void Actor::SetResizePolicy( ResizePolicy policy, Dimension dimension )
+void Actor::SetResizePolicy( ResizePolicy::Type policy, Dimension::Type dimension )
 {
   EnsureRelayoutData();
 
-  for( unsigned int i = 0; i < DIMENSION_COUNT; ++i )
+  for( unsigned int i = 0; i < Dimension::DIMENSION_COUNT; ++i )
   {
     if( dimension & ( 1 << i ) )
     {
@@ -1277,16 +1304,16 @@ void Actor::SetResizePolicy( ResizePolicy policy, Dimension dimension )
     }
   }
 
-  if( policy == DIMENSION_DEPENDENCY )
+  if( policy == ResizePolicy::DIMENSION_DEPENDENCY )
   {
-    if( dimension & WIDTH )
+    if( dimension & Dimension::WIDTH )
     {
-      SetDimensionDependency( WIDTH, HEIGHT );
+      SetDimensionDependency( Dimension::WIDTH, Dimension::HEIGHT );
     }
 
-    if( dimension & HEIGHT )
+    if( dimension & Dimension::HEIGHT )
     {
-      SetDimensionDependency( HEIGHT, WIDTH );
+      SetDimensionDependency( Dimension::HEIGHT, Dimension::WIDTH );
     }
   }
 
@@ -1296,12 +1323,12 @@ void Actor::SetResizePolicy( ResizePolicy policy, Dimension dimension )
   RelayoutRequest();
 }
 
-ResizePolicy Actor::GetResizePolicy( Dimension dimension ) const
+ResizePolicy::Type Actor::GetResizePolicy( Dimension::Type dimension ) const
 {
   EnsureRelayoutData();
 
   // If more than one dimension is requested, just return the first one found
-  for( unsigned int i = 0; i < DIMENSION_COUNT; ++i )
+  for( unsigned int i = 0; i < Dimension::DIMENSION_COUNT; ++i )
   {
     if( ( dimension & ( 1 << i ) ) )
     {
@@ -1309,28 +1336,28 @@ ResizePolicy Actor::GetResizePolicy( Dimension dimension ) const
     }
   }
 
-  return FIXED;   // Default
+  return ResizePolicy::FIXED;   // Default
 }
 
-void Actor::SetSizeScalePolicy( SizeScalePolicy policy )
+void Actor::SetSizeScalePolicy( SizeScalePolicy::Type policy )
 {
   EnsureRelayoutData();
 
   mRelayoutData->sizeSetPolicy = policy;
 }
 
-SizeScalePolicy Actor::GetSizeScalePolicy() const
+SizeScalePolicy::Type Actor::GetSizeScalePolicy() const
 {
   EnsureRelayoutData();
 
   return mRelayoutData->sizeSetPolicy;
 }
 
-void Actor::SetDimensionDependency( Dimension dimension, Dimension dependency )
+void Actor::SetDimensionDependency( Dimension::Type dimension, Dimension::Type dependency )
 {
   EnsureRelayoutData();
 
-  for( unsigned int i = 0; i < DIMENSION_COUNT; ++i )
+  for( unsigned int i = 0; i < Dimension::DIMENSION_COUNT; ++i )
   {
     if( dimension & ( 1 << i ) )
     {
@@ -1339,12 +1366,12 @@ void Actor::SetDimensionDependency( Dimension dimension, Dimension dependency )
   }
 }
 
-Dimension Actor::GetDimensionDependency( Dimension dimension ) const
+Dimension::Type Actor::GetDimensionDependency( Dimension::Type dimension ) const
 {
   EnsureRelayoutData();
 
   // If more than one dimension is requested, just return the first one found
-  for( unsigned int i = 0; i < DIMENSION_COUNT; ++i )
+  for( unsigned int i = 0; i < Dimension::DIMENSION_COUNT; ++i )
   {
     if( ( dimension & ( 1 << i ) ) )
     {
@@ -1352,7 +1379,7 @@ Dimension Actor::GetDimensionDependency( Dimension dimension ) const
     }
   }
 
-  return ALL_DIMENSIONS;   // Default
+  return Dimension::ALL_DIMENSIONS;   // Default
 }
 
 void Actor::SetRelayoutEnabled( bool relayoutEnabled )
@@ -1374,11 +1401,11 @@ bool Actor::IsRelayoutEnabled() const
   return mRelayoutData && mRelayoutData->relayoutEnabled;
 }
 
-void Actor::SetLayoutDirty( bool dirty, Dimension dimension )
+void Actor::SetLayoutDirty( bool dirty, Dimension::Type dimension )
 {
   EnsureRelayoutData();
 
-  for( unsigned int i = 0; i < DIMENSION_COUNT; ++i )
+  for( unsigned int i = 0; i < Dimension::DIMENSION_COUNT; ++i )
   {
     if( dimension & ( 1 << i ) )
     {
@@ -1387,11 +1414,11 @@ void Actor::SetLayoutDirty( bool dirty, Dimension dimension )
   }
 }
 
-bool Actor::IsLayoutDirty( Dimension dimension ) const
+bool Actor::IsLayoutDirty( Dimension::Type dimension ) const
 {
   EnsureRelayoutData();
 
-  for( unsigned int i = 0; i < DIMENSION_COUNT; ++i )
+  for( unsigned int i = 0; i < Dimension::DIMENSION_COUNT; ++i )
   {
     if( ( dimension & ( 1 << i ) ) && mRelayoutData->dimensionDirty[ i ] )
     {
@@ -1402,14 +1429,14 @@ bool Actor::IsLayoutDirty( Dimension dimension ) const
   return false;
 }
 
-bool Actor::RelayoutPossible( Dimension dimension ) const
+bool Actor::RelayoutPossible( Dimension::Type dimension ) const
 {
   EnsureRelayoutData();
 
   return mRelayoutData->relayoutEnabled && !IsLayoutDirty( dimension );
 }
 
-bool Actor::RelayoutRequired( Dimension dimension ) const
+bool Actor::RelayoutRequired( Dimension::Type dimension ) const
 {
   EnsureRelayoutData();
 
@@ -2837,19 +2864,19 @@ void Actor::SetDefaultProperty( Property::Index index, const Property::Value& pr
 
     case Dali::Actor::Property::WIDTH_RESIZE_POLICY:
     {
-      SetResizePolicy( Scripting::GetEnumeration< ResizePolicy >( property.Get< std::string >().c_str(), ResizePolicyTable, ResizePolicyTableCount ), WIDTH );
+      SetResizePolicy( Scripting::GetEnumeration< ResizePolicy::Type >( property.Get< std::string >().c_str(), ResizePolicy::TypeTable, ResizePolicy::TypeTableCount ), Dimension::WIDTH );
       break;
     }
 
     case Dali::Actor::Property::HEIGHT_RESIZE_POLICY:
     {
-      SetResizePolicy( Scripting::GetEnumeration< ResizePolicy >( property.Get< std::string >().c_str(), ResizePolicyTable, ResizePolicyTableCount ), HEIGHT );
+      SetResizePolicy( Scripting::GetEnumeration< ResizePolicy::Type >( property.Get< std::string >().c_str(), ResizePolicy::TypeTable, ResizePolicy::TypeTableCount ), Dimension::HEIGHT );
       break;
     }
 
     case Dali::Actor::Property::SIZE_SCALE_POLICY:
     {
-      SetSizeScalePolicy( Scripting::GetEnumeration< SizeScalePolicy >( property.Get< std::string >().c_str(), SizeScalePolicyTable, SizeScalePolicyTableCount ) );
+      SetSizeScalePolicy( Scripting::GetEnumeration< SizeScalePolicy::Type >( property.Get< std::string >().c_str(), SizeScalePolicy::TypeTable, SizeScalePolicy::TypeTableCount ) );
       break;
     }
 
@@ -2857,7 +2884,7 @@ void Actor::SetDefaultProperty( Property::Index index, const Property::Value& pr
     {
       if( property.Get< bool >() )
       {
-        SetResizePolicy( DIMENSION_DEPENDENCY, WIDTH );
+        SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::WIDTH );
       }
       break;
     }
@@ -2866,7 +2893,7 @@ void Actor::SetDefaultProperty( Property::Index index, const Property::Value& pr
     {
       if( property.Get< bool >() )
       {
-        SetResizePolicy( DIMENSION_DEPENDENCY, HEIGHT );
+        SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT );
       }
       break;
     }
@@ -2874,24 +2901,24 @@ void Actor::SetDefaultProperty( Property::Index index, const Property::Value& pr
     case Dali::Actor::Property::PADDING:
     {
       Vector4 padding = property.Get< Vector4 >();
-      SetPadding( Vector2( padding.x, padding.y ), WIDTH );
-      SetPadding( Vector2( padding.z, padding.w ), HEIGHT );
+      SetPadding( Vector2( padding.x, padding.y ), Dimension::WIDTH );
+      SetPadding( Vector2( padding.z, padding.w ), Dimension::HEIGHT );
       break;
     }
 
     case Dali::Actor::Property::MINIMUM_SIZE:
     {
       Vector2 size = property.Get< Vector2 >();
-      SetMinimumSize( size.x, WIDTH );
-      SetMinimumSize( size.y, HEIGHT );
+      SetMinimumSize( size.x, Dimension::WIDTH );
+      SetMinimumSize( size.y, Dimension::HEIGHT );
       break;
     }
 
     case Dali::Actor::Property::MAXIMUM_SIZE:
     {
       Vector2 size = property.Get< Vector2 >();
-      SetMaximumSize( size.x, WIDTH );
-      SetMaximumSize( size.y, HEIGHT );
+      SetMaximumSize( size.x, Dimension::WIDTH );
+      SetMaximumSize( size.y, Dimension::HEIGHT );
       break;
     }
 
@@ -3295,51 +3322,51 @@ Property::Value Actor::GetDefaultProperty( Property::Index index ) const
 
     case Dali::Actor::Property::WIDTH_RESIZE_POLICY:
     {
-      value = Scripting::GetLinearEnumerationName< ResizePolicy >( GetResizePolicy( WIDTH ), ResizePolicyTable, ResizePolicyTableCount );
+      value = Scripting::GetLinearEnumerationName< ResizePolicy::Type >( GetResizePolicy( Dimension::WIDTH ), ResizePolicy::TypeTable, ResizePolicy::TypeTableCount );
       break;
     }
 
     case Dali::Actor::Property::HEIGHT_RESIZE_POLICY:
     {
-      value = Scripting::GetLinearEnumerationName< ResizePolicy >( GetResizePolicy( HEIGHT ), ResizePolicyTable, ResizePolicyTableCount );
+      value = Scripting::GetLinearEnumerationName< ResizePolicy::Type >( GetResizePolicy( Dimension::HEIGHT ), ResizePolicy::TypeTable, ResizePolicy::TypeTableCount );
       break;
     }
 
     case Dali::Actor::Property::SIZE_SCALE_POLICY:
     {
-      value = Scripting::GetLinearEnumerationName< SizeScalePolicy >( GetSizeScalePolicy(), SizeScalePolicyTable, SizeScalePolicyTableCount );
+      value = Scripting::GetLinearEnumerationName< SizeScalePolicy::Type >( GetSizeScalePolicy(), SizeScalePolicy::TypeTable, SizeScalePolicy::TypeTableCount );
       break;
     }
 
     case Dali::Actor::Property::WIDTH_FOR_HEIGHT:
     {
-      value = ( GetResizePolicy( WIDTH ) == DIMENSION_DEPENDENCY ) && ( GetDimensionDependency( WIDTH ) == HEIGHT );
+      value = ( GetResizePolicy( Dimension::WIDTH ) == ResizePolicy::DIMENSION_DEPENDENCY ) && ( GetDimensionDependency( Dimension::WIDTH ) == Dimension::HEIGHT );
       break;
     }
 
     case Dali::Actor::Property::HEIGHT_FOR_WIDTH:
     {
-      value = ( GetResizePolicy( HEIGHT ) == DIMENSION_DEPENDENCY ) && ( GetDimensionDependency( HEIGHT ) == WIDTH );
+      value = ( GetResizePolicy( Dimension::HEIGHT ) == ResizePolicy::DIMENSION_DEPENDENCY ) && ( GetDimensionDependency( Dimension::HEIGHT ) == Dimension::WIDTH );
       break;
     }
 
     case Dali::Actor::Property::PADDING:
     {
-      Vector2 widthPadding = GetPadding( WIDTH );
-      Vector2 heightPadding = GetPadding( HEIGHT );
+      Vector2 widthPadding = GetPadding( Dimension::WIDTH );
+      Vector2 heightPadding = GetPadding( Dimension::HEIGHT );
       value = Vector4( widthPadding.x, widthPadding.y, heightPadding.x, heightPadding.y );
       break;
     }
 
     case Dali::Actor::Property::MINIMUM_SIZE:
     {
-      value = Vector2( GetMinimumSize( WIDTH ), GetMinimumSize( HEIGHT ) );
+      value = Vector2( GetMinimumSize( Dimension::WIDTH ), GetMinimumSize( Dimension::HEIGHT ) );
       break;
     }
 
     case Dali::Actor::Property::MAXIMUM_SIZE:
     {
-      value = Vector2( GetMaximumSize( WIDTH ), GetMaximumSize( HEIGHT ) );
+      value = Vector2( GetMaximumSize( Dimension::WIDTH ), GetMaximumSize( Dimension::HEIGHT ) );
       break;
     }
 
@@ -3807,15 +3834,15 @@ void Actor::EnsureRelayoutData() const
   }
 }
 
-bool Actor::RelayoutDependentOnParent( Dimension dimension )
+bool Actor::RelayoutDependentOnParent( Dimension::Type dimension )
 {
   // Check if actor is dependent on parent
-  for( unsigned int i = 0; i < DIMENSION_COUNT; ++i )
+  for( unsigned int i = 0; i < Dimension::DIMENSION_COUNT; ++i )
   {
     if( ( dimension & ( 1 << i ) ) )
     {
-      const ResizePolicy resizePolicy = GetResizePolicy( static_cast< Dimension >( 1 << i ) );
-      if( resizePolicy == FILL_TO_PARENT || resizePolicy == SIZE_RELATIVE_TO_PARENT || resizePolicy == SIZE_FIXED_OFFSET_FROM_PARENT )
+      const ResizePolicy::Type resizePolicy = GetResizePolicy( static_cast< Dimension::Type >( 1 << i ) );
+      if( resizePolicy == ResizePolicy::FILL_TO_PARENT || resizePolicy == ResizePolicy::SIZE_RELATIVE_TO_PARENT || resizePolicy == ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT )
       {
         return true;
       }
@@ -3825,18 +3852,18 @@ bool Actor::RelayoutDependentOnParent( Dimension dimension )
   return false;
 }
 
-bool Actor::RelayoutDependentOnChildren( Dimension dimension )
+bool Actor::RelayoutDependentOnChildren( Dimension::Type dimension )
 {
   // Check if actor is dependent on children
-  for( unsigned int i = 0; i < DIMENSION_COUNT; ++i )
+  for( unsigned int i = 0; i < Dimension::DIMENSION_COUNT; ++i )
   {
     if( ( dimension & ( 1 << i ) ) )
     {
-      const ResizePolicy resizePolicy = GetResizePolicy( static_cast< Dimension >( 1 << i ) );
+      const ResizePolicy::Type resizePolicy = GetResizePolicy( static_cast< Dimension::Type >( 1 << i ) );
       switch( resizePolicy )
       {
-        case FIT_TO_CHILDREN:
-        case USE_NATURAL_SIZE:      // i.e. For things that calculate their size based on children
+        case ResizePolicy::FIT_TO_CHILDREN:
+        case ResizePolicy::USE_NATURAL_SIZE:      // i.e. For things that calculate their size based on children
         {
           return true;
         }
@@ -3852,28 +3879,28 @@ bool Actor::RelayoutDependentOnChildren( Dimension dimension )
   return false;
 }
 
-bool Actor::RelayoutDependentOnChildrenBase( Dimension dimension )
+bool Actor::RelayoutDependentOnChildrenBase( Dimension::Type dimension )
 {
   return Actor::RelayoutDependentOnChildren( dimension );
 }
 
-bool Actor::RelayoutDependentOnDimension( Dimension dimension, Dimension dependentDimension )
+bool Actor::RelayoutDependentOnDimension( Dimension::Type dimension, Dimension::Type dependentDimension )
 {
   // Check each possible dimension and see if it is dependent on the input one
-  for( unsigned int i = 0; i < DIMENSION_COUNT; ++i )
+  for( unsigned int i = 0; i < Dimension::DIMENSION_COUNT; ++i )
   {
     if( dimension & ( 1 << i ) )
     {
-      return mRelayoutData->resizePolicies[ i ] == DIMENSION_DEPENDENCY && mRelayoutData->dimensionDependencies[ i ] == dependentDimension;
+      return mRelayoutData->resizePolicies[ i ] == ResizePolicy::DIMENSION_DEPENDENCY && mRelayoutData->dimensionDependencies[ i ] == dependentDimension;
     }
   }
 
   return false;
 }
 
-void Actor::SetNegotiatedDimension( float negotiatedDimension, Dimension dimension )
+void Actor::SetNegotiatedDimension( float negotiatedDimension, Dimension::Type dimension )
 {
-  for( unsigned int i = 0; i < DIMENSION_COUNT; ++i )
+  for( unsigned int i = 0; i < Dimension::DIMENSION_COUNT; ++i )
   {
     if( dimension & ( 1 << i ) )
     {
@@ -3882,10 +3909,10 @@ void Actor::SetNegotiatedDimension( float negotiatedDimension, Dimension dimensi
   }
 }
 
-float Actor::GetNegotiatedDimension( Dimension dimension ) const
+float Actor::GetNegotiatedDimension( Dimension::Type dimension ) const
 {
   // If more than one dimension is requested, just return the first one found
-  for( unsigned int i = 0; i < DIMENSION_COUNT; ++i )
+  for( unsigned int i = 0; i < Dimension::DIMENSION_COUNT; ++i )
   {
     if( ( dimension & ( 1 << i ) ) )
     {
@@ -3896,11 +3923,11 @@ float Actor::GetNegotiatedDimension( Dimension dimension ) const
   return 0.0f;   // Default
 }
 
-void Actor::SetPadding( const Vector2& padding, Dimension dimension )
+void Actor::SetPadding( const Vector2& padding, Dimension::Type dimension )
 {
   EnsureRelayoutData();
 
-  for( unsigned int i = 0; i < DIMENSION_COUNT; ++i )
+  for( unsigned int i = 0; i < Dimension::DIMENSION_COUNT; ++i )
   {
     if( dimension & ( 1 << i ) )
     {
@@ -3909,12 +3936,12 @@ void Actor::SetPadding( const Vector2& padding, Dimension dimension )
   }
 }
 
-Vector2 Actor::GetPadding( Dimension dimension ) const
+Vector2 Actor::GetPadding( Dimension::Type dimension ) const
 {
   EnsureRelayoutData();
 
   // If more than one dimension is requested, just return the first one found
-  for( unsigned int i = 0; i < DIMENSION_COUNT; ++i )
+  for( unsigned int i = 0; i < Dimension::DIMENSION_COUNT; ++i )
   {
     if( ( dimension & ( 1 << i ) ) )
     {
@@ -3925,9 +3952,9 @@ Vector2 Actor::GetPadding( Dimension dimension ) const
   return Vector2( 0.0f, 0.0f );   // Default
 }
 
-void Actor::SetLayoutNegotiated( bool negotiated, Dimension dimension )
+void Actor::SetLayoutNegotiated( bool negotiated, Dimension::Type dimension )
 {
-  for( unsigned int i = 0; i < DIMENSION_COUNT; ++i )
+  for( unsigned int i = 0; i < Dimension::DIMENSION_COUNT; ++i )
   {
     if( dimension & ( 1 << i ) )
     {
@@ -3936,9 +3963,9 @@ void Actor::SetLayoutNegotiated( bool negotiated, Dimension dimension )
   }
 }
 
-bool Actor::IsLayoutNegotiated( Dimension dimension ) const
+bool Actor::IsLayoutNegotiated( Dimension::Type dimension ) const
 {
-  for( unsigned int i = 0; i < DIMENSION_COUNT; ++i )
+  for( unsigned int i = 0; i < Dimension::DIMENSION_COUNT; ++i )
   {
     if( ( dimension & ( 1 << i ) ) && mRelayoutData->dimensionNegotiated[ i ] )
     {
@@ -3949,28 +3976,28 @@ bool Actor::IsLayoutNegotiated( Dimension dimension ) const
   return false;
 }
 
-float Actor::CalculateChildSize( const Dali::Actor& child, Dimension dimension )
+float Actor::CalculateChildSize( const Dali::Actor& child, Dimension::Type dimension )
 {
   // Could be overridden in derived classes.
   return CalculateChildSizeBase( child, dimension );
 }
 
-float Actor::CalculateChildSizeBase( const Dali::Actor& child, Dimension dimension )
+float Actor::CalculateChildSizeBase( const Dali::Actor& child, Dimension::Type dimension )
 {
   // Fill to parent, taking size mode factor into account
   switch( child.GetResizePolicy( dimension ) )
   {
-    case FILL_TO_PARENT:
+    case ResizePolicy::FILL_TO_PARENT:
     {
       return GetLatestSize( dimension );
     }
 
-    case SIZE_RELATIVE_TO_PARENT:
+    case ResizePolicy::SIZE_RELATIVE_TO_PARENT:
     {
       return GetLatestSize( dimension ) * GetDimensionValue( child.GetSizeModeFactor(), dimension );
     }
 
-    case SIZE_FIXED_OFFSET_FROM_PARENT:
+    case ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT:
     {
       return GetLatestSize( dimension ) + GetDimensionValue( child.GetSizeModeFactor(), dimension );
     }
@@ -4010,19 +4037,19 @@ float Actor::GetWidthForHeight( float height )
   return width;
 }
 
-float Actor::GetLatestSize( Dimension dimension ) const
+float Actor::GetLatestSize( Dimension::Type dimension ) const
 {
   return IsLayoutNegotiated( dimension ) ? GetNegotiatedDimension( dimension ) : GetSize( dimension );
 }
 
-float Actor::GetRelayoutSize( Dimension dimension ) const
+float Actor::GetRelayoutSize( Dimension::Type dimension ) const
 {
   Vector2 padding = GetPadding( dimension );
 
   return GetLatestSize( dimension ) + padding.x + padding.y;
 }
 
-float Actor::NegotiateFromParent( Dimension dimension )
+float Actor::NegotiateFromParent( Dimension::Type dimension )
 {
   Actor* parent = GetParent();
   if( parent )
@@ -4035,9 +4062,8 @@ float Actor::NegotiateFromParent( Dimension dimension )
   return 0.0f;
 }
 
-float Actor::NegotiateFromChildren( Dimension dimension )
+float Actor::NegotiateFromChildren( Dimension::Type dimension )
 {
-  float minDimensionPoint = 0.0f;
   float maxDimensionPoint = 0.0f;
 
   for( unsigned int i = 0, count = GetChildCount(); i < count; ++i )
@@ -4048,70 +4074,69 @@ float Actor::NegotiateFromChildren( Dimension dimension )
     if( !childImpl.RelayoutDependentOnParent( dimension ) )
     {
       // Calculate the min and max points that the children range across
-      float childPosition = GetDimensionValue( childImpl.GetCurrentPosition(), dimension );
+      float childPosition = GetDimensionValue( childImpl.GetTargetPosition(), dimension );
       float dimensionSize = childImpl.GetRelayoutSize( dimension );
-      minDimensionPoint = std::min( minDimensionPoint, childPosition - dimensionSize * 0.5f );
-      maxDimensionPoint = std::max( maxDimensionPoint, childPosition + dimensionSize * 0.5f );
+      maxDimensionPoint = std::max( maxDimensionPoint, childPosition + dimensionSize );
     }
   }
 
-  return maxDimensionPoint - minDimensionPoint;
+  return maxDimensionPoint;
 }
 
-float Actor::GetSize( Dimension dimension ) const
+float Actor::GetSize( Dimension::Type dimension ) const
 {
   return GetDimensionValue( GetTargetSize(), dimension );
 }
 
-float Actor::GetNaturalSize( Dimension dimension ) const
+float Actor::GetNaturalSize( Dimension::Type dimension ) const
 {
   return GetDimensionValue( GetNaturalSize(), dimension );
 }
 
-float Actor::CalculateSize( Dimension dimension, const Vector2& maximumSize )
+float Actor::CalculateSize( Dimension::Type dimension, const Vector2& maximumSize )
 {
   switch( GetResizePolicy( dimension ) )
   {
-    case USE_NATURAL_SIZE:
+    case ResizePolicy::USE_NATURAL_SIZE:
     {
       return GetNaturalSize( dimension );
     }
 
-    case FIXED:
+    case ResizePolicy::FIXED:
     {
       return GetDimensionValue( GetPreferredSize(), dimension );
     }
 
-    case USE_ASSIGNED_SIZE:
+    case ResizePolicy::USE_ASSIGNED_SIZE:
     {
       return GetDimensionValue( maximumSize, dimension );
     }
 
-    case FILL_TO_PARENT:
-    case SIZE_RELATIVE_TO_PARENT:
-    case SIZE_FIXED_OFFSET_FROM_PARENT:
+    case ResizePolicy::FILL_TO_PARENT:
+    case ResizePolicy::SIZE_RELATIVE_TO_PARENT:
+    case ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT:
     {
       return NegotiateFromParent( dimension );
     }
 
-    case FIT_TO_CHILDREN:
+    case ResizePolicy::FIT_TO_CHILDREN:
     {
       return NegotiateFromChildren( dimension );
     }
 
-    case DIMENSION_DEPENDENCY:
+    case ResizePolicy::DIMENSION_DEPENDENCY:
     {
-      const Dimension dimensionDependency = GetDimensionDependency( dimension );
+      const Dimension::Type dimensionDependency = GetDimensionDependency( dimension );
 
       // Custom rules
-      if( dimension == WIDTH && dimensionDependency == HEIGHT )
+      if( dimension == Dimension::WIDTH && dimensionDependency == Dimension::HEIGHT )
       {
-        return GetWidthForHeight( GetNegotiatedDimension( HEIGHT ) );
+        return GetWidthForHeight( GetNegotiatedDimension( Dimension::HEIGHT ) );
       }
 
-      if( dimension == HEIGHT && dimensionDependency == WIDTH )
+      if( dimension == Dimension::HEIGHT && dimensionDependency == Dimension::WIDTH )
       {
-        return GetHeightForWidth( GetNegotiatedDimension( WIDTH ) );
+        return GetHeightForWidth( GetNegotiatedDimension( Dimension::WIDTH ) );
       }
 
       break;
@@ -4126,7 +4151,7 @@ float Actor::CalculateSize( Dimension dimension, const Vector2& maximumSize )
   return 0.0f;  // Default
 }
 
-float Actor::ConstrainDimension( float size, Dimension dimension )
+float Actor::ConstrainDimension( float size, Dimension::Type dimension )
 {
   const float minSize = GetMinimumSize( dimension );
   const float maxSize = GetMaximumSize( dimension );
@@ -4134,7 +4159,7 @@ float Actor::ConstrainDimension( float size, Dimension dimension )
   return std::max( minSize, std::min( size, maxSize ) );
 }
 
-void Actor::NegotiateDimension( Dimension dimension, const Vector2& allocatedSize, ActorDimensionStack& recursionStack )
+void Actor::NegotiateDimension( Dimension::Type dimension, const Vector2& allocatedSize, ActorDimensionStack& recursionStack )
 {
   // Check if it needs to be negotiated
   if( IsLayoutDirty( dimension ) && !IsLayoutNegotiated( dimension ) )
@@ -4157,9 +4182,9 @@ void Actor::NegotiateDimension( Dimension dimension, const Vector2& allocatedSiz
       recursionStack.push_back( ActorDimensionPair( this, dimension ) );
 
       // Dimension dependency check
-      for( unsigned int i = 0; i < DIMENSION_COUNT; ++i )
+      for( unsigned int i = 0; i < Dimension::DIMENSION_COUNT; ++i )
       {
-        Dimension dimensionToCheck = static_cast< Dimension >( 1 << i );
+        Dimension::Type dimensionToCheck = static_cast< Dimension::Type >( 1 << i );
 
         if( RelayoutDependentOnDimension( dimension, dimensionToCheck ) )
         {
@@ -4218,9 +4243,9 @@ void Actor::NegotiateDimensions( const Vector2& allocatedSize )
   // Negotiate all dimensions that require it
   ActorDimensionStack recursionStack;
 
-  for( unsigned int i = 0; i < DIMENSION_COUNT; ++i )
+  for( unsigned int i = 0; i < Dimension::DIMENSION_COUNT; ++i )
   {
-    const Dimension dimension = static_cast< Dimension >( 1 << i );
+    const Dimension::Type dimension = static_cast< Dimension::Type >( 1 << i );
 
     // Negotiate
     NegotiateDimension( dimension, allocatedSize, recursionStack );
@@ -4231,12 +4256,12 @@ Vector2 Actor::ApplySizeSetPolicy( const Vector2 size )
 {
   switch( mRelayoutData->sizeSetPolicy )
   {
-    case USE_SIZE_SET:
+    case SizeScalePolicy::USE_SIZE_SET:
     {
       return size;
     }
 
-    case FIT_WITH_ASPECT_RATIO:
+    case SizeScalePolicy::FIT_WITH_ASPECT_RATIO:
     {
       // Scale size to fit within the original size bounds, keeping the natural size aspect ratio
       const Vector3 naturalSize = GetNaturalSize();
@@ -4262,7 +4287,7 @@ Vector2 Actor::ApplySizeSetPolicy( const Vector2 size )
       break;
     }
 
-    case FILL_WITH_ASPECT_RATIO:
+    case SizeScalePolicy::FILL_WITH_ASPECT_RATIO:
     {
       // Scale size to fill the original size bounds, keeping the natural size aspect ratio. Potentially exceeding the original bounds.
       const Vector3 naturalSize = GetNaturalSize();
@@ -4298,7 +4323,7 @@ Vector2 Actor::ApplySizeSetPolicy( const Vector2 size )
 void Actor::SetNegotiatedSize( RelayoutContainer& container )
 {
   // Do the set actor size
-  Vector2 negotiatedSize( GetLatestSize( WIDTH ), GetLatestSize( HEIGHT ) );
+  Vector2 negotiatedSize( GetLatestSize( Dimension::WIDTH ), GetLatestSize( Dimension::HEIGHT ) );
 
   // Adjust for size set policy
   negotiatedSize = ApplySizeSetPolicy( negotiatedSize );
@@ -4344,7 +4369,7 @@ void Actor::NegotiateSize( const Vector2& allocatedSize, RelayoutContainer& cont
   }
 }
 
-void Actor::RelayoutRequest( Dimension dimension )
+void Actor::RelayoutRequest( Dimension::Type dimension )
 {
   Internal::RelayoutController* relayoutController = Internal::RelayoutController::Get();
   if( relayoutController )
@@ -4374,11 +4399,11 @@ void Actor::PropagateRelayoutFlags()
   }
 }
 
-void Actor::OnCalculateRelayoutSize( Dimension dimension )
+void Actor::OnCalculateRelayoutSize( Dimension::Type dimension )
 {
 }
 
-void Actor::OnLayoutNegotiated( float size, Dimension dimension )
+void Actor::OnLayoutNegotiated( float size, Dimension::Type dimension )
 {
 }
 
@@ -4388,12 +4413,12 @@ void Actor::SetPreferredSize( const Vector2& size )
 
   if( size.width > 0.0f )
   {
-    SetResizePolicy( FIXED, WIDTH );
+    SetResizePolicy( ResizePolicy::FIXED, Dimension::WIDTH );
   }
 
   if( size.height > 0.0f )
   {
-    SetResizePolicy( FIXED, HEIGHT );
+    SetResizePolicy( ResizePolicy::FIXED, Dimension::HEIGHT );
   }
 
   mRelayoutData->preferredSize = size;
@@ -4408,11 +4433,11 @@ Vector2 Actor::GetPreferredSize() const
   return mRelayoutData->preferredSize;
 }
 
-void Actor::SetMinimumSize( float size, Dimension dimension )
+void Actor::SetMinimumSize( float size, Dimension::Type dimension )
 {
   EnsureRelayoutData();
 
-  for( unsigned int i = 0; i < DIMENSION_COUNT; ++i )
+  for( unsigned int i = 0; i < Dimension::DIMENSION_COUNT; ++i )
   {
     if( dimension & ( 1 << i ) )
     {
@@ -4423,11 +4448,11 @@ void Actor::SetMinimumSize( float size, Dimension dimension )
   RelayoutRequest();
 }
 
-float Actor::GetMinimumSize( Dimension dimension ) const
+float Actor::GetMinimumSize( Dimension::Type dimension ) const
 {
   EnsureRelayoutData();
 
-  for( unsigned int i = 0; i < DIMENSION_COUNT; ++i )
+  for( unsigned int i = 0; i < Dimension::DIMENSION_COUNT; ++i )
   {
     if( dimension & ( 1 << i ) )
     {
@@ -4438,11 +4463,11 @@ float Actor::GetMinimumSize( Dimension dimension ) const
   return 0.0f;  // Default
 }
 
-void Actor::SetMaximumSize( float size, Dimension dimension )
+void Actor::SetMaximumSize( float size, Dimension::Type dimension )
 {
   EnsureRelayoutData();
 
-  for( unsigned int i = 0; i < DIMENSION_COUNT; ++i )
+  for( unsigned int i = 0; i < Dimension::DIMENSION_COUNT; ++i )
   {
     if( dimension & ( 1 << i ) )
     {
@@ -4453,11 +4478,11 @@ void Actor::SetMaximumSize( float size, Dimension dimension )
   RelayoutRequest();
 }
 
-float Actor::GetMaximumSize( Dimension dimension ) const
+float Actor::GetMaximumSize( Dimension::Type dimension ) const
 {
   EnsureRelayoutData();
 
-  for( unsigned int i = 0; i < DIMENSION_COUNT; ++i )
+  for( unsigned int i = 0; i < Dimension::DIMENSION_COUNT; ++i )
   {
     if( dimension & ( 1 << i ) )
     {
index 41a03fa..b476a0d 100644 (file)
@@ -86,7 +86,7 @@ public:
      * @param[in] newActor The actor to assign
      * @param[in] newDimension The dimension to assign
      */
-    ActorDimensionPair( Actor* newActor, Dimension newDimension )
+    ActorDimensionPair( Actor* newActor, Dimension::Type newDimension )
     : actor( newActor ),
       dimension( newDimension )
     {
@@ -104,7 +104,7 @@ public:
     }
 
     Actor* actor;           ///< The actor to hold
-    Dimension dimension;    ///< The dimension to hold
+    Dimension::Type dimension;    ///< The dimension to hold
   };
 
   typedef std::vector< ActorDimensionPair > ActorDimensionStack;
@@ -487,6 +487,13 @@ public:
   const Vector3& GetCurrentPosition() const;
 
   /**
+   * Retrieve the target position of the Actor.
+   * The coordinates are relative to the Actor's parent.
+   * @return the Actor's position.
+   */
+  const Vector3& GetTargetPosition() const;
+
+  /**
    * @copydoc Dali::Actor::GetCurrentWorldPosition()
    */
   const Vector3& GetCurrentWorldPosition() const;
@@ -548,14 +555,14 @@ public:
 
   /**
    * Sets the factor of the parents size used for the child actor.
-   * Note: Only used if ResizePolicy is SIZE_RELATIVE_TO_PARENT or SIZE_FIXED_OFFSET_FROM_PARENT.
+   * Note: Only used if ResizePolicy is ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.
    * @param[in] factor The vector to multiply the parents size by to get the childs size.
    */
   void SetSizeModeFactor( const Vector3& factor );
 
   /**
    * Gets the factor of the parents size used for the child actor.
-   * Note: Only used if ResizePolicy is SIZE_RELATIVE_TO_PARENT or SIZE_FIXED_OFFSET_FROM_PARENT.
+   * Note: Only used if ResizePolicy is ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.
    * @return The vector being used to multiply the parents size by to get the childs size.
    */
   const Vector3& GetSizeModeFactor() const;
@@ -817,7 +824,7 @@ public:
    * @param[in] policy The policy being set
    * @param[in] dimension The dimension the policy is being set for
    */
-  virtual void OnSetResizePolicy( ResizePolicy policy, Dimension dimension ) {}
+  virtual void OnSetResizePolicy( ResizePolicy::Type policy, Dimension::Type dimension ) {}
 
   /**
    * @brief Virtual method to notify deriving classes that relayout dependencies have been
@@ -825,7 +832,7 @@ public:
    *
    * @param dimension The dimension that is about to be calculated
    */
-  virtual void OnCalculateRelayoutSize( Dimension dimension );
+  virtual void OnCalculateRelayoutSize( Dimension::Type dimension );
 
   /**
    * @brief Virtual method to notify deriving classes that the size for a dimension
@@ -834,7 +841,7 @@ public:
    * @param[in] size The new size for the given dimension
    * @param[in] dimension The dimension that was just negotiated
    */
-  virtual void OnLayoutNegotiated( float size, Dimension dimension );
+  virtual void OnLayoutNegotiated( float size, Dimension::Type dimension );
 
   /**
    * @brief Determine if this actor is dependent on it's children for relayout
@@ -842,7 +849,7 @@ public:
    * @param dimension The dimension(s) to check for
    * @return Return if the actor is dependent on it's children
    */
-  virtual bool RelayoutDependentOnChildren( Dimension dimension = ALL_DIMENSIONS );
+  virtual bool RelayoutDependentOnChildren( Dimension::Type dimension = Dimension::ALL_DIMENSIONS );
 
   /**
    * @brief Determine if this actor is dependent on it's children for relayout.
@@ -852,7 +859,7 @@ public:
    * @param dimension The dimension(s) to check for
    * @return Return if the actor is dependent on it's children
    */
-  virtual bool RelayoutDependentOnChildrenBase( Dimension dimension = ALL_DIMENSIONS );
+  virtual bool RelayoutDependentOnChildrenBase( Dimension::Type dimension = Dimension::ALL_DIMENSIONS );
 
   /**
    * @brief Calculate the size for a child
@@ -861,7 +868,7 @@ public:
    * @param[in] dimension The dimension to calculate the size for. E.g. width or height.
    * @return Return the calculated size for the given dimension
    */
-  virtual float CalculateChildSize( const Dali::Actor& child, Dimension dimension );
+  virtual float CalculateChildSize( const Dali::Actor& child, Dimension::Type dimension );
 
   /**
    * @brief This method is called during size negotiation when a height is required for a given width.
@@ -904,32 +911,32 @@ public:
   /**
    * @copydoc Dali::Actor::SetResizePolicy()
    */
-  void SetResizePolicy( ResizePolicy policy, Dimension dimension = ALL_DIMENSIONS );
+  void SetResizePolicy( ResizePolicy::Type policy, Dimension::Type dimension = Dimension::ALL_DIMENSIONS );
 
   /**
    * @copydoc Dali::Actor::GetResizePolicy()
    */
-  ResizePolicy GetResizePolicy( Dimension dimension ) const;
+  ResizePolicy::Type GetResizePolicy( Dimension::Type dimension ) const;
 
   /**
    * @copydoc Dali::Actor::SetSizeScalePolicy()
    */
-  void SetSizeScalePolicy( SizeScalePolicy policy );
+  void SetSizeScalePolicy( SizeScalePolicy::Type policy );
 
   /**
    * @copydoc Dali::Actor::GetSizeScalePolicy()
    */
-  SizeScalePolicy GetSizeScalePolicy() const;
+  SizeScalePolicy::Type GetSizeScalePolicy() const;
 
   /**
    * @copydoc Dali::Actor::SetDimensionDependency()
    */
-  void SetDimensionDependency( Dimension dimension, Dimension dependency );
+  void SetDimensionDependency( Dimension::Type dimension, Dimension::Type dependency );
 
   /**
    * @copydoc Dali::Actor::GetDimensionDependency()
    */
-  Dimension GetDimensionDependency( Dimension dimension ) const;
+  Dimension::Type GetDimensionDependency( Dimension::Type dimension ) const;
 
   /**
    * @copydoc Dali::Actor::SetRelayoutEnabled()
@@ -947,7 +954,7 @@ public:
    * @param dirty Whether to mark actor as dirty or not
    * @param dimension The dimension(s) to mark as dirty
    */
-  void SetLayoutDirty( bool dirty, Dimension dimension = ALL_DIMENSIONS );
+  void SetLayoutDirty( bool dirty, Dimension::Type dimension = Dimension::ALL_DIMENSIONS );
 
   /**
    * @brief Return if any of an actor's dimensions are marked as dirty
@@ -955,21 +962,21 @@ public:
    * @param dimension The dimension(s) to check
    * @return Return if any of the requested dimensions are dirty
    */
-  bool IsLayoutDirty( Dimension dimension = ALL_DIMENSIONS ) const;
+  bool IsLayoutDirty( Dimension::Type dimension = Dimension::ALL_DIMENSIONS ) const;
 
   /**
    * @brief Returns if relayout is enabled and the actor is not dirty
    *
    * @return Return if it is possible to relayout the actor
    */
-  bool RelayoutPossible( Dimension dimension = ALL_DIMENSIONS ) const;
+  bool RelayoutPossible( Dimension::Type dimension = Dimension::ALL_DIMENSIONS ) const;
 
   /**
    * @brief Returns if relayout is enabled and the actor is dirty
    *
    * @return Return if it is required to relayout the actor
    */
-  bool RelayoutRequired( Dimension dimension = ALL_DIMENSIONS ) const;
+  bool RelayoutRequired( Dimension::Type dimension = Dimension::ALL_DIMENSIONS ) const;
 
   /**
    * @brief Request a relayout, which means performing a size negotiation on this actor, its parent and children (and potentially whole scene)
@@ -984,7 +991,7 @@ public:
    * @note RelayoutRequest() can be called multiple times; the size negotiation is still
    * only performed once, i.e. there is no need to keep track of this in the calling side.
    */
-  void RelayoutRequest( Dimension dimension = ALL_DIMENSIONS );
+  void RelayoutRequest( Dimension::Type dimension = Dimension::ALL_DIMENSIONS );
 
   /**
    * @brief Request to relayout of all actors in the sub-tree below the given actor.
@@ -1006,7 +1013,7 @@ public:
    * @param dimension The dimension(s) to check for
    * @return Return if the actor is dependent on it's parent
    */
-  bool RelayoutDependentOnParent( Dimension dimension = ALL_DIMENSIONS );
+  bool RelayoutDependentOnParent( Dimension::Type dimension = Dimension::ALL_DIMENSIONS );
 
   /**
    * @brief Determine if this actor has another dimension depedent on the specified one
@@ -1015,7 +1022,7 @@ public:
    * @param dependentDimension The dimension to check for dependency with
    * @return Return if the actor is dependent on this dimension
    */
-  bool RelayoutDependentOnDimension( Dimension dimension, Dimension dependentDimension );
+  bool RelayoutDependentOnDimension( Dimension::Type dimension, Dimension::Type dependentDimension );
 
   /**
    * Negotiate sizes for a control in all dimensions
@@ -1037,7 +1044,7 @@ public:
    * @param[in] dimension The dimension to negotiate on
    * @param[in] allocatedSize The size constraint that the actor must respect
    */
-  void NegotiateDimension( Dimension dimension, const Vector2& allocatedSize, ActorDimensionStack& recursionStack );
+  void NegotiateDimension( Dimension::Type dimension, const Vector2& allocatedSize, ActorDimensionStack& recursionStack );
 
   /**
    * @brief Calculate the size of a dimension
@@ -1046,7 +1053,7 @@ public:
    * @param[in] maximumSize The upper bounds on the size
    * @return Return the calculated size for the dimension
    */
-  float CalculateSize( Dimension dimension, const Vector2& maximumSize );
+  float CalculateSize( Dimension::Type dimension, const Vector2& maximumSize );
 
   /**
    * @brief Constain a dimension given the relayout constraints on this actor
@@ -1055,7 +1062,7 @@ public:
    * @param[in] dimension The dimension the size exists in
    * @return Return the constrained size
    */
-  float ConstrainDimension( float size, Dimension dimension );
+  float ConstrainDimension( float size, Dimension::Type dimension );
 
   /**
    * Negotiate a dimension based on the size of the parent
@@ -1063,7 +1070,7 @@ public:
    * @param[in] dimension The dimension to negotiate on
    * @return Return the negotiated size
    */
-  float NegotiateFromParent( Dimension dimension );
+  float NegotiateFromParent( Dimension::Type dimension );
 
   /**
    * Negotiate a dimension based on the size of the parent. Fitting inside.
@@ -1071,7 +1078,7 @@ public:
    * @param[in] dimension The dimension to negotiate on
    * @return Return the negotiated size
    */
-  float NegotiateFromParentFit( Dimension dimension );
+  float NegotiateFromParentFit( Dimension::Type dimension );
 
   /**
    * Negotiate a dimension based on the size of the parent. Flooding the whole space.
@@ -1079,7 +1086,7 @@ public:
    * @param[in] dimension The dimension to negotiate on
    * @return Return the negotiated size
    */
-  float NegotiateFromParentFlood( Dimension dimension );
+  float NegotiateFromParentFlood( Dimension::Type dimension );
 
   /**
    * @brief Negotiate a dimension based on the size of the children
@@ -1087,7 +1094,7 @@ public:
    * @param[in] dimension The dimension to negotiate on
    * @return Return the negotiated size
    */
-  float NegotiateFromChildren( Dimension dimension );
+  float NegotiateFromChildren( Dimension::Type dimension );
 
   /**
    * Set the negotiated dimension value for the given dimension(s)
@@ -1095,7 +1102,7 @@ public:
    * @param negotiatedDimension The value to set
    * @param dimension The dimension(s) to set the value for
    */
-  void SetNegotiatedDimension( float negotiatedDimension, Dimension dimension = ALL_DIMENSIONS );
+  void SetNegotiatedDimension( float negotiatedDimension, Dimension::Type dimension = Dimension::ALL_DIMENSIONS );
 
   /**
    * Return the value of negotiated dimension for the given dimension
@@ -1103,7 +1110,7 @@ public:
    * @param dimension The dimension to retrieve
    * @return Return the value of the negotiated dimension
    */
-  float GetNegotiatedDimension( Dimension dimension ) const;
+  float GetNegotiatedDimension( Dimension::Type dimension ) const;
 
   /**
    * @brief Set the padding for a dimension
@@ -1111,7 +1118,7 @@ public:
    * @param[in] padding Padding for the dimension. X = start (e.g. left, bottom), y = end (e.g. right, top)
    * @param[in] dimension The dimension to set
    */
-  void SetPadding( const Vector2& padding, Dimension dimension );
+  void SetPadding( const Vector2& padding, Dimension::Type dimension );
 
   /**
    * Return the value of padding for the given dimension
@@ -1119,7 +1126,7 @@ public:
    * @param dimension The dimension to retrieve
    * @return Return the value of padding for the dimension
    */
-  Vector2 GetPadding( Dimension dimension ) const;
+  Vector2 GetPadding( Dimension::Type dimension ) const;
 
   /**
    * Return the actor size for a given dimension
@@ -1127,7 +1134,7 @@ public:
    * @param[in] dimension The dimension to retrieve the size for
    * @return Return the size for the given dimension
    */
-  float GetSize( Dimension dimension ) const;
+  float GetSize( Dimension::Type dimension ) const;
 
   /**
    * Return the natural size of the actor for a given dimension
@@ -1135,7 +1142,7 @@ public:
    * @param[in] dimension The dimension to retrieve the size for
    * @return Return the natural size for the given dimension
    */
-  float GetNaturalSize( Dimension dimension ) const;
+  float GetNaturalSize( Dimension::Type dimension ) const;
 
   /**
    * @brief Return the amount of size allocated for relayout
@@ -1145,7 +1152,7 @@ public:
    * @param[in] dimension The dimension to retrieve
    * @return Return the size
    */
-  float GetRelayoutSize( Dimension dimension ) const;
+  float GetRelayoutSize( Dimension::Type dimension ) const;
 
   /**
    * @brief If the size has been negotiated return that else return normal size
@@ -1153,7 +1160,7 @@ public:
    * @param[in] dimension The dimension to retrieve
    * @return Return the size
    */
-  float GetLatestSize( Dimension dimension ) const;
+  float GetLatestSize( Dimension::Type dimension ) const;
 
   /**
    * Apply the negotiated size to the actor
@@ -1168,7 +1175,7 @@ public:
    * @param[in] negotiated The status of the flag to set.
    * @param[in] dimension The dimension to set the flag for
    */
-  void SetLayoutNegotiated( bool negotiated, Dimension dimension = ALL_DIMENSIONS );
+  void SetLayoutNegotiated( bool negotiated, Dimension::Type dimension = Dimension::ALL_DIMENSIONS );
 
   /**
    * @brief Test whether the layout dimension for this actor has been negotiated or not.
@@ -1176,7 +1183,7 @@ public:
    * @param[in] dimension The dimension to determine the value of the flag for
    * @return Return if the layout dimension is negotiated or not.
    */
-  bool IsLayoutNegotiated( Dimension dimension = ALL_DIMENSIONS ) const;
+  bool IsLayoutNegotiated( Dimension::Type dimension = Dimension::ALL_DIMENSIONS ) const;
 
   /**
    * @brief Calculate the size for a child
@@ -1185,7 +1192,7 @@ public:
    * @param[in] dimension The dimension to calculate the size for. E.g. width or height.
    * @return Return the calculated size for the given dimension
    */
-  float CalculateChildSizeBase( const Dali::Actor& child, Dimension dimension );
+  float CalculateChildSizeBase( const Dali::Actor& child, Dimension::Type dimension );
 
   /**
    * @brief Set the preferred size for size negotiation
@@ -1204,22 +1211,22 @@ public:
   /**
    * @copydoc Dali::Actor::SetMinimumSize
    */
-  void SetMinimumSize( float size, Dimension dimension = ALL_DIMENSIONS );
+  void SetMinimumSize( float size, Dimension::Type dimension = Dimension::ALL_DIMENSIONS );
 
   /**
    * @copydoc Dali::Actor::GetMinimumSize
    */
-  float GetMinimumSize( Dimension dimension ) const;
+  float GetMinimumSize( Dimension::Type dimension ) const;
 
   /**
    * @copydoc Dali::Actor::SetMaximumSize
    */
-  void SetMaximumSize( float size, Dimension dimension = ALL_DIMENSIONS );
+  void SetMaximumSize( float size, Dimension::Type dimension = Dimension::ALL_DIMENSIONS );
 
   /**
    * @copydoc Dali::Actor::GetMaximumSize
    */
-  float GetMaximumSize( Dimension dimension ) const;
+  float GetMaximumSize( Dimension::Type dimension ) const;
 
 #ifdef DYNAMICS_SUPPORT
 
@@ -1876,7 +1883,8 @@ protected:
   Dali::Actor::OffStageSignalType          mOffStageSignal;
   Dali::Actor::OnRelayoutSignalType        mOnRelayoutSignal;
 
-  Vector3         mTargetSize;      ///< Event-side storage for size (not a pointer as most actors will have a size)
+  Vector3         mTargetSize;       ///< Event-side storage for size (not a pointer as most actors will have a size)
+  Vector3         mTargetPosition;   ///< Event-side storage for position (not a pointer as most actors will have a position)
 
   std::string     mName;      ///< Name of the actor
   unsigned int    mId;        ///< A unique ID to identify the actor starting from 1, and 0 is reserved
index 377e297..c195a27 100644 (file)
@@ -169,7 +169,7 @@ private:
   /**
    * @copydoc Internal::Actor::OnSetResizePolicy
    */
-  virtual void OnSetResizePolicy( ResizePolicy policy, Dimension dimension )
+  virtual void OnSetResizePolicy( ResizePolicy::Type policy, Dimension::Type dimension )
   {
     mImpl->OnSetResizePolicy( policy, dimension );
   }
@@ -185,7 +185,7 @@ private:
   /**
    * @copydoc Internal::Actor::CalculateChildSize
    */
-  virtual float CalculateChildSize( const Dali::Actor& child, Dimension dimension )
+  virtual float CalculateChildSize( const Dali::Actor& child, Dimension::Type dimension )
   {
     return mImpl->CalculateChildSize( child, dimension );
   }
@@ -209,7 +209,7 @@ private:
   /**
    * @copydoc Internal::Actor::RelayoutDependentOnChildren
    */
-  virtual bool RelayoutDependentOnChildren( Dimension dimension = ALL_DIMENSIONS )
+  virtual bool RelayoutDependentOnChildren( Dimension::Type dimension = Dimension::ALL_DIMENSIONS )
   {
     return mImpl->RelayoutDependentOnChildren( dimension );
   }
@@ -217,7 +217,7 @@ private:
   /**
    * @copydoc Internal::Actor::OnCalculateRelayoutSize
    */
-  virtual void OnCalculateRelayoutSize( Dimension dimension )
+  virtual void OnCalculateRelayoutSize( Dimension::Type dimension )
   {
     return mImpl->OnCalculateRelayoutSize( dimension );
   }
@@ -225,7 +225,7 @@ private:
   /**
    * @copydoc Internal::Actor::OnLayoutNegotiated
    */
-  virtual void OnLayoutNegotiated( float size, Dimension dimension )
+  virtual void OnLayoutNegotiated( float size, Dimension::Type dimension )
   {
     return mImpl->OnLayoutNegotiated( size, dimension );
   }
index 55212d5..935614e 100644 (file)
@@ -100,7 +100,7 @@ ImageActorPtr ImageActor::New()
 
 void ImageActor::OnInitialize()
 {
-  SetResizePolicy( USE_NATURAL_SIZE, ALL_DIMENSIONS );
+  SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
 }
 
 void ImageActor::SetImage( ImagePtr& image )
index f987e6e..81d0310 100644 (file)
@@ -67,8 +67,8 @@ void PrintChildren( Dali::Actor actor, int level )
 
   output << " - Pos: " << actor.GetCurrentPosition() << " Size: " << actor.GetTargetSize();
 
-  output << ", Dirty: (" << ( GetImplementation( actor ).IsLayoutDirty( WIDTH ) ? "TRUE" : "FALSE" ) << "," << ( GetImplementation( actor ).IsLayoutDirty( HEIGHT ) ? "TRUE" : "FALSE" ) << ")";
-  output << ", Negotiated: (" << ( GetImplementation( actor ).IsLayoutNegotiated( WIDTH ) ? "TRUE" : "FALSE" ) << "," << ( GetImplementation( actor ).IsLayoutNegotiated( HEIGHT ) ? "TRUE" : "FALSE" ) << ")";
+  output << ", Dirty: (" << ( GetImplementation( actor ).IsLayoutDirty( Dimension::WIDTH ) ? "TRUE" : "FALSE" ) << "," << ( GetImplementation( actor ).IsLayoutDirty( Dimension::HEIGHT ) ? "TRUE" : "FALSE" ) << ")";
+  output << ", Negotiated: (" << ( GetImplementation( actor ).IsLayoutNegotiated( Dimension::WIDTH ) ? "TRUE" : "FALSE" ) << "," << ( GetImplementation( actor ).IsLayoutNegotiated( Dimension::HEIGHT ) ? "TRUE" : "FALSE" ) << ")";
   output << ", Enabled: " << ( actor.IsRelayoutEnabled() ? "TRUE" : "FALSE" );
 
   output << ", (" << actor.GetObjectPtr() << ")" << std::endl;
@@ -137,7 +137,7 @@ void RelayoutController::QueueActor( Dali::Actor& actor, RelayoutContainer& acto
   }
 }
 
-void RelayoutController::RequestRelayout( Dali::Actor& actor, Dimension dimension )
+void RelayoutController::RequestRelayout( Dali::Actor& actor, Dimension::Type dimension )
 {
   if( !mEnabled )
   {
@@ -150,12 +150,12 @@ void RelayoutController::RequestRelayout( Dali::Actor& actor, Dimension dimensio
   topOfSubTreeStack.push_back( actor );
 
   // Propagate on all dimensions
-  for( unsigned int i = 0; i < DIMENSION_COUNT; ++i )
+  for( unsigned int i = 0; i < Dimension::DIMENSION_COUNT; ++i )
   {
     if( dimension & ( 1 << i ) )
     {
       // Do the propagation
-      PropagateAll( actor, static_cast< Dimension >( 1 << i ), topOfSubTreeStack, potentialRedundantSubRoots );
+      PropagateAll( actor, static_cast< Dimension::Type >( 1 << i ), topOfSubTreeStack, potentialRedundantSubRoots );
     }
   }
 
@@ -232,7 +232,7 @@ void RelayoutController::RequestRelayoutTree( Dali::Actor& actor )
   }
 }
 
-void RelayoutController::PropagateAll( Dali::Actor& actor, Dimension dimension, Dali::ActorContainer& topOfSubTreeStack, Dali::ActorContainer& potentialRedundantSubRoots )
+void RelayoutController::PropagateAll( Dali::Actor& actor, Dimension::Type dimension, Dali::ActorContainer& topOfSubTreeStack, Dali::ActorContainer& potentialRedundantSubRoots )
 {
   // Only set dirty flag if doing relayout and not already marked as dirty
   Actor& actorImpl = GetImplementation( actor );
@@ -244,9 +244,9 @@ void RelayoutController::PropagateAll( Dali::Actor& actor, Dimension dimension,
 
     // Check for dimension dependecy: width for height/height for width etc
     // Check each possible dimension and see if it is dependent on the input one
-    for( unsigned int i = 0; i < DIMENSION_COUNT; ++i )
+    for( unsigned int i = 0; i < Dimension::DIMENSION_COUNT; ++i )
     {
-      Dimension dimensionToCheck = static_cast< Dimension >( 1 << i );
+      Dimension::Type dimensionToCheck = static_cast< Dimension::Type >( 1 << i );
 
       if( actorImpl.RelayoutDependentOnDimension( dimension, dimensionToCheck ) &&
           !actorImpl.IsLayoutDirty( dimensionToCheck ) )
@@ -306,7 +306,7 @@ void RelayoutController::PropagateAll( Dali::Actor& actor, Dimension dimension,
 }
 
 
-void RelayoutController::PropagateFlags( Dali::Actor& actor, Dimension dimension )
+void RelayoutController::PropagateFlags( Dali::Actor& actor, Dimension::Type dimension )
 {
   // Only set dirty flag if doing relayout and not already marked as dirty
   Actor& actorImpl = GetImplementation( actor );
@@ -318,9 +318,9 @@ void RelayoutController::PropagateFlags( Dali::Actor& actor, Dimension dimension
 
     // Check for dimension dependecy: width for height/height for width etc
     // Check each possible dimension and see if it is dependent on the input one
-    for( unsigned int i = 0; i < DIMENSION_COUNT; ++i )
+    for( unsigned int i = 0; i < Dimension::DIMENSION_COUNT; ++i )
     {
-      Dimension dimensionToCheck = static_cast< Dimension >( 1 << i );
+      Dimension::Type dimensionToCheck = static_cast< Dimension::Type >( 1 << i );
 
       if( actorImpl.RelayoutDependentOnDimension( dimension, dimensionToCheck ) )
       {
index a0aa6c6..7c5b39c 100644 (file)
@@ -69,7 +69,7 @@ public:
    * @param[in] actor The actor to request relayout on
    * @param[in] dimension The dimension(s) to request the relayout on. Defaults to all dimensions
    */
-  void RequestRelayout( Dali::Actor& actor, Dimension dimension = ALL_DIMENSIONS );
+  void RequestRelayout( Dali::Actor& actor, Dimension::Type dimension = Dimension::ALL_DIMENSIONS );
 
   /**
    * @brief Request to relayout of all actors in the sub-tree below the given actor.
@@ -91,7 +91,7 @@ public:
    * @param[in] actor The actor to propagate from
    * @param[in] dimension The dimension to propagate on
    */
-  void PropagateFlags( Dali::Actor& actor, Dimension dimension = ALL_DIMENSIONS );
+  void PropagateFlags( Dali::Actor& actor, Dimension::Type dimension = Dimension::ALL_DIMENSIONS );
 
   /**
    * @brief Relayouts all actors that have been marked as dirty
@@ -163,7 +163,7 @@ private:
    * @param[in] topOfSubTreeStack The top of the sub tree that this actor is in
    * @param[in] potentialRedundantSubRoots Actors collected as potentially already being included in relayout
    */
-  void PropagateAll( Dali::Actor& actor, Dimension dimension, Dali::ActorContainer& topOfSubTreeStack, Dali::ActorContainer& potentialRedundantSubRoots );
+  void PropagateAll( Dali::Actor& actor, Dimension::Type dimension, Dali::ActorContainer& topOfSubTreeStack, Dali::ActorContainer& potentialRedundantSubRoots );
 
   /**
    * Queue an actor on the relayout container
index 444eb07..b088695 100644 (file)
@@ -49,19 +49,28 @@ enum PositionInheritanceMode
 /**
  * @brief Dimensions for layout
  */
-enum Dimension
+namespace Dimension
+{
+enum Type
 {
   WIDTH  = 0x1,       ///< Width dimension
   HEIGHT = 0x2,       ///< Height dimension
 
-  DIMENSION_COUNT = 2,  ///< Number of dimensions - update this if adding new dimension
   ALL_DIMENSIONS = 0x3  ///< Mask to cover all flags
 };
 
+enum Meta
+{
+  DIMENSION_COUNT = 2  ///< Number of dimensions - update this if adding new dimension
+};
+}
+
 /**
  * @brief Size negotiation resize policies
  */
-enum ResizePolicy
+namespace ResizePolicy
+{
+enum Type
 {
   FIXED,                 ///< Size is fixed as set by SetSize
   USE_NATURAL_SIZE,      ///< Size is to use the actor's natural size
@@ -72,16 +81,20 @@ enum ResizePolicy
   DIMENSION_DEPENDENCY,  ///< One dimension is dependent on the other
   USE_ASSIGNED_SIZE      ///< The size will be assigned to the actor
 };
+}
 
 /**
  * @brief Policies to determine how an actor should resize itself when having its size set in size negotiation
  */
-enum SizeScalePolicy
+namespace SizeScalePolicy
+{
+enum Type
 {
   USE_SIZE_SET,                ///< Use the size that was set
   FIT_WITH_ASPECT_RATIO,       ///< Fit within the size set maintaining natural size aspect ratio
   FILL_WITH_ASPECT_RATIO       ///< Fill up the size set maintaining natural size aspect ratio. May exceed size bounds in one dimension.
 };
+}
 
 /**
  * @brief Different types of alignment.
index 99b2b4e..1b31452 100644 (file)
@@ -465,22 +465,22 @@ bool Actor::IsRelayoutEnabled() const
   return GetImplementation(*this).IsRelayoutEnabled();
 }
 
-void Actor::SetResizePolicy( ResizePolicy policy, Dimension dimension )
+void Actor::SetResizePolicy( ResizePolicy::Type policy, Dimension::Type dimension )
 {
   GetImplementation(*this).SetResizePolicy( policy, dimension );
 }
 
-ResizePolicy Actor::GetResizePolicy( Dimension dimension ) const
+ResizePolicy::Type Actor::GetResizePolicy( Dimension::Type dimension ) const
 {
   return GetImplementation(*this).GetResizePolicy( dimension );
 }
 
-void Actor::SetSizeScalePolicy( SizeScalePolicy policy )
+void Actor::SetSizeScalePolicy( SizeScalePolicy::Type policy )
 {
   GetImplementation(*this).SetSizeScalePolicy( policy );
 }
 
-SizeScalePolicy Actor::GetSizeScalePolicy() const
+SizeScalePolicy::Type Actor::GetSizeScalePolicy() const
 {
   return GetImplementation(*this).GetSizeScalePolicy();
 }
@@ -495,7 +495,7 @@ float Actor::GetWidthForHeight( float height )
   return GetImplementation(*this).GetWidthForHeight( height );
 }
 
-float Actor::GetRelayoutSize( Dimension dimension ) const
+float Actor::GetRelayoutSize( Dimension::Type dimension ) const
 {
   return GetImplementation(*this).GetRelayoutSize( dimension );
 }
@@ -515,18 +515,18 @@ void Actor::SetPadding( const Padding& padding )
   Internal::Actor& impl = GetImplementation(*this);
 
   Vector2 widthPadding( padding.left, padding.right );
-  impl.SetPadding( widthPadding, WIDTH );
+  impl.SetPadding( widthPadding, Dimension::WIDTH );
 
   Vector2 heightPadding( padding.bottom, padding.top );
-  impl.SetPadding( heightPadding, HEIGHT );
+  impl.SetPadding( heightPadding, Dimension::HEIGHT );
 }
 
 void Actor::GetPadding( Padding& paddingOut ) const
 {
   const Internal::Actor& impl = GetImplementation(*this);
 
-  Vector2 widthPadding = impl.GetPadding( WIDTH );
-  Vector2 heightPadding = impl.GetPadding( HEIGHT );
+  Vector2 widthPadding = impl.GetPadding( Dimension::WIDTH );
+  Vector2 heightPadding = impl.GetPadding( Dimension::HEIGHT );
 
   paddingOut.left = widthPadding.x;
   paddingOut.right = widthPadding.y;
@@ -538,30 +538,30 @@ void Actor::SetMinimumSize( const Vector2& size )
 {
   Internal::Actor& impl = GetImplementation(*this);
 
-  impl.SetMinimumSize( size.x, WIDTH );
-  impl.SetMinimumSize( size.y, HEIGHT );
+  impl.SetMinimumSize( size.x, Dimension::WIDTH );
+  impl.SetMinimumSize( size.y, Dimension::HEIGHT );
 }
 
 Vector2 Actor::GetMinimumSize()
 {
   Internal::Actor& impl = GetImplementation(*this);
 
-  return Vector2( impl.GetMinimumSize( WIDTH ), impl.GetMinimumSize( HEIGHT ) );
+  return Vector2( impl.GetMinimumSize( Dimension::WIDTH ), impl.GetMinimumSize( Dimension::HEIGHT ) );
 }
 
 void Actor::SetMaximumSize( const Vector2& size )
 {
   Internal::Actor& impl = GetImplementation(*this);
 
-  impl.SetMaximumSize( size.x, WIDTH );
-  impl.SetMaximumSize( size.y, HEIGHT );
+  impl.SetMaximumSize( size.x, Dimension::WIDTH );
+  impl.SetMaximumSize( size.y, Dimension::HEIGHT );
 }
 
 Vector2 Actor::GetMaximumSize()
 {
   Internal::Actor& impl = GetImplementation(*this);
 
-  return Vector2( impl.GetMaximumSize( WIDTH ), impl.GetMaximumSize( HEIGHT ) );
+  return Vector2( impl.GetMaximumSize( Dimension::WIDTH ), impl.GetMaximumSize( Dimension::HEIGHT ) );
 }
 
 Actor::TouchSignalType& Actor::TouchedSignal()
index 2045436..9373414 100644 (file)
@@ -1162,7 +1162,7 @@ public:
    * @param[in] policy The resize policy to use
    * @param[in] dimension The dimension(s) to set policy for. Can be a bitfield of multiple dimensions.
    */
-  void SetResizePolicy( ResizePolicy policy, Dimension dimension );
+  void SetResizePolicy( ResizePolicy::Type policy, Dimension::Type dimension );
 
   /**
    * Return the resize policy used for a single dimension
@@ -1170,27 +1170,27 @@ public:
    * @param[in] dimension The dimension to get policy for
    * @return Return the dimension resize policy
    */
-  ResizePolicy GetResizePolicy( Dimension dimension ) const;
+  ResizePolicy::Type GetResizePolicy( Dimension::Type dimension ) const;
 
   /**
-   * @brief Set the policy to use when setting size with size negotiation. Defaults to USE_SIZE_SET.
+   * @brief Set the policy to use when setting size with size negotiation. Defaults to SizeScalePolicy::USE_SIZE_SET.
    *
    * @param[in] policy The policy to use for when the size is set
    */
-  void SetSizeScalePolicy( SizeScalePolicy policy );
+  void SetSizeScalePolicy( SizeScalePolicy::Type policy );
 
   /**
    * @brief Return the size set policy in use
    *
    * @return Return the size set policy
    */
-  SizeScalePolicy GetSizeScalePolicy() const;
+  SizeScalePolicy::Type GetSizeScalePolicy() const;
 
   /**
    * @brief Sets the relative to parent size factor of the actor.
    *
    * This factor is only used when ResizePolicy is set to either:
-   * SIZE_RELATIVE_TO_PARENT or SIZE_FIXED_OFFSET_FROM_PARENT.
+   * ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.
    * This actor's size is set to the actor's size multipled by or added to this factor,
    * depending on ResizePolicy (See SetResizePolicy).
    *
@@ -1229,7 +1229,7 @@ public:
    * @param dimension The dimension to retrieve
    * @return Return the value of the negotiated dimension
    */
-  float GetRelayoutSize( Dimension dimension ) const;
+  float GetRelayoutSize( Dimension::Type dimension ) const;
 
   /**
    * @brief Request to relayout of all actors in the sub-tree below the given actor.
index 557d94e..f9d2558 100644 (file)
@@ -88,12 +88,12 @@ void CustomActorImpl::RelayoutRequest()
   mOwner->RelayoutRequest();
 }
 
-float CustomActorImpl::CalculateChildSizeBase( const Dali::Actor& child, Dimension dimension )
+float CustomActorImpl::CalculateChildSizeBase( const Dali::Actor& child, Dimension::Type dimension )
 {
   return mOwner->CalculateChildSizeBase( child, dimension );
 }
 
-bool CustomActorImpl::RelayoutDependentOnChildrenBase( Dimension dimension )
+bool CustomActorImpl::RelayoutDependentOnChildrenBase( Dimension::Type dimension )
 {
   return mOwner->RelayoutDependentOnChildrenBase( dimension );
 }
index 9726f09..9d7948a 100644 (file)
@@ -205,7 +205,7 @@ public:
    * @param[in] policy The policy being set
    * @param[in] dimension The dimension the policy is being set for
    */
-  virtual void OnSetResizePolicy( ResizePolicy policy, Dimension dimension ) = 0;
+  virtual void OnSetResizePolicy( ResizePolicy::Type policy, Dimension::Type dimension ) = 0;
 
   /**
    * Return the natural size of the actor
@@ -221,7 +221,7 @@ public:
    * @param[in] dimension The dimension to calculate the size for. E.g. width or height.
    * @return Return the calculated size for the given dimension
    */
-  virtual float CalculateChildSize( const Dali::Actor& child, Dimension dimension ) = 0;
+  virtual float CalculateChildSize( const Dali::Actor& child, Dimension::Type dimension ) = 0;
 
   /**
    * @brief This method is called during size negotiation when a height is required for a given width.
@@ -249,7 +249,7 @@ public:
    * @param dimension The dimension(s) to check for
    * @return Return if the actor is dependent on it's children
    */
-  virtual bool RelayoutDependentOnChildren( Dimension dimension = ALL_DIMENSIONS ) = 0;
+  virtual bool RelayoutDependentOnChildren( Dimension::Type dimension = Dimension::ALL_DIMENSIONS ) = 0;
 
   /**
    * @brief Virtual method to notify deriving classes that relayout dependencies have been
@@ -257,7 +257,7 @@ public:
    *
    * @param dimension The dimension that is about to be calculated
    */
-  virtual void OnCalculateRelayoutSize( Dimension dimension ) = 0;
+  virtual void OnCalculateRelayoutSize( Dimension::Type dimension ) = 0;
 
   /**
    * @brief Virtual method to notify deriving classes that the size for a dimension
@@ -266,7 +266,7 @@ public:
    * @param[in] size The new size for the given dimension
    * @param[in] dimension The dimension that was just negotiated
    */
-  virtual void OnLayoutNegotiated( float size, Dimension dimension ) = 0;
+  virtual void OnLayoutNegotiated( float size, Dimension::Type dimension ) = 0;
 
 protected: // For derived classes
 
@@ -307,7 +307,7 @@ protected: // For derived classes
    * @param[in] dimension The dimension to calculate the size for. E.g. width or height.
    * @return Return the calculated size for the given dimension
    */
-  float CalculateChildSizeBase( const Dali::Actor& child, Dimension dimension );
+  float CalculateChildSizeBase( const Dali::Actor& child, Dimension::Type dimension );
 
   /**
    * @brief Determine if this actor is dependent on it's children for relayout from the base class
@@ -315,7 +315,7 @@ protected: // For derived classes
    * @param dimension The dimension(s) to check for
    * @return Return if the actor is dependent on it's children
    */
-  bool RelayoutDependentOnChildrenBase( Dimension dimension = ALL_DIMENSIONS );
+  bool RelayoutDependentOnChildrenBase( Dimension::Type dimension = Dimension::ALL_DIMENSIONS );
 
 public: // Not intended for application developers