From: Paul Wisbey
Date: Tue, 7 Apr 2015 10:34:34 +0000 (+0100)
Subject: Merge remote-tracking branch 'origin/tizen' into new_text
X-Git-Tag: dali_1.0.38~11^2~13
X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=56d412791a44c2a79135d2293c13fddb135c9d54;hp=2ea37149ec3b54f9f2255cca9eca5429907b5601
Merge remote-tracking branch 'origin/tizen' into new_text
Conflicts:
automated-tests/src/dali-toolkit-internal/CMakeLists.txt
dali-toolkit/internal/controls/buttons/push-button-impl.cpp
dali-toolkit/internal/controls/text-input/text-input-handles-impl.cpp
dali-toolkit/internal/controls/text-input/text-input-impl.cpp
Change-Id: Icb029929ab92e9d4c606f47c50d8d213759f09c5
---
diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Alignment.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Alignment.cpp
index 4dcef68..0f62a2a 100644
--- a/automated-tests/src/dali-toolkit/utc-Dali-Alignment.cpp
+++ b/automated-tests/src/dali-toolkit/utc-Dali-Alignment.cpp
@@ -935,7 +935,7 @@ int UtcDaliAlignmentOnSizeSet(void)
application.SendNotification();
Vector2 size( 100.0f, 200.0f );
- alignment.SetPreferredSize(size);
+ alignment.SetSize(size);
application.Render();
application.SendNotification();
@@ -1010,7 +1010,7 @@ int UtcDaliAlignmentOnSizeAnimation(void)
Stage::GetCurrent().Add(alignment);
Animation animation = Animation::New(100.0f);
- animation.Resize(alignment, Vector3(100.0f, 150.0f, 200.0f));
+ animation.AnimateTo( Property( alignment, Actor::Property::SIZE ), Vector3( 100.0f, 150.0f, 200.0f ) );
animation.Play();
application.Render();
diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Button.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Button.cpp
index 3a6900e..12e85b6 100644
--- a/automated-tests/src/dali-toolkit/utc-Dali-Button.cpp
+++ b/automated-tests/src/dali-toolkit/utc-Dali-Button.cpp
@@ -144,6 +144,7 @@ int UtcDaliButtonSize(void)
// First an image is set, then SetSize is called.
pushButton = PushButton::New();
+ Stage::GetCurrent().Add( pushButton );
pushButton.SetBackgroundImage( image01 );
pushButton.SetSize( 10.f, 10.f );
diff --git a/automated-tests/src/dali-toolkit/utc-Dali-CheckBoxButton.cpp b/automated-tests/src/dali-toolkit/utc-Dali-CheckBoxButton.cpp
index 32bb9de..d6dc8d4 100644
--- a/automated-tests/src/dali-toolkit/utc-Dali-CheckBoxButton.cpp
+++ b/automated-tests/src/dali-toolkit/utc-Dali-CheckBoxButton.cpp
@@ -111,6 +111,7 @@ int UtcDaliCheckBoxButtonSetImages(void)
Image image02 = CreateSolidColorImage( Color::RED, 30, 30 );
ImageActor imageActor02 = CreateSolidColorActor( Color::RED );
imageActor02.SetSize( 40, 40 );
+ imageActor02.SetName( "imageActor02" );
Image image03 = CreateSolidColorImage( Color::RED, 50, 50 );
ImageActor imageActor03 = CreateSolidColorActor( Color::RED );
@@ -122,6 +123,8 @@ int UtcDaliCheckBoxButtonSetImages(void)
Vector3 size;
CheckBoxButton checkBoxButton = CheckBoxButton::New();
+ checkBoxButton.SetName( "UtcDaliCheckBoxButtonSetImages" );
+ Stage::GetCurrent().Add( checkBoxButton );
application.SendNotification();
application.Render();
@@ -133,79 +136,12 @@ int UtcDaliCheckBoxButtonSetImages(void)
application.SendNotification();
application.Render();
- size = checkBoxButton.GetBackgroundImage().GetCurrentSize();
+ size = checkBoxButton.GetCurrentSize();
DALI_TEST_EQUALS( size.width, 10.f, TEST_LOCATION );
DALI_TEST_EQUALS( size.height, 10.f, TEST_LOCATION );
checkBoxButton.SetBackgroundImage( imageActor01 );
- application.SendNotification();
- application.Render();
-
- size = checkBoxButton.GetBackgroundImage().GetCurrentSize();
-
- DALI_TEST_EQUALS( size.width, 20.f, TEST_LOCATION );
- DALI_TEST_EQUALS( size.height, 20.f, TEST_LOCATION );
-
- checkBoxButton.SetSelectedImage( image02 );
-
- application.SendNotification();
- application.Render();
-
- size = checkBoxButton.GetSelectedImage().GetCurrentSize();
-
- DALI_TEST_EQUALS( size.width, 30.f, TEST_LOCATION );
- DALI_TEST_EQUALS( size.height, 30.f, TEST_LOCATION );
-
- checkBoxButton.SetSelectedImage( imageActor02 );
-
- application.SendNotification();
- application.Render();
-
- size = checkBoxButton.GetSelectedImage().GetCurrentSize();
-
- DALI_TEST_EQUALS( size.width, 40.f, TEST_LOCATION );
- DALI_TEST_EQUALS( size.height, 40.f, TEST_LOCATION );
-
- checkBoxButton.SetDisabledBackgroundImage( image03 );
-
- application.SendNotification();
- application.Render();
-
- size = checkBoxButton.GetDisabledBackgroundImage().GetCurrentSize();
-
- DALI_TEST_EQUALS( size.width, 50.f, TEST_LOCATION );
- DALI_TEST_EQUALS( size.height, 50.f, TEST_LOCATION );
-
- checkBoxButton.SetDisabledBackgroundImage( imageActor03 );
-
- application.SendNotification();
- application.Render();
-
- size = checkBoxButton.GetDisabledBackgroundImage().GetCurrentSize();
-
- DALI_TEST_EQUALS( size.width, 60.f, TEST_LOCATION );
- DALI_TEST_EQUALS( size.height, 60.f, TEST_LOCATION );
-
- checkBoxButton.SetDisabledSelectedImage( image04 );
-
- application.SendNotification();
- application.Render();
-
- size = checkBoxButton.GetDisabledSelectedImage().GetCurrentSize();
-
- DALI_TEST_EQUALS( size.width, 70.f, TEST_LOCATION );
- DALI_TEST_EQUALS( size.height, 70.f, TEST_LOCATION );
-
- checkBoxButton.SetDisabledSelectedImage( imageActor04 );
-
- application.SendNotification();
- application.Render();
-
- size = checkBoxButton.GetDisabledSelectedImage().GetCurrentSize();
-
- DALI_TEST_EQUALS( size.width, 80.f, TEST_LOCATION );
- DALI_TEST_EQUALS( size.height, 80.f, TEST_LOCATION );
END_TEST;
}
diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Control.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Control.cpp
index aa9e46c..beeb619 100644
--- a/automated-tests/src/dali-toolkit/utc-Dali-Control.cpp
+++ b/automated-tests/src/dali-toolkit/utc-Dali-Control.cpp
@@ -328,6 +328,12 @@ int UtcDaliControlTestParameters(void)
DummyControl test = DummyControl::New();
test.SetSize( 0.7f, 0.7f, 0.7f );
+
+ Stage::GetCurrent().Add( test );
+
+ application.SendNotification();
+ application.Render();
+
float width = 640.0f;
float height = test.GetHeightForWidth( width );
DALI_TEST_CHECK( test.GetWidthForHeight( height ) == width );
diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp
index c0cf98c..f7926a5 100644
--- a/automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp
+++ b/automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp
@@ -219,7 +219,7 @@ int UtcDaliControlImplOnGestureMethods(void)
{
DummyControl dummy = DummyControl::New(true);
dummy.SetRelayoutEnabled( true );
- dummy.SetPreferredSize( Vector2(100.0f, 100.0f ) );
+ dummy.SetSize( Vector2(100.0f, 100.0f ) );
dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummy);
@@ -280,7 +280,7 @@ int UtcDaliControlImplOnGestureMethods(void)
{
DummyControl dummy = DummyControl::New();
dummy.SetRelayoutEnabled( true );
- dummy.SetPreferredSize( Vector2( 100.0f, 100.0f ) );
+ dummy.SetSize( Vector2( 100.0f, 100.0f ) );
dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummy);
@@ -454,7 +454,7 @@ int UtcDaliControlImplSizeSet(void)
DALI_TEST_EQUALS( dummyImpl.sizeSetCalled, true, TEST_LOCATION ); // Called from size negotiation
Vector2 size(100.0f, 200.0f);
- dummy.SetPreferredSize(size);
+ dummy.SetSize(size);
application.Render();
application.SendNotification();
@@ -479,7 +479,7 @@ int UtcDaliControlImplSizeSet(void)
application.Render();
application.SendNotification();
- dummy.SetPreferredSize(size);
+ dummy.SetSize(size);
application.Render();
application.SendNotification();
@@ -505,7 +505,7 @@ int UtcDaliControlImplSizeAnimation(void)
DALI_TEST_EQUALS( dummyImpl.sizeAnimationCalled, false, TEST_LOCATION );
Animation animation = Animation::New(1.0f);
- animation.Resize(dummy, Vector3(100.0f, 150.0f, 200.0f));
+ animation.AnimateTo( Property( dummy, Actor::Property::SIZE ), Vector3( 100.0f, 150.0f, 200.0f ) );
animation.Play();
application.Render();
@@ -525,7 +525,7 @@ int UtcDaliControlImplSizeAnimation(void)
Stage::GetCurrent().Add(dummy);
Animation animation = Animation::New(1.0f);
- animation.Resize(dummy, Vector3(100.0f, 150.0f, 200.0f));
+ animation.AnimateTo( Property( dummy, Actor::Property::SIZE ), Vector3( 100.0f, 150.0f, 200.0f ) );
animation.Play();
application.Render();
@@ -549,7 +549,7 @@ int UtcDaliControlImplTouchEvent(void)
dummy.SetRelayoutEnabled( true );
DummyControlImplOverride& dummyImpl = static_cast(dummy.GetImplementation());
- dummy.SetPreferredSize( Vector2( 100.0f, 100.0f ) );
+ dummy.SetSize( Vector2( 100.0f, 100.0f ) );
dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummy);
@@ -573,7 +573,7 @@ int UtcDaliControlImplTouchEvent(void)
DummyControl dummy = DummyControl::New();
dummy.SetRelayoutEnabled( true );
- dummy.SetPreferredSize( Vector2( 100.0f, 100.0f ) );
+ dummy.SetSize( Vector2( 100.0f, 100.0f ) );
dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummy);
@@ -776,7 +776,7 @@ int UtcDaliControlImplMouseWheelEvent(void)
dummy.SetRelayoutEnabled( true );
DummyControlImplOverride& dummyImpl = static_cast(dummy.GetImplementation());
- dummy.SetPreferredSize( Vector2( 100.0f, 100.0f ) );
+ dummy.SetSize( Vector2( 100.0f, 100.0f ) );
dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummy);
@@ -803,7 +803,7 @@ int UtcDaliControlImplMouseWheelEvent(void)
DummyControl dummy = DummyControl::New();
dummy.SetRelayoutEnabled( true );
- dummy.SetPreferredSize( Vector2( 100.0f, 100.0f ) );
+ dummy.SetSize( Vector2( 100.0f, 100.0f ) );
dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummy);
diff --git a/automated-tests/src/dali-toolkit/utc-Dali-PageTurnView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-PageTurnView.cpp
index 443de6f..955f19d 100644
--- a/automated-tests/src/dali-toolkit/utc-Dali-PageTurnView.cpp
+++ b/automated-tests/src/dali-toolkit/utc-Dali-PageTurnView.cpp
@@ -371,6 +371,7 @@ int UtcDaliPageTurnViewEnterLeaveEditMode(void)
factory.EnableOffscreenRendering( );
PageTurnView pageTurnView = PageTurnLandscapeView::New( factory, PAGE_SIZE );
+ pageTurnView.SetRelayoutEnabled( false );
pageTurnView.SetPositionInheritanceMode( USE_PARENT_POSITION );
Stage::GetCurrent().Add( pageTurnView );
@@ -422,6 +423,7 @@ int UtcDaliPageTurnViewGetHitActor(void)
factory.EnableOffscreenRendering( );
PageTurnView pageTurnView = PageTurnPortraitView::New( factory, PAGE_SIZE );
+ pageTurnView.SetRelayoutEnabled( false );
pageTurnView.SetParentOrigin( ParentOrigin::TOP_LEFT );
pageTurnView.SetAnchorPoint( AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( pageTurnView );
@@ -458,6 +460,7 @@ int UtcDaliPageTurnViewRefresh(void)
TestPageFactory factory(application);
factory.EnableOffscreenRendering( );
PageTurnView pageTurnView = PageTurnPortraitView::New( factory, PAGE_SIZE );
+ pageTurnView.SetRelayoutEnabled( false );
pageTurnView.SetParentOrigin( ParentOrigin::TOP_LEFT );
pageTurnView.SetAnchorPoint( AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( pageTurnView );
@@ -498,6 +501,7 @@ int UtcDaliPageTurnViewSignals(void)
TestPageFactory factory(application);
Vector2 size = Stage::GetCurrent().GetSize();
PageTurnView portraitView = PageTurnPortraitView::New( factory, size );
+ portraitView.SetRelayoutEnabled( false );
portraitView.SetPositionInheritanceMode( USE_PARENT_POSITION );
Stage::GetCurrent().Add( portraitView );
diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Popup.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Popup.cpp
index 580e2c6..2148042 100644
--- a/automated-tests/src/dali-toolkit/utc-Dali-Popup.cpp
+++ b/automated-tests/src/dali-toolkit/utc-Dali-Popup.cpp
@@ -286,9 +286,9 @@ int UtcDaliPopupShowHide(void)
PushButton button1 = PushButton::New();
PushButton button2 = PushButton::New();
- button1.SetPreferredSize(DEFAULT_BUTTON_SIZE.GetVectorXY());
+ button1.SetSize(DEFAULT_BUTTON_SIZE.GetVectorXY());
popup.AddButton(button1);
- button2.SetPreferredSize(DEFAULT_BUTTON_SIZE.GetVectorXY());
+ button2.SetSize(DEFAULT_BUTTON_SIZE.GetVectorXY());
popup.AddButton(button2);
// Showing/Hiding popup, results in all child Actors being
diff --git a/automated-tests/src/dali-toolkit/utc-Dali-PushButton.cpp b/automated-tests/src/dali-toolkit/utc-Dali-PushButton.cpp
index 49ed86d..850f6a4 100644
--- a/automated-tests/src/dali-toolkit/utc-Dali-PushButton.cpp
+++ b/automated-tests/src/dali-toolkit/utc-Dali-PushButton.cpp
@@ -279,27 +279,10 @@ int UtcDaliPushButtonSetImages(void)
Actor imageActor;
Image image01 = CreateSolidColorImage( Color::RED, 10, 10 );
- ImageActor imageActor01 = CreateSolidColorActor( Color::RED );
- imageActor01.SetSize( 20.f, 20.f );
-
- Image image02 = CreateSolidColorImage( Color::RED, 30, 30 );
- ImageActor imageActor02 = CreateSolidColorActor( Color::RED );
- imageActor02.SetSize( 40.f, 40.f );
-
- Image image03 = CreateSolidColorImage( Color::RED, 50, 50 );
- ImageActor imageActor03 = CreateSolidColorActor( Color::RED );
- imageActor03.SetSize( 60.f, 60.f );
-
- Image image04 = CreateSolidColorImage( Color::RED, 70, 70 );
- ImageActor imageActor04 = CreateSolidColorActor( Color::RED );
- imageActor04.SetSize( 80.f, 80.f );
-
- Image image05 = CreateSolidColorImage( Color::RED, 90, 90 );
- ImageActor imageActor05 = CreateSolidColorActor( Color::RED );
- imageActor05.SetSize( 100.f, 100.f );
Vector3 size;
PushButton pushButton = PushButton::New();
+ Stage::GetCurrent().Add( pushButton );
application.SendNotification();
application.Render();
@@ -311,100 +294,11 @@ int UtcDaliPushButtonSetImages(void)
application.SendNotification();
application.Render();
- size = pushButton.GetButtonImage().GetCurrentSize();
+ size = pushButton.GetCurrentSize();
DALI_TEST_EQUALS( size.width, 10.f, TEST_LOCATION );
DALI_TEST_EQUALS( size.height, 10.f, TEST_LOCATION );
- pushButton.SetButtonImage( imageActor01 );
-
- application.SendNotification();
- application.Render();
-
- size = pushButton.GetButtonImage().GetCurrentSize();
-
- DALI_TEST_EQUALS( size.width, 20.f, TEST_LOCATION );
- DALI_TEST_EQUALS( size.height, 20.f, TEST_LOCATION );
-
- pushButton.SetBackgroundImage( image02 );
-
- application.SendNotification();
- application.Render();
-
- size = pushButton.GetBackgroundImage().GetCurrentSize();
-
- DALI_TEST_EQUALS( size.width, 30.f, TEST_LOCATION );
- DALI_TEST_EQUALS( size.height, 30.f, TEST_LOCATION );
-
- pushButton.SetBackgroundImage( imageActor02 );
-
- application.SendNotification();
- application.Render();
-
- size = pushButton.GetBackgroundImage().GetCurrentSize();
-
- DALI_TEST_EQUALS( size.width, 40.f, TEST_LOCATION );
- DALI_TEST_EQUALS( size.height, 40.f, TEST_LOCATION );
-
- pushButton.SetSelectedImage( image03 );
-
- application.SendNotification();
- application.Render();
-
- size = pushButton.GetSelectedImage().GetCurrentSize();
-
- DALI_TEST_EQUALS( size.width, 50.f, TEST_LOCATION );
- DALI_TEST_EQUALS( size.height, 50.f, TEST_LOCATION );
-
- pushButton.SetSelectedImage( imageActor03 );
-
- application.SendNotification();
- application.Render();
-
- size = pushButton.GetSelectedImage().GetCurrentSize();
-
- DALI_TEST_EQUALS( size.width, 60.f, TEST_LOCATION );
- DALI_TEST_EQUALS( size.height, 60.f, TEST_LOCATION );
-
- pushButton.SetDisabledBackgroundImage( image04 );
-
- application.SendNotification();
- application.Render();
-
- size = pushButton.GetDisabledBackgroundImage().GetCurrentSize();
-
- DALI_TEST_EQUALS( size.width, 70.f, TEST_LOCATION );
- DALI_TEST_EQUALS( size.height, 70.f, TEST_LOCATION );
-
- pushButton.SetDisabledBackgroundImage( imageActor04 );
-
- application.SendNotification();
- application.Render();
-
- size = pushButton.GetDisabledBackgroundImage().GetCurrentSize();
-
- DALI_TEST_EQUALS( size.width, 80.f, TEST_LOCATION );
- DALI_TEST_EQUALS( size.height, 80.f, TEST_LOCATION );
-
- pushButton.SetDisabledImage( image05 );
-
- application.SendNotification();
- application.Render();
-
- size = pushButton.GetDisabledImage().GetCurrentSize();
-
- DALI_TEST_EQUALS( size.width, 90.f, TEST_LOCATION );
- DALI_TEST_EQUALS( size.height, 90.f, TEST_LOCATION );
-
- pushButton.SetDisabledImage( imageActor05 );
-
- application.SendNotification();
- application.Render();
-
- size = pushButton.GetDisabledImage().GetCurrentSize();
-
- DALI_TEST_EQUALS( size.width, 100.f, TEST_LOCATION );
- DALI_TEST_EQUALS( size.height, 100.f, TEST_LOCATION );
END_TEST;
}
diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp
index 9b9cad1..662502c 100644
--- a/automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp
+++ b/automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp
@@ -239,14 +239,11 @@ struct TestSumConstraint
*/
static float TestOvershootSnapDuration(ToolkitTestApplication &application, ScrollView scrollView)
{
- Property::Index overshootPropertyX = scrollView.GetPropertyIndex(ScrollView::SCROLL_OVERSHOOT_X_PROPERTY_NAME);
- Property::Index overshootPropertyY = scrollView.GetPropertyIndex(ScrollView::SCROLL_OVERSHOOT_Y_PROPERTY_NAME);
-
int timeToReachOrigin = -1;
for(int i = 0;i(overshootPropertyX);
- float overshootYValue = scrollView.GetProperty(overshootPropertyY);
+ float overshootXValue = scrollView.GetProperty(ScrollView::Property::OVERSHOOT_X);
+ float overshootYValue = scrollView.GetProperty(ScrollView::Property::OVERSHOOT_Y);
if(overshootXValue == 0.0f && overshootYValue == 0.0f)
{
break;
@@ -817,9 +814,8 @@ int UtcDaliScrollViewConstraints(void)
a.SetPosition( TEST_ACTOR_POSITION );
Wait(application);
- Property::Index scrollPositionProperty = scrollView.GetPropertyIndex(ScrollView::SCROLL_POSITION_PROPERTY_NAME);
Constraint constraint = Constraint::New( Actor::Property::POSITION,
- Source(scrollView, scrollPositionProperty),
+ Source(scrollView, ScrollView::Property::SCROLL_POSITION),
TestSumConstraint( TEST_CONSTRAINT_OFFSET ) );
constraint.SetRemoveAction(Constraint::Discard);
scrollView.ApplyConstraintToChildren(constraint);
@@ -865,10 +861,9 @@ int UtcDaliScrollViewBind(void)
a.SetPosition( TEST_ACTOR_POSITION );
Wait(application);
- Property::Index scrollPositionProperty = scrollView.GetPropertyIndex(ScrollView::SCROLL_POSITION_PROPERTY_NAME);
// apply this constraint to scrollview
Constraint constraint = Constraint::New( Actor::Property::POSITION,
- Source(scrollView, scrollPositionProperty),
+ Source(scrollView, ScrollView::Property::SCROLL_POSITION),
TestSumConstraint( TEST_CONSTRAINT_OFFSET ) );
constraint.SetRemoveAction(Constraint::Discard);
@@ -1034,12 +1029,9 @@ int UtcDaliScrollViewOvershoot(void)
// 1. Scroll page in NW (-500,-500 pixels), then inspect overshoot. (don't release touch)
Vector2 currentPos = Vector2(100.0f, 100.0f);
currentPos = PerformGestureDiagonalSwipe(application, currentPos, Vector2(5.0f, 5.0f), 100, false);
- Property::Index overshootXProperty = scrollView.GetPropertyIndex(ScrollView::SCROLL_OVERSHOOT_X_PROPERTY_NAME);
- Property::Index overshootYProperty = scrollView.GetPropertyIndex(ScrollView::SCROLL_OVERSHOOT_Y_PROPERTY_NAME);
- Property::Index scrollPositionProperty = scrollView.GetPropertyIndex(ScrollView::SCROLL_POSITION_PROPERTY_NAME);
- float overshootXValue = scrollView.GetProperty(overshootXProperty);
- float overshootYValue = scrollView.GetProperty(overshootYProperty);
- Vector3 positionValue = scrollView.GetProperty(scrollPositionProperty);
+ float overshootXValue = scrollView.GetProperty(ScrollView::Property::OVERSHOOT_X);
+ float overshootYValue = scrollView.GetProperty(ScrollView::Property::OVERSHOOT_Y);
+ Vector3 positionValue = scrollView.GetProperty(ScrollView::Property::SCROLL_POSITION);
DALI_TEST_EQUALS(overshootXValue, 1.0f, TEST_LOCATION);
DALI_TEST_EQUALS(overshootYValue, 1.0f, TEST_LOCATION);
DALI_TEST_EQUALS(positionValue, Vector3::ZERO, TEST_LOCATION);
diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Slider.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Slider.cpp
index d5d2ef0..89090da 100644
--- a/automated-tests/src/dali-toolkit/utc-Dali-Slider.cpp
+++ b/automated-tests/src/dali-toolkit/utc-Dali-Slider.cpp
@@ -125,7 +125,7 @@ int UtcDaliSliderSignals(void)
Stage::GetCurrent().Add( slider );
slider.SetParentOrigin(ParentOrigin::TOP_LEFT);
slider.SetAnchorPoint(ParentOrigin::TOP_LEFT);
- slider.SetPreferredSize( Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) );
+ slider.SetSize( Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) );
slider.SetPosition( 0.0f, 0.0f );
const float MIN_BOUND = 0.0f;
diff --git a/automated-tests/src/dali-toolkit/utc-Dali-SuperBlurView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-SuperBlurView.cpp
index 5fd205c..b7e662e 100644
--- a/automated-tests/src/dali-toolkit/utc-Dali-SuperBlurView.cpp
+++ b/automated-tests/src/dali-toolkit/utc-Dali-SuperBlurView.cpp
@@ -197,6 +197,7 @@ int UtcDaliSuperBlurViewGetBlurredImage(void)
tet_infoline( "UtcDaliSuperBlurViewGetBlurredImage" );
SuperBlurView blurView = SuperBlurView::New( BLUR_LEVELS );
+ blurView.SetRelayoutEnabled( false );
blurView.SetSize( 100.f,100.f );
Image inputImage = CreateSolidColorImage( application, Color::GREEN, 100, 100 );
blurView.SetImage( inputImage );
@@ -207,8 +208,8 @@ int UtcDaliSuperBlurViewGetBlurredImage(void)
DALI_TEST_CHECK( image1 );
Image image2 = blurView.GetBlurredImage( 2 );
- DALI_TEST_CHECK( image2.GetWidth() == 25 );
- DALI_TEST_CHECK( image2.GetHeight() == 25 );
+ DALI_TEST_EQUALS( image2.GetWidth(), 25, TEST_LOCATION );
+ DALI_TEST_EQUALS( image2.GetHeight(), 25, TEST_LOCATION );
Image image3 = blurView.GetBlurredImage( 3 );
DALI_TEST_CHECK( FrameBufferImage::DownCast( image2 ) );
diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TableView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TableView.cpp
index 484453c..0e99819 100644
--- a/automated-tests/src/dali-toolkit/utc-Dali-TableView.cpp
+++ b/automated-tests/src/dali-toolkit/utc-Dali-TableView.cpp
@@ -73,18 +73,18 @@ static void SetupTableViewAndActors(TableView& tableView, Actor& actor1, Actor&
tableView.SetRelayoutEnabled( true );
Stage::GetCurrent().Add( tableView );
- tableView.SetPreferredSize( Dali::Vector2( 100.0f, 100.0f ) );
+ tableView.SetSize( Dali::Vector2( 100.0f, 100.0f ) );
actor1 = Actor::New();
actor2 = Actor::New();
actor3 = Actor::New();
actor1.SetRelayoutEnabled( true );
- actor1.SetPreferredSize( Dali::Vector2( 10, 10 ) );
+ actor1.SetSize( Dali::Vector2( 10, 10 ) );
actor2.SetRelayoutEnabled( true );
- actor2.SetPreferredSize( Dali::Vector2( 10, 10 ) );
+ actor2.SetSize( Dali::Vector2( 10, 10 ) );
actor3.SetRelayoutEnabled( true );
- actor3.SetPreferredSize( Dali::Vector2( 10, 10 ) );
+ actor3.SetSize( Dali::Vector2( 10, 10 ) );
tableView.AddChild( actor1, TableView::CellPosition( 0, 0 ) );
tableView.AddChild( actor2, TableView::CellPosition( 0, 1 ) );
@@ -541,7 +541,7 @@ int UtcDaliTableViewSetGetProperty(void)
// Create a 1x1 table-view
TableView tableView = TableView::New(1,1);
- tableView.SetPreferredSize( Vector2( 100.0f, 100.0f ) );
+ tableView.SetSize( Vector2( 100.0f, 100.0f ) );
DALI_TEST_CHECK( tableView );
// Test "rows" property
diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ToolBar.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ToolBar.cpp
index e1042b2..d359334 100644
--- a/automated-tests/src/dali-toolkit/utc-Dali-ToolBar.cpp
+++ b/automated-tests/src/dali-toolkit/utc-Dali-ToolBar.cpp
@@ -114,23 +114,18 @@ int UtcDaliToolBarAddControl01(void)
try
{
ImageActor control1 = CreateSolidColorActor( Color::RED );
- control1.SetPreferredSize( Vector2( 100.f, 100.f ) );
- control1.SetResizePolicy( FIXED, ALL_DIMENSIONS );
+ control1.SetSize( Vector2( 100.f, 100.f ) );
ImageActor control2 = CreateSolidColorActor( Color::RED );
- control2.SetPreferredSize( Vector2( 100.f, 100.f ) );
- control2.SetResizePolicy( FIXED, ALL_DIMENSIONS );
+ control2.SetSize( Vector2( 100.f, 100.f ) );
ImageActor control3 = CreateSolidColorActor( Color::RED );
- control3.SetPreferredSize( Vector2( 100.f, 100.f ) );
- control3.SetResizePolicy( FIXED, ALL_DIMENSIONS );
+ control3.SetSize( Vector2( 100.f, 100.f ) );
ImageActor control4 = CreateSolidColorActor( Color::RED );
- control4.SetPreferredSize( Vector2( 100.f, 100.f ) );
- control4.SetResizePolicy( FIXED, ALL_DIMENSIONS );
+ control4.SetSize( Vector2( 100.f, 100.f ) );
ImageActor control5 = CreateSolidColorActor( Color::RED );
- control5.SetPreferredSize( Vector2( 100.f, 100.f ) );
- control5.SetResizePolicy( FIXED, ALL_DIMENSIONS );
+ control5.SetSize( Vector2( 100.f, 100.f ) );
ToolBar toolbar = ToolBar::New();
- toolbar.SetPreferredSize( Vector2( 600.f, 100.f ) );
+ toolbar.SetSize( Vector2( 600.f, 100.f ) );
application.Render();
application.SendNotification();
@@ -144,14 +139,11 @@ int UtcDaliToolBarAddControl01(void)
toolbar.AddControl( control5, 0.1f, Alignment::HorizontalRight, Alignment::Padding( 1.f, 1.f, 1.f, 1.f ) );
ImageActor control6 = CreateSolidColorActor( Color::RED );
- control6.SetPreferredSize( Vector2( 100.f, 100.f ) );
- control6.SetResizePolicy( FIXED, ALL_DIMENSIONS );
+ control6.SetSize( Vector2( 100.f, 100.f ) );
ImageActor control7 = CreateSolidColorActor( Color::RED );
- control7.SetPreferredSize( Vector2( 100.f, 100.f ) );
- control7.SetResizePolicy( FIXED, ALL_DIMENSIONS );
+ control7.SetSize( Vector2( 100.f, 100.f ) );
ImageActor control8 = CreateSolidColorActor( Color::RED );
- control8.SetPreferredSize( Vector2( 100.f, 100.f ) );
- control8.SetResizePolicy( FIXED, ALL_DIMENSIONS );
+ control8.SetSize( Vector2( 100.f, 100.f ) );
application.Render();
application.SendNotification();
diff --git a/automated-tests/src/dali-toolkit/utc-Dali-View.cpp b/automated-tests/src/dali-toolkit/utc-Dali-View.cpp
index 2d28fd2..ad124e1 100644
--- a/automated-tests/src/dali-toolkit/utc-Dali-View.cpp
+++ b/automated-tests/src/dali-toolkit/utc-Dali-View.cpp
@@ -308,7 +308,7 @@ int UtcDaliViewOrientationChanged(void)
view.SetRelayoutEnabled( true );
Stage::GetCurrent().Add( view );
- view.SetPreferredSize( Vector2( 480, 800 ) );
+ view.SetSize( Vector2( 480, 800 ) );
view.OrientationAnimationStartedSignal().Connect( &StartAnimation );
diff --git a/dali-toolkit/internal/builder/builder-animations.cpp b/dali-toolkit/internal/builder/builder-animations.cpp
index c1c8921..bea8368 100644
--- a/dali-toolkit/internal/builder/builder-animations.cpp
+++ b/dali-toolkit/internal/builder/builder-animations.cpp
@@ -16,6 +16,8 @@
*/
// EXTERNAL INCLUDES
+#include
+#include
#include
// INTERNAL INCLUDES
diff --git a/dali-toolkit/internal/builder/builder-declarations.h b/dali-toolkit/internal/builder/builder-declarations.h
index 766e1bf..21c49a1 100644
--- a/dali-toolkit/internal/builder/builder-declarations.h
+++ b/dali-toolkit/internal/builder/builder-declarations.h
@@ -19,7 +19,12 @@
*/
// EXTERNAL INCLUDES
-#include
+#include
+#include
+#include
+#include
+#include
+#include
// INTERNAL INCLUDES
#include
diff --git a/dali-toolkit/internal/builder/builder-impl.cpp b/dali-toolkit/internal/builder/builder-impl.cpp
index 8ca0281..202e944 100644
--- a/dali-toolkit/internal/builder/builder-impl.cpp
+++ b/dali-toolkit/internal/builder/builder-impl.cpp
@@ -22,11 +22,16 @@
#include
#include
#include
-
+#include
+#include
+#include
+#include
+#include
+#include
+#include
#include
// INTERNAL INCLUDES
-
#include
#include
diff --git a/dali-toolkit/internal/builder/builder-impl.h b/dali-toolkit/internal/builder/builder-impl.h
index aeb3ff1..4fb7aba 100644
--- a/dali-toolkit/internal/builder/builder-impl.h
+++ b/dali-toolkit/internal/builder/builder-impl.h
@@ -22,8 +22,11 @@
#include
#include
#include