// Check gesture actually happens
{
DummyControl dummy = DummyControl::New(true);
- dummy.SetSize( Vector3(100.0f, 100.0f, 100.0f) );
+ dummy.SetSize( Vector2(100.0f, 100.0f ) );
dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummy);
// Ensure full code coverage
{
DummyControl dummy = DummyControl::New();
- dummy.SetSize( Vector3(100.0f, 100.0f, 100.0f) );
+ dummy.SetSize( Vector2( 100.0f, 100.0f ) );
dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummy);
application.Render();
application.SendNotification();
- DALI_TEST_EQUALS( dummyImpl.sizeSetCalled, false, TEST_LOCATION );
- Vector3 size(100.0f, 200.0f, 0.0f);
+ DALI_TEST_EQUALS( dummyImpl.sizeSetCalled, true, TEST_LOCATION ); // Called from size negotiation
+ Vector2 size(100.0f, 200.0f);
dummy.SetSize(size);
application.Render();
application.Render();
application.SendNotification();
- DALI_TEST_EQUALS(size, dummy.GetCurrentSize(), TEST_LOCATION);
+ DALI_TEST_EQUALS(size, dummy.GetCurrentSize().GetVectorXY(), TEST_LOCATION);
DALI_TEST_EQUALS( dummyImpl.sizeSetCalled, true, TEST_LOCATION );
Stage::GetCurrent().Remove(dummy);
DummyControl dummy = DummyControl::New();
Stage::GetCurrent().Add(dummy);
- Vector3 size(100.0f, 200.0f, 0.0f);
- DALI_TEST_CHECK( size != dummy.GetCurrentSize() );
+ Vector2 size(100.0f, 200.0f);
+ DALI_TEST_CHECK( size != dummy.GetCurrentSize().GetVectorXY() );
application.Render();
application.SendNotification();
application.Render();
application.SendNotification();
- DALI_TEST_EQUALS(size, dummy.GetCurrentSize(), TEST_LOCATION);
+ DALI_TEST_EQUALS(size, dummy.GetCurrentSize().GetVectorXY(), TEST_LOCATION);
Stage::GetCurrent().Remove(dummy);
}
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();
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();
DummyControl dummy = DummyControl::New( true );
DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
- dummy.SetSize(100.0f, 100.0f);
+ dummy.SetSize( Vector2( 100.0f, 100.0f ) );
dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummy);
{
DummyControl dummy = DummyControl::New();
- dummy.SetSize(100.0f, 100.0f);
+ dummy.SetSize( Vector2( 100.0f, 100.0f ) );
dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummy);
END_TEST;
}
-int UtcDaliControlImplStyleChange(void)
-{
- ToolkitTestApplication application;
-
- DummyControl dummy = DummyControl::New( true );
- DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
-
- Stage::GetCurrent().Add(dummy);
-
- application.Render();
- application.SendNotification();
- application.Render();
- application.SendNotification();
-
- // Add a Control and normal Actor as children
- DummyControl dummyChild = DummyControl::New();
- dummy.Add(dummyChild);
-
- Actor actor = Actor::New();
- dummy.Add(actor);
-
- DALI_TEST_EQUALS( dummyImpl.fontChangeCalled, false, TEST_LOCATION );
- StyleChange styleChange;
- styleChange.defaultFontChange = true;
- Dali::StyleMonitor styleMonitor = StyleMonitor::Get();
- styleMonitor.EmitStyleChangeSignal(styleChange);
-
- DALI_TEST_EQUALS( dummyImpl.fontChangeCalled, true, TEST_LOCATION );
-
- Stage::GetCurrent().Remove(dummy);
- END_TEST;
-}
-
int UtcDaliControlImplKeyInputFocusGained(void)
{
ToolkitTestApplication application;
DummyControl dummy = DummyControl::New( true );
DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
- dummy.SetSize(100.0f, 100.0f);
+ dummy.SetSize( Vector2( 100.0f, 100.0f ) );
dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummy);
{
DummyControl dummy = DummyControl::New();
- dummy.SetSize(100.0f, 100.0f);
+ dummy.SetSize( Vector2( 100.0f, 100.0f ) );
dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummy);