// Create a text field
TextField textField = TextField::New();
textField.SetSize( 400.f, 60.f );
- textField.SetParentOrigin( ParentOrigin::TOP_LEFT );
- textField.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ textField.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ textField.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Add the text field to the stage
Stage::GetCurrent().Add( textField );
// Check that the background is created
Actor backgroundActor = renderableActor.GetChildAt( 0u );
DALI_TEST_CHECK( backgroundActor );
- DALI_TEST_CHECK( backgroundActor.GetName() == "TextBackgroundColorActor" );
+ DALI_TEST_CHECK( backgroundActor.GetProperty< std::string >( Dali::Actor::Property::NAME ) == "TextBackgroundColorActor" );
// Change the text to contain more characters
controller->SetText( "Text Multiple Background Test" );
// The background should now be lowered below the highlight
backgroundActor = stencil.GetChildAt( 0u );
DALI_TEST_CHECK( backgroundActor );
- DALI_TEST_CHECK( backgroundActor.GetName() == "TextBackgroundColorActor" );
+ DALI_TEST_CHECK( backgroundActor.GetProperty< std::string >( Dali::Actor::Property::NAME ) == "TextBackgroundColorActor" );
END_TEST;
}
Stage::GetCurrent().Add(third);
// make the third actor invisible
- third.SetVisible(false);
+ third.SetProperty( Actor::Property::VISIBLE,false);
// flush the queue and render once
application.SendNotification();
application.Render();
DALI_TEST_CHECK(manager.SetCurrentFocusActor(third) == false);
// Make the third actor visible
- third.SetVisible(true);
+ third.SetProperty( Actor::Property::VISIBLE,true);
// flush the queue and render once
application.SendNotification();
application.Render();
DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityManager::ACCESSIBILITY_LABEL) == "third");
// Make the first actor invisible
- first.SetVisible(false);
+ first.SetProperty( Actor::Property::VISIBLE,false);
// flush the queue and render once
application.SendNotification();
application.Render();
DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityManager::ACCESSIBILITY_LABEL) == "third");
// Make the third actor invisible so that no actor can be focused.
- third.SetVisible(false);
+ third.SetProperty( Actor::Property::VISIBLE,false);
// flush the queue and render once
application.SendNotification();
application.Render();
DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityManager::ACCESSIBILITY_LABEL) == "first");
// Make the third actor invisible
- third.SetVisible(false);
+ third.SetProperty( Actor::Property::VISIBLE,false);
// flush the queue and render once
application.SendNotification();
application.Render();
DALI_TEST_CHECK(manager.GetAccessibilityAttribute(manager.GetCurrentFocusActor(), AccessibilityManager::ACCESSIBILITY_LABEL) == "first");
// Make the first actor invisible so that no actor can be focused.
- first.SetVisible(false);
+ first.SetProperty( Actor::Property::VISIBLE,false);
// flush the queue and render once
application.SendNotification();
application.Render();
Alignment alignment = Alignment::New();
alignment.SetSize(100.0f, 100.0f);
- alignment.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ alignment.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(alignment);
alignment.TouchSignal().Connect(&TouchCallback);
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummy.SetSize( 200.f, 200.f );
- dummy.SetParentOrigin( ParentOrigin::CENTER );
+ dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage::GetCurrent().Add( dummy );
application.SendNotification();
DALI_TEST_CHECK( renderer );
DALI_TEST_CHECK( renderer.GetProperty< int >( DevelRenderer::Property::RENDERING_BEHAVIOR ) == DevelRenderer::Rendering::CONTINUOUSLY );
- actor.SetVisible( false );
+ actor.SetProperty( Actor::Property::VISIBLE, false );
application.SendNotification();
application.Render();
#include <stdlib.h>
#include <unistd.h>
#include <dali/dali.h>
+#include <dali/devel-api/actors/actor-devel.h>
#include <dali-toolkit-test-suite-utils.h>
#include <toolkit-event-thread-callback.h>
#include <dali-toolkit/dali-toolkit.h>
DALI_TEST_CHECK( !actor.OnStage() );
- view.SetParentOrigin(ParentOrigin::CENTER);
+ view.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
view.SetSize(Stage::GetCurrent().GetSize());
view.Add(actor);
Stage::GetCurrent().Add(view);
RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
DALI_TEST_CHECK( 1u == taskList.GetTaskCount() );
- view.SetParentOrigin(ParentOrigin::CENTER);
+ view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
view.SetSize(Stage::GetCurrent().GetSize());
view.Add(Actor::New());
Stage::GetCurrent().Add(view);
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( view.GetCurrentSize(), size, TEST_LOCATION );
+ DALI_TEST_EQUALS( view.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), size, TEST_LOCATION );
END_TEST;
}
Actor root = emitter.GetRootActor();
Stage::GetCurrent().Add( root );
root.SetPosition( Vector3::ZERO );
- root.SetParentOrigin( ParentOrigin::CENTER );
- root.SetAnchorPoint( AnchorPoint::CENTER );
+ root.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ root.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
TestGlAbstraction& gl = application.GetGlAbstraction();
Actor root = emitter.GetRootActor();
Stage::GetCurrent().Add( root );
root.SetPosition( Vector3::ZERO );
- root.SetParentOrigin( ParentOrigin::CENTER );
- root.SetAnchorPoint( AnchorPoint::CENTER );
+ root.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ root.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
Renderer renderer = root.GetRendererAt( 0 );
DALI_TEST_CHECK( renderer );
Actor actor = Stage::GetCurrent().GetRootLayer().FindChildByName("subActor");
DALI_TEST_CHECK( actor );
- DALI_TEST_CHECK( !actor.IsVisible() );
+ DALI_TEST_CHECK( !actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) );
END_TEST;
}
Actor actor = Stage::GetCurrent().GetRootLayer().FindChildByName("subActor");
DALI_TEST_CHECK( actor );
- DALI_TEST_CHECK( !actor.IsVisible() );
+ DALI_TEST_CHECK( !actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) );
END_TEST;
}
Actor actor = Stage::GetCurrent().GetRootLayer().FindChildByName("actor");
DALI_TEST_CHECK( actor );
- DALI_TEST_CHECK( !actor.IsVisible() );
+ DALI_TEST_CHECK( !actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) );
END_TEST;
}
Actor actor = Stage::GetCurrent().GetRootLayer().FindChildByName("actor");
DALI_TEST_CHECK( actor );
- DALI_TEST_CHECK( actor.IsVisible() );
+ DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) );
END_TEST;
}
Actor actor = Stage::GetCurrent().GetRootLayer().FindChildByName("subActor");
DALI_TEST_CHECK( actor );
- DALI_TEST_CHECK( !actor.IsVisible() );
+ DALI_TEST_CHECK( !actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) );
END_TEST;
}
application.Render();
Actor createdActor = rootActor.GetChildAt( 0 );
- DALI_TEST_EQUALS( createdActor.GetMaximumSize(), Vector2(100.0f,15.0f), TEST_LOCATION );
- DALI_TEST_EQUALS( createdActor.GetCurrentPosition(), Vector3(100.0f,10.0f,1.0f), TEST_LOCATION );
- DALI_TEST_EQUALS( createdActor.GetCurrentColor(), Vector4(0.5f,0.5f,0.5f,1.0f), TEST_LOCATION );
- DALI_TEST_EQUALS( createdActor.IsSensitive(), false, TEST_LOCATION );
+ DALI_TEST_EQUALS( createdActor.GetProperty< Vector2 >( Actor::Property::MAXIMUM_SIZE ), Vector2(100.0f,15.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( createdActor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(100.0f,10.0f,1.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( createdActor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Vector4(0.5f,0.5f,0.5f,1.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( createdActor.GetProperty< bool >( Actor::Property::SENSITIVE ), false, TEST_LOCATION );
DALI_TEST_EQUALS( createdActor.GetColorMode(), USE_OWN_MULTIPLY_PARENT_COLOR, TEST_LOCATION );
END_TEST;
const float AUTO_REPEATING_DELAY = 0.15f;
Button button = PushButton::New();
- button.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- button.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ button.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
button.SetPosition( 240, 400 );
button.SetSize( 100, 100 );
Stage::GetCurrent().Add( button );
tet_infoline(" UtcDaliButtonPressedSignalP");
Button button = PushButton::New();
- button.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- button.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ button.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
button.SetPosition( 240, 400 );
button.SetSize( 100, 100 );
tet_infoline(" UtcDaliButtonClickedSignalP");
Button button = PushButton::New();
- button.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- button.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ button.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
button.SetPosition( 240, 400 );
button.SetSize( 100, 100 );
ToolkitTestApplication application;
Button parentButton = PushButton::New();
- parentButton.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- parentButton.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ parentButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ parentButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
parentButton.SetSize( 20, 20 );
Stage::GetCurrent().Add( parentButton );
Button childButton = PushButton::New();
- childButton.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- childButton.SetParentOrigin( ParentOrigin::BOTTOM_LEFT );
+ childButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ childButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_LEFT );
childButton.SetSize( 20, 20 );
parentButton.Add( childButton );
ToolkitTestApplication application;
Button parentButton = PushButton::New();
- parentButton.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- parentButton.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ parentButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ parentButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
parentButton.SetSize( 20, 20 );
Stage::GetCurrent().Add( parentButton );
parentButton.ReleasedSignal().Connect( &ButtonCallback );
Button button = PushButton::New();
button.SetProperty( Button::Property::TOGGLABLE, true);
- button.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- button.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ button.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
button.SetSize( 20, 20 );
Stage::GetCurrent().Add( button );
button.ReleasedSignal().Connect( &ButtonCallback );
// The confirmation popup can use any control type for the ok or cancel buttons.
// It requires that the name is "controlOk" to provide the "controlSignalOk" signal.
PushButton buttonOK = PushButton::New();
- buttonOK.SetName( "controlOk" );
+ buttonOK.SetProperty( Dali::Actor::Property::NAME, "controlOk" );
footerActor.Add( buttonOK );
PushButton buttonCancel = PushButton::New();
- buttonCancel.SetName( "controlCancel" );
+ buttonCancel.SetProperty( Dali::Actor::Property::NAME, "controlCancel" );
footerActor.Add( buttonCancel );
popup.SetFooter( footerActor );
Actor footerActor = Actor::New();
PushButton buttonOK = PushButton::New();
- buttonOK.SetName( "controlOkMisnamed" );
+ buttonOK.SetProperty( Dali::Actor::Property::NAME, "controlOkMisnamed" );
popup.SetFooter( buttonOK );
// Tell the confirmation popup to connect to the signal in our button called "onStage".
DummyControl dummy = DummyControl::New(true);
dummy.SetSize( Vector2(100.0f, 100.0f ) );
- dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummy);
// Render and notify a couple of times
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( size, dummy.GetCurrentSize().GetVectorXY(), TEST_LOCATION );
+ DALI_TEST_EQUALS( size, dummy.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).GetVectorXY(), TEST_LOCATION );
DALI_TEST_EQUALS( dummyImpl.sizeSetCalled, true, TEST_LOCATION );
Stage::GetCurrent().Remove(dummy);
Stage::GetCurrent().Add(dummy);
Vector2 size(100.0f, 200.0f);
- DALI_TEST_CHECK( size != dummy.GetCurrentSize().GetVectorXY() );
+ DALI_TEST_CHECK( size != dummy.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).GetVectorXY() );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS(size, dummy.GetCurrentSize().GetVectorXY(), TEST_LOCATION);
+ DALI_TEST_EQUALS(size, dummy.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).GetVectorXY(), TEST_LOCATION);
Stage::GetCurrent().Remove(dummy);
}
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
dummy.SetSize( Vector2( 100.0f, 100.0f ) );
- dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummy);
application.Render();
DummyControl dummy = DummyControl::New();
dummy.SetSize( Vector2( 100.0f, 100.0f ) );
- dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummy);
application.Render();
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
dummy.SetSize( Vector2( 100.0f, 100.0f ) );
- dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummy);
application.Render();
DummyControl dummy = DummyControl::New();
dummy.SetSize( Vector2( 100.0f, 100.0f ) );
- dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummy);
application.Render();
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
dummy.SetSize( Vector2( 100.0f, 100.0f ) );
- dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummy);
dummy.WheelEventSignal().Connect(&WheelEventCallback);
DummyControl dummy = DummyControl::New();
dummy.SetSize( Vector2( 100.0f, 100.0f ) );
- dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummy);
dummy.WheelEventSignal().Connect(&WheelEventCallback);
DummyControl dummy = DummyControl::New( true );
dummy.SetSize( Vector2( 100.0f, 100.0f ) );
- dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummy);
dummy.SetStyleName("TestStyle");
//DummyControl actor = DummyControl::New();
controlWrapper.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
- controlWrapper.SetName("Actor1");
- controlWrapper.SetColor(Color::CYAN);
+ controlWrapper.SetProperty( Dali::Actor::Property::NAME,"Actor1");
+ controlWrapper.SetProperty( Actor::Property::COLOR,Color::CYAN);
Stage::GetCurrent().Add(controlWrapper);
Animation anim = controlWrapperImpl->CreateTransition( transition );
DALI_TEST_CHECK( gKeyInputFocusCallBackCalled );
END_TEST;
-}
\ No newline at end of file
+}
//check the cube rotation value and color values just before the end of different transitions
waveEffect.SetTargetTexture( texture );
Wait( application, TRANSITION_BEFORE_END_DURATION );
- DALI_TEST_EQUALS( cube.GetCurrentOrientation(), Quaternion( -Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube.GetChildAt(0).GetCurrentColor(), HALF_BRIGHTNESS, EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube.GetChildAt(1).GetCurrentColor(), FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( -Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube.GetChildAt(0).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), HALF_BRIGHTNESS, EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube.GetChildAt(1).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
waveEffect.SetTargetTexture( texture );
waveEffect.StartTransition(PAN_POSITION1, PAN_DISPLACEMENT1);
Wait( application, TRANSITION_BEFORE_END_DURATION );
- DALI_TEST_EQUALS( cube.GetCurrentOrientation(), Quaternion( -Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube.GetChildAt(0).GetCurrentColor(), HALF_BRIGHTNESS, EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube.GetChildAt(1).GetCurrentColor(), FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( -Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube.GetChildAt(0).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), HALF_BRIGHTNESS, EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube.GetChildAt(1).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
waveEffect.SetTargetTexture( texture );
waveEffect.StartTransition(false);
Wait( application, TRANSITION_BEFORE_END_DURATION );
- DALI_TEST_EQUALS( cube.GetCurrentOrientation(), Quaternion( Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube.GetChildAt(0).GetCurrentColor(), HALF_BRIGHTNESS, EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube.GetChildAt(1).GetCurrentColor(), FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube.GetChildAt(0).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), HALF_BRIGHTNESS, EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube.GetChildAt(1).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
waveEffect.SetTargetTexture( texture );
waveEffect.StartTransition(PAN_POSITION2, PAN_DISPLACEMENT2);
Wait( application, TRANSITION_BEFORE_END_DURATION );
- DALI_TEST_EQUALS( cube.GetCurrentOrientation(), Quaternion( Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube.GetChildAt(0).GetCurrentColor(), HALF_BRIGHTNESS, EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube.GetChildAt(1).GetCurrentColor(), FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube.GetChildAt(0).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), HALF_BRIGHTNESS, EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube.GetChildAt(1).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
END_TEST;
}
//check the cube rotation value and color values just before the end of different transitions
Wait( application, TRANSITION_BEFORE_END_DURATION );
- DALI_TEST_EQUALS( cube1.GetCurrentOrientation(), Quaternion( -Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetCurrentOrientation(), Quaternion( Dali::ANGLE_90, Vector3::XAXIS), EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), HALF_BRIGHTNESS, EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube1.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( -Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_90, Vector3::XAXIS), EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), HALF_BRIGHTNESS, EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
crossEffect.SetTargetTexture( texture );
crossEffect.StartTransition(PAN_POSITION1, PAN_DISPLACEMENT1);
Wait( application, TRANSITION_BEFORE_END_DURATION );
- DALI_TEST_EQUALS( cube1.GetCurrentOrientation(), Quaternion( -Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetCurrentOrientation(), Quaternion( Dali::ANGLE_90, Vector3::XAXIS), EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), HALF_BRIGHTNESS, EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube1.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( -Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_90, Vector3::XAXIS), EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), HALF_BRIGHTNESS, EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
crossEffect.SetTargetTexture( texture );
crossEffect.StartTransition(false);
Wait( application, TRANSITION_BEFORE_END_DURATION );
- DALI_TEST_EQUALS( cube1.GetCurrentOrientation(), Quaternion( Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetCurrentOrientation(), Quaternion( -Dali::ANGLE_90, Vector3::XAXIS), EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), HALF_BRIGHTNESS, EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube1.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( -Dali::ANGLE_90, Vector3::XAXIS), EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), HALF_BRIGHTNESS, EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
crossEffect.SetTargetTexture( texture );
crossEffect.StartTransition(PAN_POSITION2, PAN_DISPLACEMENT2);
Wait( application, TRANSITION_BEFORE_END_DURATION );
- DALI_TEST_EQUALS( cube1.GetCurrentOrientation(), Quaternion( Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetCurrentOrientation(), Quaternion( -Dali::ANGLE_90, Vector3::XAXIS), EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), HALF_BRIGHTNESS, EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube1.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( -Dali::ANGLE_90, Vector3::XAXIS), EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), HALF_BRIGHTNESS, EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
END_TEST;
}
//check the cube rotation value and color values just before the end of different transitions
Wait( application, TRANSITION_BEFORE_END_DURATION );
- DALI_TEST_EQUALS( cube1.GetCurrentOrientation(), Quaternion( -Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetCurrentOrientation(), Quaternion( Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), HALF_BRIGHTNESS, EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube1.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( -Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), HALF_BRIGHTNESS, EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
foldEffect.SetTargetTexture( texture );
foldEffect.StartTransition(PAN_POSITION1, PAN_DISPLACEMENT1);
Wait( application, TRANSITION_BEFORE_END_DURATION );
- DALI_TEST_EQUALS( cube1.GetCurrentOrientation(), Quaternion( -Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetCurrentOrientation(), Quaternion( Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), HALF_BRIGHTNESS, EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube1.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( -Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), HALF_BRIGHTNESS, EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
foldEffect.SetTargetTexture( texture );
foldEffect.StartTransition(false);
Wait( application, TRANSITION_BEFORE_END_DURATION );
- DALI_TEST_EQUALS( cube1.GetCurrentOrientation(), Quaternion( Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetCurrentOrientation(), Quaternion( -Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), HALF_BRIGHTNESS, EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(),FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube1.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( -Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), HALF_BRIGHTNESS, EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ),FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
foldEffect.SetTargetTexture( texture );
foldEffect.StartTransition(PAN_POSITION2, PAN_DISPLACEMENT2);
Wait( application, TRANSITION_BEFORE_END_DURATION );
- DALI_TEST_EQUALS( cube1.GetCurrentOrientation(), Quaternion( Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetCurrentOrientation(), Quaternion( -Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), HALF_BRIGHTNESS, EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube1.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( -Dali::ANGLE_90, Vector3::YAXIS), EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), HALF_BRIGHTNESS, EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), FULL_BRIGHTNESS, EPISILON, TEST_LOCATION );
END_TEST;
}
waveEffect.StopTransition();
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
- DALI_TEST_EQUALS( cube.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::ZERO), FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube.GetChildAt(0).GetCurrentColor(), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube.GetChildAt(1).GetCurrentColor(), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::ZERO), FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube.GetChildAt(0).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube.GetChildAt(1).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
waveEffect.SetTargetTexture( firstTexture );
waveEffect.StartTransition(PAN_POSITION1, PAN_DISPLACEMENT1);
waveEffect.StopTransition();
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
- DALI_TEST_EQUALS( cube.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::ZERO), FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube.GetChildAt(0).GetCurrentColor(), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube.GetChildAt(1).GetCurrentColor(), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::ZERO), FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube.GetChildAt(0).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube.GetChildAt(1).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
waveEffect.SetTargetTexture( secondTexture );
waveEffect.StartTransition(false);
waveEffect.StopTransition();
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
- DALI_TEST_EQUALS( cube.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::ZERO), FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube.GetChildAt(0).GetCurrentColor(), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube.GetChildAt(1).GetCurrentColor(), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::ZERO), FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube.GetChildAt(0).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube.GetChildAt(1).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
waveEffect.SetTargetTexture( firstTexture );
waveEffect.StartTransition(PAN_POSITION2, PAN_DISPLACEMENT2);
waveEffect.StopTransition();
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
- DALI_TEST_EQUALS( cube.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::ZERO), FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube.GetChildAt(0).GetCurrentColor(), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube.GetChildAt(1).GetCurrentColor(), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::ZERO), FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube.GetChildAt(0).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube.GetChildAt(1).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
END_TEST;
}
crossEffect.StopTransition();
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
- DALI_TEST_EQUALS( cube0.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::ZERO), FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube1.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::ZERO), FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::ZERO), FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube1.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::ZERO), FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
crossEffect.SetTargetTexture( firstTexture );
crossEffect.StartTransition(PAN_POSITION1, PAN_DISPLACEMENT1);
crossEffect.StopTransition();
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
- DALI_TEST_EQUALS( cube0.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::ZERO), FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube1.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::ZERO), FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::ZERO), FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube1.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::ZERO), FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
crossEffect.SetTargetTexture( secondTexture );
crossEffect.StartTransition(false);
crossEffect.StopTransition();
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
- DALI_TEST_EQUALS( cube0.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::ZERO), FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube1.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::ZERO), FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::ZERO), FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube1.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::ZERO), FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
crossEffect.SetTargetTexture( firstTexture );
crossEffect.StartTransition(PAN_POSITION2, PAN_DISPLACEMENT2);
crossEffect.StopTransition();
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
- DALI_TEST_EQUALS( cube1.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::XAXIS), FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube1.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::XAXIS), FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
END_TEST;
}
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
- DALI_TEST_EQUALS( cube1.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::XAXIS), FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube1.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::XAXIS), FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
foldEffect.SetTargetTexture( firstTexture );
foldEffect.StartTransition(PAN_POSITION1, PAN_DISPLACEMENT1);
foldEffect.StopTransition();
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
- DALI_TEST_EQUALS( cube1.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::XAXIS), FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube1.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::XAXIS), FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
foldEffect.SetTargetTexture( secondTexture );
foldEffect.StartTransition(false);
foldEffect.StopTransition();
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
- DALI_TEST_EQUALS( cube1.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::XAXIS), FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube1.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::XAXIS), FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
foldEffect.SetTargetTexture( firstTexture );
foldEffect.StartTransition(PAN_POSITION2, PAN_DISPLACEMENT2);
foldEffect.StopTransition();
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
- DALI_TEST_EQUALS( cube1.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentColor(), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
- DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentColor(), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube1.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS), FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(0).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), FULL_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( cube0.GetChildAt(1).GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), HALF_BRIGHTNESS, FLT_EPISILON, TEST_LOCATION );
END_TEST;
}
Dali::Toolkit::DragAndDropDetector detector = Dali::Toolkit::DragAndDropDetector::New();
Control control = Control::New();
control.SetSize(100.0f, 100.0f);
- control.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ control.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(control);
detector.Attach(control);
Control control2 = Control::New();
control1.SetSize(100.0f,100.0f);
control2.SetSize(100.0f, 100.0f);
- control1.SetAnchorPoint(AnchorPoint::TOP_LEFT);
- control2.SetAnchorPoint(AnchorPoint::TOP_LEFT);
- control1.SetParentOrigin(ParentOrigin::TOP_LEFT);
- control2.SetParentOrigin(ParentOrigin::TOP_LEFT);
+ control1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+ control2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+ control1.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ control2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
control1.SetPosition(0.0f, 0.0f);
control2.SetPosition(0.0f, 100.0f);
Control control2 = Control::New();
control1.SetSize(100.0f,100.0f);
control2.SetSize(100.0f, 100.0f);
- control1.SetAnchorPoint(AnchorPoint::TOP_LEFT);
- control2.SetAnchorPoint(AnchorPoint::TOP_LEFT);
- control1.SetParentOrigin(ParentOrigin::TOP_LEFT);
- control2.SetParentOrigin(ParentOrigin::TOP_LEFT);
+ control1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+ control2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+ control1.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ control2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
control1.SetPosition(0.0f, 0.0f);
control2.SetPosition(0.0f, 100.0f);
Control control2 = Control::New();
control1.SetSize(100.0f,100.0f);
control2.SetSize(100.0f, 100.0f);
- control1.SetAnchorPoint(AnchorPoint::TOP_LEFT);
- control2.SetAnchorPoint(AnchorPoint::TOP_LEFT);
- control1.SetParentOrigin(ParentOrigin::TOP_LEFT);
- control2.SetParentOrigin(ParentOrigin::TOP_LEFT);
+ control1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+ control2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+ control1.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ control2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
control1.SetPosition(0.0f, 0.0f);
control2.SetPosition(0.0f, 100.0f);
- control1.SetLeaveRequired(true);
- control2.SetLeaveRequired(true);
+ control1.SetProperty( Actor::Property::LEAVE_REQUIRED,true);
+ control2.SetProperty( Actor::Property::LEAVE_REQUIRED,true);
Stage::GetCurrent().Add(control1);
Stage::GetCurrent().Add(control2);
Control control2 = Control::New();
control1.SetSize(100.0f,100.0f);
control2.SetSize(100.0f, 100.0f);
- control1.SetAnchorPoint(AnchorPoint::TOP_LEFT);
- control2.SetAnchorPoint(AnchorPoint::TOP_LEFT);
- control1.SetParentOrigin(ParentOrigin::TOP_LEFT);
- control2.SetParentOrigin(ParentOrigin::TOP_LEFT);
+ control1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+ control2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+ control1.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ control2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
control1.SetPosition(0.0f, 0.0f);
control2.SetPosition(0.0f, 100.0f);
Control control2 = Control::New();
control1.SetSize(100.0f,100.0f);
control2.SetSize(100.0f, 100.0f);
- control1.SetAnchorPoint(AnchorPoint::TOP_LEFT);
- control2.SetAnchorPoint(AnchorPoint::TOP_LEFT);
- control1.SetParentOrigin(ParentOrigin::TOP_LEFT);
- control2.SetParentOrigin(ParentOrigin::TOP_LEFT);
+ control1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+ control2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+ control1.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ control2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
control1.SetPosition(0.0f, 0.0f);
control2.SetPosition(0.0f, 100.0f);
Dali::Toolkit::DragAndDropDetector detector = Dali::Toolkit::DragAndDropDetector::New();
Control control1 = Control::New();
Control control2 = Control::New();
- control1.SetName("control1");
- control2.SetName("control2");
+ control1.SetProperty( Dali::Actor::Property::NAME,"control1");
+ control2.SetProperty( Dali::Actor::Property::NAME,"control2");
control1.SetSize(100.0f,100.0f);
control2.SetSize(100.0f, 100.0f);
- control1.SetAnchorPoint(AnchorPoint::TOP_LEFT);
- control2.SetAnchorPoint(AnchorPoint::TOP_LEFT);
- control1.SetParentOrigin(ParentOrigin::TOP_LEFT);
- control2.SetParentOrigin(ParentOrigin::TOP_LEFT);
+ control1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+ control2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+ control1.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ control2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
control1.SetPosition(0.0f, 0.0f);
control2.SetPosition(0.0f, 100.0f);
DALI_TEST_CHECK( !actor.OnStage() );
- view.SetParentOrigin(ParentOrigin::CENTER);
+ view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
view.SetSize(Stage::GetCurrent().GetSize());
view.Add(actor);
Stage::GetCurrent().Add(view);
actor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
DALI_TEST_CHECK( !actor.OnStage() );
- view.SetParentOrigin(ParentOrigin::CENTER);
+ view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
view.Add(actor);
view.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
stage.Add( view );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( view.GetCurrentSize(), Vector3( 200.0f, 200.0f, 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( view.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3( 200.0f, 200.0f, 0.0f ), TEST_LOCATION );
}
{
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( view.GetCurrentSize(), Vector3( 200.0f, 200.0f, 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( view.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3( 200.0f, 200.0f, 0.0f ), TEST_LOCATION );
}
{
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( view.GetCurrentSize(), Vector3( 200.0f, 200.0f, 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( view.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3( 200.0f, 200.0f, 0.0f ), TEST_LOCATION );
}
END_TEST;
Flex::SizeTuple MeasureChild( Actor child, float width, int measureModeWidth, float height, int measureModeHeight)
{
Flex::SizeTuple childSize = ITEM_SIZE;
- if (child.GetName() == "callbackTest")
+ if (child.GetProperty< std::string >( Dali::Actor::Property::NAME ) == "callbackTest")
{
childSize = ITEM_SIZE_CALLBACK_TEST;
}
// Create two actors and add them to the parent flex node
Actor actor1 = Actor::New();
Actor actor2 = Actor::New();
- actor1.SetName("Actor1");
- actor2.SetName("Actor2");
+ actor1.SetProperty( Dali::Actor::Property::NAME,"Actor1");
+ actor2.SetProperty( Dali::Actor::Property::NAME,"Actor2");
DALI_TEST_CHECK( actor1 );
DALI_TEST_CHECK( actor2 );
// Create two actors and add them to the parent flex node
Actor actor1 = Actor::New();
Actor actor2 = Actor::New();
- actor1.SetName("Actor1");
- actor2.SetName("Actor2");
+ actor1.SetProperty( Dali::Actor::Property::NAME,"Actor1");
+ actor2.SetProperty( Dali::Actor::Property::NAME,"Actor2");
DALI_TEST_CHECK( actor1 );
DALI_TEST_CHECK( actor2 );
Actor actor1 = Actor::New();
Actor actor2 = Actor::New();
- actor1.SetName("callbackTest");
+ actor1.SetProperty( Dali::Actor::Property::NAME,"callbackTest");
DALI_TEST_CHECK( actor1 );
DALI_TEST_CHECK( actor2 );
DALI_TEST_CHECK( !actor.OnStage() );
- view.SetParentOrigin(ParentOrigin::CENTER);
+ view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
view.SetSize(Stage::GetCurrent().GetSize());
view.Add(actor);
Stage::GetCurrent().Add(view);
RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
DALI_TEST_CHECK( 1u == taskList.GetTaskCount() );
- view.SetParentOrigin(ParentOrigin::CENTER);
+ view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
view.SetSize(Stage::GetCurrent().GetSize());
view.Add(Actor::New());
Stage::GetCurrent().Add(view);
Toolkit::GaussianBlurView view = Toolkit::GaussianBlurView::New(5, 1.5f, Pixel::RGB888, 0.5f, 0.5f, true);
DALI_TEST_CHECK( view );
- view.SetParentOrigin(ParentOrigin::CENTER);
+ view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
view.SetSize(Stage::GetCurrent().GetSize());
view.Add(Actor::New());
Stage::GetCurrent().Add(view);
RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
DALI_TEST_CHECK( 1u == taskList.GetTaskCount() );
- view.SetParentOrigin(ParentOrigin::CENTER);
+ view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
view.SetSize(Stage::GetCurrent().GetSize());
view.Add(Actor::New());
Stage::GetCurrent().Add(view);
Toolkit::GaussianBlurView view = Toolkit::GaussianBlurView::New(5, 1.5f, Pixel::RGB888, 0.5f, 0.5f, true);
DALI_TEST_CHECK( view );
- view.SetParentOrigin(ParentOrigin::CENTER);
+ view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
view.SetSize(Stage::GetCurrent().GetSize());
view.Add(Actor::New());
Stage::GetCurrent().Add(view);
// By default, Aysnc loading is used
Stage::GetCurrent().Add( imageView );
imageView.SetSize(100, 100);
- imageView.SetParentOrigin( ParentOrigin::CENTER );
+ imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( imageView.GetCurrentSize().width, (float)width, TEST_LOCATION );
- DALI_TEST_EQUALS( imageView.GetCurrentSize().height, (float)height, TEST_LOCATION );
+ DALI_TEST_EQUALS( imageView.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, (float)width, TEST_LOCATION );
+ DALI_TEST_EQUALS( imageView.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).height, (float)height, TEST_LOCATION );
END_TEST;
}
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( imageView.GetCurrentSize().width, (float)width, TEST_LOCATION );
- DALI_TEST_EQUALS( imageView.GetCurrentSize().height, (float)height, TEST_LOCATION );
+ DALI_TEST_EQUALS( imageView.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, (float)width, TEST_LOCATION );
+ DALI_TEST_EQUALS( imageView.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).height, (float)height, TEST_LOCATION );
END_TEST;
}
imagePropertyMap[ ImageVisual::Property::DESIRED_WIDTH ] = 128;
imagePropertyMap[ ImageVisual::Property::DESIRED_HEIGHT ] = 128;
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE , imagePropertyMap );
- imageView.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- imageView.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ imageView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
imageView.SetProperty( Control::Property::PADDING, Extents( 15, 10, 5, 10 ) );
Stage::GetCurrent().Add( imageView );
imagePropertyMap[ ImageVisual::Property::DESIRED_HEIGHT ] = 128;
imagePropertyMap[ DevelVisual::Property::VISUAL_FITTING_MODE ] = Toolkit::DevelVisual::FIT_KEEP_ASPECT_RATIO;
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE , imagePropertyMap );
- imageView.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- imageView.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ imageView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
imageView.SetProperty( Control::Property::PADDING, Extents( 15, 10, 5, 10 ) );
Stage::GetCurrent().Add( imageView );
imagePropertyMap[ ImageVisual::Property::DESIRED_HEIGHT ] = 128;
imagePropertyMap[ DevelVisual::Property::VISUAL_FITTING_MODE ] = Toolkit::DevelVisual::FIT_KEEP_ASPECT_RATIO;
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE , imagePropertyMap );
- imageView.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- imageView.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ imageView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
imageView.SetProperty( Control::Property::PADDING, Extents( 15, 10, 5, 10 ) );
Stage::GetCurrent().Add( imageView );
imagePropertyMap[ ImageVisual::Property::DESIRED_HEIGHT ] = 128;
imagePropertyMap[ DevelVisual::Property::VISUAL_FITTING_MODE ] = Toolkit::DevelVisual::FILL;
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE , imagePropertyMap );
- imageView.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- imageView.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ imageView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
imageView.SetProperty( Control::Property::PADDING, Extents( 15, 10, 5, 10 ) );
Stage::GetCurrent().Add( imageView );
.Add( Toolkit::Visual::Transform::Property::OFFSET, Vector2( 8, 8 ) ) );
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE , imagePropertyMap );
- imageView.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- imageView.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ imageView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
Stage::GetCurrent().Add( imageView );
application.SendNotification();
imageView.SetImage("https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/check.svg");
// Victor. Temporary (or permanent?) update as the url above seems not to work from time to time ...
imageView.SetImage("https://upload.wikimedia.org/wikipedia/commons/thumb/0/02/SVG_logo.svg/64px-SVG_logo.svg.png");
- imageView.SetParentOrigin( ParentOrigin::TOP_LEFT );
- imageView.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ imageView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
imageView.SetSize(300, 300);
imageView.SetPosition( Vector3( 150.0f , 150.0f , 0.0f ) );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
actor.SetSize(2000, 2000);
- actor.SetParentOrigin(ParentOrigin::CENTER);
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
Stage::GetCurrent().Add( actor );
// loading started
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
actor.SetSize(2000, 2000);
- actor.SetParentOrigin(ParentOrigin::CENTER);
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
Stage::GetCurrent().Add( actor );
// loading started
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetSize(2000, 2000);
- actor.SetParentOrigin(ParentOrigin::CENTER);
- actor.SetColor(Color::BLACK);
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
+ actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
Stage::GetCurrent().Add(actor);
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION);
application.Render(2000u); // Halfway point between blue and white
- DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION );
DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector4>( "uColor", Vector4( 1.0f, 1.0f, 1.0f, 0.5f ) ), true, TEST_LOCATION );
DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector3>( "mixColor", Vector3( TARGET_MIX_COLOR ) ), true, TEST_LOCATION );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetSize(2000, 2000);
- actor.SetParentOrigin(ParentOrigin::CENTER);
- actor.SetColor(Color::BLACK);
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
+ actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
Stage::GetCurrent().Add(actor);
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION);
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetSize(2000, 2000);
- actor.SetParentOrigin(ParentOrigin::CENTER);
- actor.SetColor(Color::BLACK);
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
+ actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
tet_infoline( "Test that the opacity doesn't animate when actor not staged" );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetSize(2000, 2000);
- actor.SetParentOrigin(ParentOrigin::CENTER);
- actor.SetColor(Color::BLACK);
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
+ actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
Stage::GetCurrent().Add(actor);
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION);
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummy.SetSize( 200.f, 200.f );
- dummy.SetParentOrigin( ParentOrigin::CENTER );
+ dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage::GetCurrent().Add( dummy );
application.SendNotification();
Impl::DummyControl& dummyImpl1 = static_cast< Impl::DummyControl& >( dummy1.GetImplementation() );
dummyImpl1.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual1 );
dummy1.SetSize( 200, 200 );
- dummy1.SetParentOrigin( ParentOrigin::CENTER );
+ dummy1.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage::GetCurrent().Add( dummy1 );
TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
Vector3 vec(480.0f, 800.0f, 0.0f);
ItemLayoutPtr layout = DefaultItemLayout::New( DefaultItemLayout::DEPTH );
- view.SetName("view actor");
+ view.SetProperty( Dali::Actor::Property::NAME,"view actor");
view.AddLayout(*layout);
view.SetSize(vec);
{
Actor child = view.GetChildAt( i );
Actor newActor = Actor::New();
- newActor.SetName("Inserted");
+ newActor.SetProperty( Dali::Actor::Property::NAME,"Inserted");
insertList.push_back( Item( view.GetItemId(child), newActor ) );
}
{
Actor child = view.GetChildAt( i );
- if( child.GetName() == "Inserted" )
+ if( child.GetProperty< std::string >( Dali::Actor::Property::NAME ) == "Inserted" )
{
removeList.push_back( view.GetItemId(child) );
}
{
Actor child = view.GetItem( i );
Actor newActor = Actor::New();
- newActor.SetName("Replaced");
+ newActor.SetProperty( Dali::Actor::Property::NAME,"Replaced");
replaceList.push_back( Item( i, newActor ) );
}
view.ReplaceItems( replaceList, 0.5f );
}
- DALI_TEST_CHECK(view.GetItem(0).GetName() == "Replaced");
- DALI_TEST_CHECK(view.GetItem(8).GetName() == "Replaced");
+ DALI_TEST_CHECK(view.GetItem(0).GetProperty< std::string >( Dali::Actor::Property::NAME ) == "Replaced");
+ DALI_TEST_CHECK(view.GetItem(8).GetProperty< std::string >( Dali::Actor::Property::NAME ) == "Replaced");
END_TEST;
}
view.SetItemsAnchorPoint(anchorPoint);
DALI_TEST_CHECK(view.GetItemsAnchorPoint() == anchorPoint);
- DALI_TEST_CHECK(view.GetItem(0).GetCurrentAnchorPoint() == anchorPoint);
+ DALI_TEST_CHECK(view.GetItem(0).GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ) == anchorPoint);
END_TEST;
}
view.SetItemsParentOrigin(parentOrigin);
DALI_TEST_CHECK(view.GetItemsParentOrigin() == parentOrigin);
- DALI_TEST_CHECK(view.GetItem(0).GetCurrentParentOrigin() == parentOrigin);
+ DALI_TEST_CHECK(view.GetItem(0).GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ) == parentOrigin);
END_TEST;
}
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( view.GetCurrentSize(), size, TEST_LOCATION );
+ DALI_TEST_EQUALS( view.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), size, TEST_LOCATION );
END_TEST;
}
DALI_TEST_CHECK( !actor.OnStage() );
- view.SetParentOrigin(ParentOrigin::CENTER);
+ view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
view.SetSize(Stage::GetCurrent().GetSize());
view.Add(actor);
Stage::GetCurrent().Add(view);
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( view.GetCurrentSize(), size, TEST_LOCATION );
+ DALI_TEST_EQUALS( view.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), size, TEST_LOCATION );
END_TEST;
}
// 2 Push initial Actor
Actor testParentActor1 = Actor::New();
- testParentActor1.SetName("TestParentActor1");
+ testParentActor1.SetProperty( Dali::Actor::Property::NAME,"TestParentActor1");
naviView.Push( testParentActor1 );
DALI_TEST_EQUALS( naviView.GetChildCount(), 1 , TEST_LOCATION );
// 3 Push Second Actor which contains a child actor
Actor testParentActor2 = Actor::New();
- testParentActor2.SetName("TestParentActor2");
+ testParentActor2.SetProperty( Dali::Actor::Property::NAME,"TestParentActor2");
Actor testChildActor1 = Actor::New();
testParentActor2.Add( testChildActor1 );
naviView.Push( testParentActor2 );
// 4 Pop head actor, it should be TestParentActor2
Actor poppedActor = naviView.Pop();
- DALI_TEST_EQUALS( poppedActor.GetName() , "TestParentActor2", TEST_LOCATION );
+ DALI_TEST_EQUALS( poppedActor.GetProperty< std::string >( Dali::Actor::Property::NAME ) , "TestParentActor2", TEST_LOCATION );
// 5 Navigation View child count should be 1
DALI_TEST_EQUALS( naviView.GetChildCount(), 1 , TEST_LOCATION );
// 2 Push initial Actor
Actor testParentActor1 = Actor::New();
- testParentActor1.SetName("TestParentActor1");
+ testParentActor1.SetProperty( Dali::Actor::Property::NAME,"TestParentActor1");
naviView.Push( testParentActor1 );
DALI_TEST_EQUALS( naviView.GetChildCount(), 1 , TEST_LOCATION );
// 3 Push Second Actor which contains a child actor
Actor testParentActor2 = Actor::New();
- testParentActor2.SetName("TestParentActor2");
+ testParentActor2.SetProperty( Dali::Actor::Property::NAME,"TestParentActor2");
Actor testChildActor1 = Actor::New();
testParentActor2.Add( testChildActor1 );
naviView.Push( testParentActor2 );
// 3 Push third Actor which contains a child actor
Actor testParentActor3 = Actor::New();
- testParentActor3.SetName("TestParentActor3");
+ testParentActor3.SetProperty( Dali::Actor::Property::NAME,"TestParentActor3");
Actor testChildActor2 = Actor::New();
testParentActor2.Add( testChildActor2 );
naviView.Push( testParentActor3 );
// 4 Pop head actor, it should be TestParentActor3
Actor poppedActor = naviView.Pop();
- DALI_TEST_EQUALS( poppedActor.GetName() , "TestParentActor3", TEST_LOCATION );
+ DALI_TEST_EQUALS( poppedActor.GetProperty< std::string >( Dali::Actor::Property::NAME ) , "TestParentActor3", TEST_LOCATION );
// 5 Pop head actor, it should be TestParentActor2
Actor poppedActor2 = naviView.Pop();
- DALI_TEST_EQUALS( poppedActor2.GetName() , "TestParentActor2", TEST_LOCATION );
+ DALI_TEST_EQUALS( poppedActor2.GetProperty< std::string >( Dali::Actor::Property::NAME ) , "TestParentActor2", TEST_LOCATION );
END_TEST;
// 2 Push initial Actor
Actor testParentActor1 = Actor::New();
- testParentActor1.SetName("TestParentActor1");
+ testParentActor1.SetProperty( Dali::Actor::Property::NAME,"TestParentActor1");
naviView.Push( testParentActor1 );
DALI_TEST_EQUALS( naviView.GetChildCount(), 1 , TEST_LOCATION );
// 3 Push Second Actor which contains a child actor
Actor testParentActor2 = Actor::New();
- testParentActor2.SetName("TestParentActor2");
+ testParentActor2.SetProperty( Dali::Actor::Property::NAME,"TestParentActor2");
Actor testChildActor1 = Actor::New();
testParentActor2.Add( testChildActor1 );
naviView.Push( testParentActor2 );
// 4 Pop head actor, it should be TestParentActor2
Actor poppedActor1 = naviView.Pop();
- DALI_TEST_EQUALS( poppedActor1.GetName() , "TestParentActor2", TEST_LOCATION );
+ DALI_TEST_EQUALS( poppedActor1.GetProperty< std::string >( Dali::Actor::Property::NAME ) , "TestParentActor2", TEST_LOCATION );
// 5 Try to Pop head actor, Should be empty hence can not get name of Actor
try
{
- const std::string hasNoName = poppedActorEmpty.GetName();
+ const std::string hasNoName = poppedActorEmpty.GetProperty< std::string >( Dali::Actor::Property::NAME );
tet_infoline( hasNoName.c_str() );
DALI_TEST_CHECK( false ); // should not get here
}
TestPageFactory factory;
Vector2 size = Stage::GetCurrent().GetSize();
PageTurnView portraitView = PageTurnPortraitView::New( factory, size );
- portraitView.SetParentOrigin( ParentOrigin::CENTER );
+ portraitView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage::GetCurrent().Add( portraitView );
// Render and notify
TestPageFactory factory;
Vector2 stageSize = Stage::GetCurrent().GetSize();
PageTurnView landscapeView = PageTurnLandscapeView::New( factory, Vector2(stageSize.x*0.5f, stageSize.x*0.8f) );
- landscapeView.SetParentOrigin( ParentOrigin::CENTER );
+ landscapeView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage::GetCurrent().Add( landscapeView );
// Render and notify
try
{
PageTurnView portraitView = PageTurnPortraitView::New( factory, size );
- portraitView.SetParentOrigin( ParentOrigin::CENTER );
+ portraitView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage::GetCurrent().Add( portraitView );
tet_result(TET_FAIL);
#include <dali.h>
#include <dali/integration-api/events/key-event-integ.h>
#include <dali/integration-api/events/touch-event-integ.h>
+#include <dali/devel-api/actors/actor-devel.h>
#include <dali/devel-api/scripting/scripting.h>
#include <dali-toolkit/dali-toolkit.h>
#include <dali-toolkit/devel-api/controls/popup/popup.h>
// Create the Popup actor
Popup popup = Popup::New();
- popup.SetParentOrigin( ParentOrigin::CENTER );
- popup.SetAnchorPoint( ParentOrigin::CENTER );
+ popup.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ popup.SetProperty( Actor::Property::ANCHOR_POINT, ParentOrigin::CENTER );
popup.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
popup.SetSize( 50.0f, 50.0f );
popup.SetProperty( Popup::Property::ANIMATION_DURATION, 0.0f );
// Placement actor to parent the popup from so the popup's contextual position can be relative to it.
Actor placement = Actor::New();
- placement.SetParentOrigin( ParentOrigin::CENTER );
- placement.SetAnchorPoint( AnchorPoint::CENTER );
+ placement.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ placement.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
placement.SetSize( 1.0f, 1.0f );
placement.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
Stage::GetCurrent().Add( placement );
application.Render();
// Check the position of the label within the popup.
- DALI_TEST_EQUALS( contentLabel.GetCurrentWorldPosition().GetVectorXY(), offsetValues[i], TEST_LOCATION );
+ DALI_TEST_EQUALS( contentLabel.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ).GetVectorXY(), offsetValues[i], TEST_LOCATION );
popup.SetDisplayState( Popup::HIDDEN );
application.SendNotification();
Actor backing = popup.FindChildByName( "popupBacking" );
DALI_TEST_CHECK( backing );
- DALI_TEST_EQUALS( backing.GetCurrentOpacity(), 1.0f, Math::MACHINE_EPSILON_0, TEST_LOCATION );
+ DALI_TEST_EQUALS( backing.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, Math::MACHINE_EPSILON_0, TEST_LOCATION );
// Check enabled property.
popup.SetDisplayState( Popup::SHOWN );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( backing.GetCurrentOpacity(), 0.5f, Math::MACHINE_EPSILON_0, TEST_LOCATION );
+ DALI_TEST_EQUALS( backing.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.5f, Math::MACHINE_EPSILON_0, TEST_LOCATION );
popup.SetDisplayState( Popup::HIDDEN );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( backing.GetCurrentOpacity(), 0.0f, Math::MACHINE_EPSILON_0, TEST_LOCATION );
+ DALI_TEST_EQUALS( backing.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, Math::MACHINE_EPSILON_0, TEST_LOCATION );
popup.SetProperty( Popup::Property::BACKING_ENABLED, false );
bool propertyResult;
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( backing.GetCurrentOpacity(), 0.0f, Math::MACHINE_EPSILON_0, TEST_LOCATION );
+ DALI_TEST_EQUALS( backing.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, Math::MACHINE_EPSILON_0, TEST_LOCATION );
popup.SetDisplayState( Popup::HIDDEN );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( backing.GetCurrentOpacity(), 0.0f, Math::MACHINE_EPSILON_0, TEST_LOCATION );
+ DALI_TEST_EQUALS( backing.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, Math::MACHINE_EPSILON_0, TEST_LOCATION );
// Check color property.
popup.SetProperty( Popup::Property::BACKING_ENABLED, true );
}
// Test the popup has animated to it's entry-transition destination.
- DALI_TEST_EQUALS( popupContainer.GetCurrentWorldPosition(), entryAnimationDestination, 0.1f, TEST_LOCATION );
+ DALI_TEST_EQUALS( popupContainer.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), entryAnimationDestination, 0.1f, TEST_LOCATION );
popup.SetDisplayState( Popup::HIDDEN );
application.Render( RENDER_FRAME_INTERVAL );
}
- DALI_TEST_EQUALS( popupContainer.GetCurrentWorldPosition(), exitAnimationDestination, 0.1f, TEST_LOCATION );
+ DALI_TEST_EQUALS( popupContainer.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), exitAnimationDestination, 0.1f, TEST_LOCATION );
END_TEST;
}
TextLabel content = TextLabel::New( "text" );
popup.SetContent( content );
popup.SetProperty( Popup::Property::ANIMATION_DURATION, 0.0f );
- popup.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- popup.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ popup.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ popup.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
popup.SetSize( 100, 100 );
popup.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
// Create a button (to go underneath the popup).
PushButton button = Toolkit::PushButton::New();
- button.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- button.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ button.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
button.SetSize( 100, 100 );
button.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
// Create the Popup actor
Popup popup = Popup::New();
- popup.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- popup.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ popup.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ popup.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
popup.SetSize( 100, 100 );
popup.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
TextLabel content = TextLabel::New( "text" );
tailActor = popup.FindChildByName( "tailImage" );
DALI_TEST_CHECK( tailActor );
- float baseValX = tailActor.GetCurrentWorldPosition().x;
+ float baseValX = tailActor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ).x;
- DALI_TEST_GREATER( baseValX, tailActor.GetCurrentWorldPosition().y, TEST_LOCATION );
+ DALI_TEST_GREATER( baseValX, tailActor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ).y, TEST_LOCATION );
popup.SetDisplayState( Popup::HIDDEN );
application.SendNotification();
tailActor = popup.FindChildByName( "tailImage" );
DALI_TEST_CHECK( tailActor );
- float baseValY = tailActor.GetCurrentWorldPosition().y;
- DALI_TEST_GREATER( baseValX, tailActor.GetCurrentWorldPosition().x, TEST_LOCATION );
+ float baseValY = tailActor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ).y;
+ DALI_TEST_GREATER( baseValX, tailActor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ).x, TEST_LOCATION );
popup.SetDisplayState( Popup::HIDDEN );
application.SendNotification();
application.Render();
tailActor = popup.FindChildByName( "tailImage" );
DALI_TEST_CHECK( tailActor );
- DALI_TEST_EQUALS( tailActor.GetCurrentWorldPosition().x, baseValX, TEST_LOCATION );
- DALI_TEST_GREATER( tailActor.GetCurrentWorldPosition().y, baseValY, TEST_LOCATION );
+ DALI_TEST_EQUALS( tailActor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ).x, baseValX, TEST_LOCATION );
+ DALI_TEST_GREATER( tailActor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ).y, baseValY, TEST_LOCATION );
popup.SetDisplayState( Popup::HIDDEN );
application.SendNotification();
application.Render();
tailActor = popup.FindChildByName( "tailImage" );
DALI_TEST_CHECK( tailActor );
- DALI_TEST_GREATER( tailActor.GetCurrentWorldPosition().x, baseValX, TEST_LOCATION );
- DALI_TEST_EQUALS( tailActor.GetCurrentWorldPosition().y, baseValY, TEST_LOCATION );
+ DALI_TEST_GREATER( tailActor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ).x, baseValX, TEST_LOCATION );
+ DALI_TEST_EQUALS( tailActor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ).y, baseValY, TEST_LOCATION );
popup.SetDisplayState( Popup::HIDDEN );
application.SendNotification();
#include <dali-toolkit-test-suite-utils.h>
#include <dali-toolkit/dali-toolkit.h>
+#include <dali/devel-api/actors/actor-devel.h>
using namespace Dali;
using namespace Dali::Toolkit;
// Create the ProgressBar actor
ProgressBar progressBar = ProgressBar::New();
Stage::GetCurrent().Add( progressBar );
- progressBar.SetParentOrigin(ParentOrigin::TOP_LEFT);
- progressBar.SetAnchorPoint(ParentOrigin::TOP_LEFT);
+ progressBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ progressBar.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
progressBar.SetSize( Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) );
progressBar.SetPosition( 0.0f, 0.0f );
progressBar.ValueChangedSignal().Connect( &OnProgressBarValueChanged );
tet_infoline( "UtcDaliProgressBarSetPropertyP" );
ProgressBar progressBar = ProgressBar::New();
- progressBar.SetParentOrigin(ParentOrigin::TOP_LEFT);
- progressBar.SetAnchorPoint(ParentOrigin::TOP_LEFT);
+ progressBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ progressBar.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
progressBar.SetSize( Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) );
progressBar.SetPosition( 0.0f, 0.0f );
progressBar.ValueChangedSignal().Connect( &OnProgressBarValueChanged );
tet_infoline( "UtcDaliProgressBarSetPropertyP1" );
ProgressBar progressBar = ProgressBar::New();
- progressBar.SetParentOrigin(ParentOrigin::TOP_LEFT);
- progressBar.SetAnchorPoint(ParentOrigin::TOP_LEFT);
+ progressBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ progressBar.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
progressBar.SetSize( Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) );
progressBar.SetPosition( 0.0f, 0.0f );
progressBar.ValueChangedSignal().Connect( &OnProgressBarValueChanged );
tet_infoline( "UtcDaliProgressBarSetPropertyP2" );
ProgressBar progressBar = ProgressBar::New();
- progressBar.SetParentOrigin(ParentOrigin::TOP_LEFT);
- progressBar.SetAnchorPoint(ParentOrigin::TOP_LEFT);
+ progressBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ progressBar.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
progressBar.SetPosition( 0.0f, 0.0f );
progressBar.SetProperty(ProgressBar::Property::LABEL_VISUAL, "test");
progressBar.SetProperty(ProgressBar::Property::INDETERMINATE, true);
// Set up the position of the button for the default test events
void SetupButtonForTestTouchEvents( ToolkitTestApplication& application, Button& button, bool useDefaultImages )
{
- button.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- button.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ button.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
button.SetPosition( BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS );
if ( useDefaultImages )
{
tet_infoline(" UtcDaliPushButtonPressed");
PushButton pushButton = PushButton::New();
- pushButton.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- pushButton.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ pushButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ pushButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
pushButton.SetPosition( BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS );
pushButton.SetSize( BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS );
tet_infoline(" UtcDaliPushButtonReleased");
PushButton pushButton = PushButton::New();
- pushButton.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- pushButton.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ pushButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ pushButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
pushButton.SetPosition( BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS );
pushButton.SetSize( BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS );
tet_infoline(" UtcDaliPushButtonSelected");
PushButton pushButton = PushButton::New();
- pushButton.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- pushButton.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ pushButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ pushButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
pushButton.SetPosition( BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS );
pushButton.SetSize( BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS );
ImageDimensions testImageSize = Dali::GetClosestImageSize( TEST_IMAGE_ONE );
const Vector2 TEST_IMAGE_SIZE( testImageSize.GetWidth(), testImageSize.GetHeight() );
- pushButton.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- pushButton.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ pushButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ pushButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
pushButton.SetPosition( 0.0f, 0.0f );
pushButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
pushButton.Unparent();
pushButton = PushButton::New();
- pushButton.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- pushButton.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ pushButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ pushButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
pushButton.SetPosition( 0.0f, 0.0f );
pushButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
PushButton pushButton = PushButton::New();
- pushButton.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- pushButton.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ pushButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ pushButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
pushButton.SetPosition( 0.0f, 0.0f );
pushButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
PushButton pushButton = PushButton::New();
- pushButton.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- pushButton.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ pushButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ pushButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
pushButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
Stage::GetCurrent().Add( pushButton );
// Create the RadioButton actor
RadioButton radioButton = RadioButton::New();
Stage::GetCurrent().Add( radioButton );
- radioButton.SetParentOrigin(ParentOrigin::TOP_LEFT);
- radioButton.SetAnchorPoint(ParentOrigin::TOP_LEFT);
+ radioButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ radioButton.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
radioButton.SetPosition( 0.0f, 0.0f );
// Default selected
// Test selecting radio buttons
RadioButton radioButton2 = RadioButton::New( "label" );
- radioButton2.SetParentOrigin(ParentOrigin::TOP_LEFT);
- radioButton2.SetAnchorPoint(ParentOrigin::TOP_LEFT);
+ radioButton2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ radioButton2.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
radioButton2.SetPosition( 0.0f, 0.0f );
RadioButton radioButton3 = RadioButton::New( "label" );
- radioButton3.SetParentOrigin(ParentOrigin::TOP_LEFT);
- radioButton3.SetAnchorPoint(ParentOrigin::TOP_LEFT);
+ radioButton3.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ radioButton3.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
radioButton3.SetPosition( 0.0f, 40.0f );
Actor radioGroup = Actor::New();
Stage::GetCurrent().Add( radioGroup );
- radioGroup.SetParentOrigin(ParentOrigin::TOP_LEFT);
- radioGroup.SetAnchorPoint(ParentOrigin::TOP_LEFT);
+ radioGroup.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ radioGroup.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
radioGroup.SetPosition( 0.0f, 0.0f );
radioGroup.SetSize( 400.0f, 400.0 );
#include <string>
#include <dali-toolkit-test-suite-utils.h>
#include <dali-toolkit/dali-toolkit.h>
+#include <dali/devel-api/actors/actor-devel.h>
using namespace Dali;
using namespace Toolkit;
// Check that the indicator size should be: scroll bar size * (scroll bar size / content size).
// i.e. The bigger the content size, the smaller the indicator size
- float indicatorHeight = indicator.GetCurrentSize().y;
+ float indicatorHeight = indicator.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).y;
DALI_TEST_EQUALS( indicatorHeight, scrollBarHeight * scrollBarHeight / 500.0f, TEST_LOCATION );
// Decrease the content length
application.Render();
// Check that the indicator size is changed accordingly
- indicatorHeight = indicator.GetCurrentSize().y;
+ indicatorHeight = indicator.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).y;
DALI_TEST_EQUALS( indicatorHeight, scrollBarHeight * scrollBarHeight / 250.0f, TEST_LOCATION );
// As scroll position is 0, check that the indicator position should be 0.0f.
- float indicatorPosition = indicator.GetCurrentPosition().y;
+ float indicatorPosition = indicator.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).y;
DALI_TEST_EQUALS( indicatorPosition, 0.0f, TEST_LOCATION );
// Set the scroll position to the middle
application.Render();
// Check that the indicator should be in the middle of the scroll bar
- indicatorPosition = indicator.GetCurrentPosition().y;
+ indicatorPosition = indicator.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).y;
DALI_TEST_EQUALS( indicatorPosition, (scrollBarHeight - indicatorHeight) * 0.5f, TEST_LOCATION );
// Set the scroll position to the maximum
application.Render();
// Check that the indicator should be in the end of the scroll bar
- indicatorPosition = indicator.GetCurrentPosition().y;
+ indicatorPosition = indicator.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).y;
DALI_TEST_EQUALS( indicatorPosition, scrollBarHeight - indicatorHeight, TEST_LOCATION );
// Increase the maximum scroll position to double
application.Render();
// Check that the indicator should be now in the middle of the scroll bar
- indicatorPosition = indicator.GetCurrentPosition().y;
+ indicatorPosition = indicator.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).y;
DALI_TEST_EQUALS( indicatorPosition, (scrollBarHeight - indicatorHeight) * 0.5f, TEST_LOCATION );
// Create another source actor
application.Render();
// Check that the indicator size is changed accordingly
- indicatorHeight = indicator.GetCurrentSize().y;
+ indicatorHeight = indicator.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).y;
DALI_TEST_EQUALS( indicatorHeight, scrollBarHeight * scrollBarHeight / 400.0f, TEST_LOCATION );
// Check that the indicator position goes back to the beginning of the scroll bar
- indicatorPosition = indicator.GetCurrentPosition().y;
+ indicatorPosition = indicator.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).y;
DALI_TEST_EQUALS( indicatorPosition, 0.0f, TEST_LOCATION );
// Set the scroll position to one fifth of the maximum
application.Render();
// Check that the indicator should be in one fifth from the beginning of the scroll bar
- indicatorPosition = indicator.GetCurrentPosition().y;
+ indicatorPosition = indicator.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).y;
DALI_TEST_EQUALS( indicatorPosition, (scrollBarHeight - indicatorHeight) * 0.2f, TEST_LOCATION );
END_TEST;
ScrollBar scrollBar = ScrollBar::New(ScrollBar::Vertical);
DALI_TEST_CHECK( scrollBar );
- scrollBar.SetParentOrigin(ParentOrigin::TOP_LEFT);
- scrollBar.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ scrollBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ scrollBar.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollBar.SetSize(20.0f, 800.0f, 0.0f);
Stage::GetCurrent().Add( scrollBar );
// Check that the indicator size should be: scroll bar size * (scroll bar size / content size).
// i.e. The bigger the content size, the smaller the indicator size
- float indicatorHeight = indicator.GetCurrentSize().y;
+ float indicatorHeight = indicator.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).y;
DALI_TEST_EQUALS( indicatorHeight, scrollBarHeight * scrollBarHeight / 500.0f, TEST_LOCATION );
// Set the indicator height to be fixed to 50.0f
application.Render();
// Check that the indicator size should be 50.0f
- indicatorHeight = indicator.GetCurrentSize().y;
+ indicatorHeight = indicator.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).y;
DALI_TEST_EQUALS( indicatorHeight, 50.0f, TEST_LOCATION );
// Set the indicator height to be variable
application.Render();
// Check that the indicator size should be: scroll bar size * (scroll bar size / content size).
- indicatorHeight = indicator.GetCurrentSize().y;
+ indicatorHeight = indicator.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).y;
DALI_TEST_EQUALS( indicatorHeight, scrollBarHeight * scrollBarHeight / 500.0f, TEST_LOCATION );
END_TEST;
application.Render();
// Check that the indicator size should be 50.0f
- DALI_TEST_EQUALS( indicator.GetCurrentSize().y, 50.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).y, 50.0f, TEST_LOCATION );
// Set the indicator height to be fixed to 25.0f
scrollBar.SetIndicatorFixedHeight(25.0f);
application.Render();
// Check that the indicator size should be 25.0f
- DALI_TEST_EQUALS( indicator.GetCurrentSize().y, 25.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).y, 25.0f, TEST_LOCATION );
END_TEST;
}
DALI_TEST_EQUALS( scrollBar.GetIndicatorShowDuration(), 0.35f, TEST_LOCATION );
// Make the indicator invisible
- indicator.SetOpacity(0.0f);
+ indicator.SetProperty( DevelActor::Property::OPACITY,0.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is invisible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
// Show the indicator
scrollBar.ShowIndicator();
application.Render();
// Check that the indicator is now visible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
// Set the duration to show the indicator to be 0.75 second
scrollBar.SetIndicatorShowDuration(0.75);
DALI_TEST_EQUALS( scrollBar.GetIndicatorShowDuration(), 0.75f, TEST_LOCATION );
// Make the indicator invisible
- indicator.SetOpacity(0.0f);
+ indicator.SetProperty( DevelActor::Property::OPACITY,0.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is invisible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
// Show the indicator
scrollBar.ShowIndicator();
application.Render();
// Check that the indicator is not fully visible yet
- DALI_TEST_CHECK( indicator.GetCurrentOpacity() != 1.0f );
+ DALI_TEST_CHECK( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ) != 1.0f );
// Wait for another 0.4 second
Wait(application, 400);
application.Render();
// Check that the indicator is now fully visible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
END_TEST;
}
DALI_TEST_CHECK( duration > 0.0f );
// Make the indicator invisible
- indicator.SetOpacity(0.0f);
+ indicator.SetProperty( DevelActor::Property::OPACITY,0.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is invisible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
// Show the indicator
scrollBar.ShowIndicator();
application.Render();
// Check that the indicator is now visible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
// Now set the duration to show the indicator to be a negative value (which should be ignored and therefore means instant)
scrollBar.SetIndicatorShowDuration(-0.25f);
DALI_TEST_EQUALS( scrollBar.GetIndicatorShowDuration(), -0.25f, TEST_LOCATION );
// Make the indicator invisible
- indicator.SetOpacity(0.0f);
+ indicator.SetProperty( DevelActor::Property::OPACITY,0.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is invisible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
// Show the indicator
scrollBar.ShowIndicator();
application.Render();
// Check that the indicator becomes instantly visible in the next frame
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
END_TEST;
}
DALI_TEST_EQUALS( scrollBar.GetIndicatorHideDuration(), 0.15f, TEST_LOCATION );
// Make the indicator visible
- indicator.SetOpacity(1.0f);
+ indicator.SetProperty( DevelActor::Property::OPACITY,1.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is visible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
// Hide the indicator
scrollBar.HideIndicator();
application.Render();
// Check that the indicator is now invisible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
// Set the duration to hide the indicator to be 0.65 second
scrollBar.SetIndicatorHideDuration(0.65f);
DALI_TEST_EQUALS( scrollBar.GetIndicatorHideDuration(), 0.65f, TEST_LOCATION );
// Make the indicator visible
- indicator.SetOpacity(1.0f);
+ indicator.SetProperty( DevelActor::Property::OPACITY,1.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is visible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
// Hide the indicator
scrollBar.HideIndicator();
application.Render();
// Check that the indicator is not fully invisible yet
- DALI_TEST_CHECK( indicator.GetCurrentOpacity() != 0.0f );
+ DALI_TEST_CHECK( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ) != 0.0f );
// Wait for another 0.5 second
Wait(application, 500);
application.Render();
// Check that the indicator is now fully invisible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
END_TEST;
}
DALI_TEST_CHECK( duration > 0.0f );
// Make the indicator visible
- indicator.SetOpacity(1.0f);
+ indicator.SetProperty( DevelActor::Property::OPACITY,1.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is visible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
// Hide the indicator
scrollBar.HideIndicator();
application.Render();
// Check that the indicator is now invisible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
// Now set the duration to hide the indicator to be a negative value (which should be ignored and therefore means instant)
scrollBar.SetIndicatorHideDuration(-0.25f);
DALI_TEST_EQUALS( scrollBar.GetIndicatorHideDuration(), -0.25f, TEST_LOCATION );
// Make the indicator visible
- indicator.SetOpacity(1.0f);
+ indicator.SetProperty( DevelActor::Property::OPACITY,1.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is visible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
// Hide the indicator
scrollBar.HideIndicator();
application.Render();
// Check that the indicator becomes instantly invisible in the next frame
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
END_TEST;
}
DALI_TEST_CHECK( duration > 0.0f );
// Make the indicator invisible
- indicator.SetOpacity(0.0f);
+ indicator.SetProperty( DevelActor::Property::OPACITY,0.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is invisible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
// Show the indicator
scrollBar.ShowIndicator();
application.Render();
// Check that the indicator is now visible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
END_TEST;
}
DALI_TEST_CHECK( indicator );
// Make the indicator initially visible
- indicator.SetOpacity(1.0f);
+ indicator.SetProperty( DevelActor::Property::OPACITY,1.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is initially visible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
// Get the default duration to show the indicator
float duration = scrollBar.GetIndicatorShowDuration();
application.Render();
// Check that the indicator is still visible in the very next frame
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
END_TEST;
}
DALI_TEST_CHECK( duration > 0.0f );
// Make the indicator visible
- indicator.SetOpacity(1.0f);
+ indicator.SetProperty( DevelActor::Property::OPACITY,1.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is visible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
// Hide the indicator
scrollBar.HideIndicator();
application.Render();
// Check that the indicator is now invisible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
END_TEST;
}
DALI_TEST_CHECK( indicator );
// Make the indicator initially invisible
- indicator.SetOpacity(0.0f);
+ indicator.SetProperty( DevelActor::Property::OPACITY,0.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is initially invisible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
// Get the default duration to hide the indicator
float duration = scrollBar.GetIndicatorHideDuration();
application.Render();
// Check that the indicator is still invisible in the very next frame
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
END_TEST;
}
DALI_TEST_CHECK( duration > 0.0f );
// Make the indicator invisible
- indicator.SetOpacity(0.0f);
+ indicator.SetProperty( DevelActor::Property::OPACITY,0.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is invisible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
// Do the "ShowIndicator" action
Property::Map emptyMap;
application.Render();
// Check that the indicator is now visible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
END_TEST;
}
DALI_TEST_CHECK( duration > 0.0f );
// Make the indicator visible
- indicator.SetOpacity(1.0f);
+ indicator.SetProperty( DevelActor::Property::OPACITY,1.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is visible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
// Do the "HideIndicator" action
Property::Map emptyMap;
application.Render();
// Check that the indicator is now invisible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
END_TEST;
}
DALI_TEST_CHECK( duration > 0.0f );
// Make the indicator invisible
- indicator.SetOpacity(0.0f);
+ indicator.SetProperty( DevelActor::Property::OPACITY,0.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is invisible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
// Do the "ShowIndicator" action
Property::Map emptyMap;
application.Render();
// Check that the indicator is now visible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
// Get the default duration to hide the indicator
float hideDuration = scrollBar.GetProperty<float>( ScrollBar::Property::INDICATOR_HIDE_DURATION );
application.Render();
// Check that the indicator is now invisible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
END_TEST;
}
DALI_TEST_CHECK( indicator );
// Make the indicator invisible
- indicator.SetOpacity(0.0f);
+ indicator.SetProperty( DevelActor::Property::OPACITY,0.0f);
// Don't use a show animation; the indicator should appear immediately
scrollBar.SetProperty( ScrollBar::Property::INDICATOR_SHOW_DURATION, 0.0f );
application.Render();
// Check that the indicator is now visible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
// Get the default duration to hide the indicator
float hideDuration = scrollBar.GetProperty<float>( ScrollBar::Property::INDICATOR_HIDE_DURATION );
application.Render();
// Check that the indicator is now invisible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
END_TEST;
}
DALI_TEST_CHECK( duration > 0.0f );
// Make the indicator visible
- indicator.SetOpacity(1.0f);
+ indicator.SetProperty( DevelActor::Property::OPACITY,1.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is visible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
// Hide the indicator
scrollBar.HideIndicator();
application.Render();
// Check that the indicator is now partially hidden
- DALI_TEST_CHECK( indicator.GetCurrentOpacity() < 1.0f );
+ DALI_TEST_CHECK( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ) < 1.0f );
// Now interrupt the Hide with a DoAction( "ShowTransientIndicator" )
application.Render();
// Check that the indicator is now visible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
// Get the default duration to hide the indicator
float hideDuration = scrollBar.GetProperty<float>( ScrollBar::Property::INDICATOR_HIDE_DURATION );
application.Render();
// Check that the indicator is now invisible
- DALI_TEST_EQUALS( indicator.GetCurrentOpacity(), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
END_TEST;
}
ScrollBar scrollBar = ScrollBar::New(ScrollBar::Vertical);
DALI_TEST_CHECK( scrollBar );
- scrollBar.SetParentOrigin(ParentOrigin::TOP_LEFT);
- scrollBar.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ scrollBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ scrollBar.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollBar.SetSize(20.0f, 800.0f, 0.0f);
// Set the indicator height to be fixed to 50.0f
ScrollBar scrollBar = ScrollBar::New(ScrollBar::Vertical);
DALI_TEST_CHECK( scrollBar );
- scrollBar.SetParentOrigin(ParentOrigin::TOP_LEFT);
- scrollBar.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ scrollBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ scrollBar.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollBar.SetSize(20.0f, 800.0f, 0.0f);
// Set the indicator height to be fixed to 50.0f
ScrollBar scrollBar = ScrollBar::New(ScrollBar::Vertical);
DALI_TEST_CHECK( scrollBar );
- scrollBar.SetParentOrigin(ParentOrigin::TOP_LEFT);
- scrollBar.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ scrollBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ scrollBar.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollBar.SetSize(20.0f, 800.0f, 0.0f);
Stage::GetCurrent().Add( scrollBar );
ScrollBar scrollBar = ScrollBar::New(ScrollBar::Vertical);
DALI_TEST_CHECK( scrollBar );
- scrollBar.SetParentOrigin(ParentOrigin::TOP_LEFT);
- scrollBar.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ scrollBar.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ scrollBar.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollBar.SetSize(20.0f, 800.0f, 0.0f);
Stage::GetCurrent().Add( scrollBar );
Vector2 viewPageSize( 720.0f, 1280.0f );
scrollView.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
scrollView.SetSize( viewPageSize );
- scrollView.SetParentOrigin( ParentOrigin::CENTER );
- scrollView.SetAnchorPoint( AnchorPoint::CENTER );
+ scrollView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ scrollView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
scrollView.SetPosition( 0.0f, 0.0f, 0.0f );
// Position rulers.
Vector2 viewPageSize( 720.0f, 1280.0f );
scrollView.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
scrollView.SetSize( viewPageSize );
- scrollView.SetParentOrigin( ParentOrigin::CENTER );
- scrollView.SetAnchorPoint( AnchorPoint::CENTER );
+ scrollView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ scrollView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
scrollView.SetPosition( 0.0f, 0.0f, 0.0f );
// Position rulers.
Vector2 viewPageSize( 720.0f, 1280.0f );
scrollView.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
scrollView.SetSize( viewPageSize );
- scrollView.SetParentOrigin( ParentOrigin::CENTER );
- scrollView.SetAnchorPoint( AnchorPoint::CENTER );
+ scrollView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ scrollView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
scrollView.SetPosition( 0.0f, 0.0f, 0.0f );
// Position rulers.
Vector2 viewPageSize( 720.0f, 1280.0f );
scrollView.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
scrollView.SetSize( viewPageSize );
- scrollView.SetParentOrigin( ParentOrigin::TOP_LEFT );
- scrollView.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ scrollView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ scrollView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
scrollView.SetPosition( 0.0f, 0.0f, 0.0f );
// Position rulers - expect Default rulers to be used which don't snap
Stage::GetCurrent().Add( scrollView );
Vector2 stageSize = Stage::GetCurrent().GetSize();
scrollView.SetSize(stageSize);
- scrollView.SetParentOrigin(ParentOrigin::TOP_LEFT);
- scrollView.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
// Position rulers.
RulerPtr rulerX = new DefaultRuler();
Actor image = Actor::New();
image.SetSize(stageSize);
- image.SetParentOrigin(ParentOrigin::TOP_LEFT);
- image.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ image.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ image.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollView.Add(image);
Wait(application);
Stage::GetCurrent().Add( scrollView );
Vector2 stageSize = Stage::GetCurrent().GetSize();
scrollView.SetSize(stageSize);
- scrollView.SetParentOrigin(ParentOrigin::TOP_LEFT);
- scrollView.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
// Position rulers.
RulerPtr rulerX = new DefaultRuler();
Actor image = Actor::New();
image.SetSize(stageSize);
- image.SetParentOrigin(ParentOrigin::TOP_LEFT);
- image.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ image.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ image.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollView.Add(image);
Wait(application);
Stage::GetCurrent().Add( scrollView );
Vector2 stageSize = Stage::GetCurrent().GetSize();
scrollView.SetSize(stageSize);
- scrollView.SetParentOrigin(ParentOrigin::TOP_LEFT);
- scrollView.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
// Position rulers.
RulerPtr rulerX = new DefaultRuler();
Stage::GetCurrent().Add( scrollView );
Vector2 stageSize = Stage::GetCurrent().GetSize();
scrollView.SetSize(stageSize);
- scrollView.SetParentOrigin(ParentOrigin::TOP_LEFT);
- scrollView.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
// Position rulers.
RulerPtr rulerX = new DefaultRuler();
Stage::GetCurrent().Add( scrollView );
Vector2 stageSize = Stage::GetCurrent().GetSize();
scrollView.SetSize(stageSize);
- scrollView.SetParentOrigin(ParentOrigin::TOP_LEFT);
- scrollView.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
// Position rulers.
RulerPtr rulerX = new DefaultRuler();
Stage::GetCurrent().Add( scrollView );
Vector2 stageSize = Stage::GetCurrent().GetSize();
scrollView.SetSize(stageSize);
- scrollView.SetParentOrigin(ParentOrigin::TOP_LEFT);
- scrollView.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
// Position rulers.
RulerPtr rulerX = new DefaultRuler();
Stage::GetCurrent().Add( scrollView );
Vector2 stageSize = Stage::GetCurrent().GetSize();
scrollView.SetSize(stageSize);
- scrollView.SetParentOrigin(ParentOrigin::TOP_LEFT);
- scrollView.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
// Position rulers.
RulerPtr rulerX = new DefaultRuler();
Stage::GetCurrent().Add( scrollView );
Vector2 stageSize = Stage::GetCurrent().GetSize();
scrollView.SetSize(stageSize);
- scrollView.SetParentOrigin(ParentOrigin::TOP_LEFT);
- scrollView.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
// Position rulers.
RulerPtr rulerX = new DefaultRuler();
Stage::GetCurrent().Add( scrollView );
Vector2 stageSize = Stage::GetCurrent().GetSize();
scrollView.SetSize(stageSize);
- scrollView.SetParentOrigin(ParentOrigin::TOP_LEFT);
- scrollView.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
// Position rulers.
RulerPtr rulerX = new DefaultRuler();
Stage::GetCurrent().Add( scrollView );
Vector2 stageSize = Stage::GetCurrent().GetSize();
scrollView.SetSize(stageSize);
- scrollView.SetParentOrigin(ParentOrigin::TOP_LEFT);
- scrollView.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Vector2 START_POSITION = Vector2(10.0f, 10.0f);
Stage::GetCurrent().Add( scrollView );
Vector2 stageSize = Stage::GetCurrent().GetSize();
scrollView.SetSize(stageSize);
- scrollView.SetParentOrigin(ParentOrigin::TOP_LEFT);
- scrollView.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Vector2 START_POSITION = Vector2(10.0f, 10.0f);
uint32_t time = 0;
Stage::GetCurrent().Add( scrollView );
Vector2 stageSize = Stage::GetCurrent().GetSize();
scrollView.SetSize(stageSize);
- scrollView.SetParentOrigin(ParentOrigin::TOP_LEFT);
- scrollView.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
// Position rulers.
RulerPtr rulerX = new DefaultRuler();
Stage::GetCurrent().Add( scrollView );
Vector2 stageSize = Stage::GetCurrent().GetSize();
scrollView.SetSize(stageSize);
- scrollView.SetParentOrigin(ParentOrigin::TOP_LEFT);
- scrollView.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
// Position rulers.
RulerPtr rulerX = new DefaultRuler();
Vector2 viewPageSize( 720.0f, 1280.0f );
scrollView.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
scrollView.SetSize( viewPageSize );
- scrollView.SetParentOrigin( ParentOrigin::CENTER );
- scrollView.SetAnchorPoint( AnchorPoint::CENTER );
+ scrollView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ scrollView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
scrollView.SetPosition( 0.0f, 0.0f, 0.0f );
// Position rulers.
ScrollView scrollView = ScrollView::New();
scrollView.SetSize(size);
- scrollView.SetAnchorPoint(AnchorPoint::CENTER);
- scrollView.SetParentOrigin(ParentOrigin::CENTER);
+ scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
+ scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
constraint = Constraint::New<Dali::Vector3>( scrollView, Dali::Actor::Property::SIZE, Dali::EqualToConstraint() );
constraint.AddSource( Dali::ParentSource( Dali::Actor::Property::SIZE ) );
Stage::GetCurrent().Add( scrollView );
Actor container = Actor::New();
- container.SetParentOrigin(ParentOrigin::CENTER);
- container.SetAnchorPoint(AnchorPoint::CENTER);
+ container.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
+ container.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
container.SetSize( size );
scrollView.Add( container );
constraint = Constraint::New<Vector3>( page, Actor::Property::SIZE, EqualToConstraint() );
constraint.AddSource( Dali::ParentSource( Dali::Actor::Property::SIZE ) );
constraint.Apply();
- page.SetParentOrigin( ParentOrigin::CENTER );
- page.SetAnchorPoint( AnchorPoint::CENTER );
+ page.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ page.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
page.SetPosition( column * size.x, row * size.y );
container.Add(page);
}
// test that the test page has reached centre of screen
- Vector3 pagePos = testPage.GetCurrentPosition();
+ Vector3 pagePos = testPage.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
DALI_TEST_EQUALS(pagePos, Vector3::ZERO, Math::MACHINE_EPSILON_0, TEST_LOCATION);
CleanupTest();
DALI_TEST_CHECK( !actor.OnStage() );
- view.SetParentOrigin(ParentOrigin::CENTER);
+ view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
view.SetSize(Stage::GetCurrent().GetSize());
view.Add(actor);
Stage::GetCurrent().Add(view);
RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
DALI_TEST_CHECK( 1u == taskList.GetTaskCount() );
- view.SetParentOrigin(ParentOrigin::CENTER);
+ view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
view.SetSize(Stage::GetCurrent().GetSize());
view.Add(Actor::New());
Stage::GetCurrent().Add(view);
// Create the Popup actor
Slider slider = Slider::New();
Stage::GetCurrent().Add( slider );
- slider.SetParentOrigin(ParentOrigin::TOP_LEFT);
- slider.SetAnchorPoint(ParentOrigin::TOP_LEFT);
+ slider.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ slider.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
slider.SetSize( Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) );
slider.SetPosition( 0.0f, 0.0f );
// Create the Popup actor
Slider slider = Slider::New();
Stage::GetCurrent().Add( slider );
- slider.SetParentOrigin(ParentOrigin::TOP_LEFT);
- slider.SetAnchorPoint(ParentOrigin::TOP_LEFT);
+ slider.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ slider.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
slider.SetSize( Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) );
slider.SetPosition( 0.0f, 0.0f );
tet_infoline( "UtcDaliSetPropertyP" );
Slider slider = Slider::New();
- slider.SetParentOrigin(ParentOrigin::TOP_LEFT);
- slider.SetAnchorPoint(ParentOrigin::TOP_LEFT);
+ slider.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ slider.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
slider.SetSize( Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) );
slider.SetPosition( 0.0f, 0.0f );
application.Render();
DALI_TEST_EQUALS( tableView.GetCellPadding(), Size(0.0f, 0.0f), TEST_LOCATION );
- DALI_TEST_EQUALS( actor1.GetCurrentPosition(), Vector3(0.0f, 0.0f, 0.0f), TEST_LOCATION );
- DALI_TEST_EQUALS( actor2.GetCurrentPosition(), Vector3(10.0f, 0.0f, 0.0f), TEST_LOCATION );
- DALI_TEST_EQUALS( actor3.GetCurrentPosition(), Vector3(0.0f, 10.0f, 0.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor1.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(0.0f, 0.0f, 0.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor2.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(10.0f, 0.0f, 0.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor3.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(0.0f, 10.0f, 0.0f), TEST_LOCATION );
// 1. check that padding works. some padding:
tableView.SetCellPadding(Size(5.0f, 10.0f));
application.Render();
DALI_TEST_EQUALS( tableView.GetCellPadding(), Size(5.0f, 10.0f), TEST_LOCATION );
- DALI_TEST_EQUALS( actor1.GetCurrentPosition(), Vector3(5.0f, 10.0f, 0.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor1.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(5.0f, 10.0f, 0.0f), TEST_LOCATION );
END_TEST;
}
application.Render();
// 1. check that with no fixed width/heights, actors are in default position.
- DALI_TEST_EQUALS( actor1.GetCurrentPosition(), Vector3(0.0f, 0.0f, 0.0f), TEST_LOCATION );
- DALI_TEST_EQUALS( actor2.GetCurrentPosition(), Vector3(10.0f, 0.0f, 0.0f), TEST_LOCATION );
- DALI_TEST_EQUALS( actor3.GetCurrentPosition(), Vector3(0.0f, 10.0f, 0.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor1.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(0.0f, 0.0f, 0.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor2.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(10.0f, 0.0f, 0.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor3.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(0.0f, 10.0f, 0.0f), TEST_LOCATION );
// 2. check that with a fixed width & height, actors to the right and below are offsetted.
tableView.SetFitHeight(0);
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor1.GetCurrentPosition(), Vector3(0.0f, 0.0f, 0.0f), TEST_LOCATION );
- DALI_TEST_EQUALS( actor2.GetCurrentPosition(), Vector3(10.0f, 0.0f, 0.0f), TEST_LOCATION );
- DALI_TEST_EQUALS( actor3.GetCurrentPosition(), Vector3(0.0f, 10.0f, 0.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor1.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(0.0f, 0.0f, 0.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor2.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(10.0f, 0.0f, 0.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor3.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(0.0f, 10.0f, 0.0f), TEST_LOCATION );
tableView.SetProperty( Dali::Actor::Property::LAYOUT_DIRECTION, Dali::LayoutDirection::RIGHT_TO_LEFT );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor1.GetCurrentPosition(), Vector3(90.0f, 0.0f, 0.0f), TEST_LOCATION );
- DALI_TEST_EQUALS( actor2.GetCurrentPosition(), Vector3(80.0f, 0.0f, 0.0f), TEST_LOCATION );
- DALI_TEST_EQUALS( actor3.GetCurrentPosition(), Vector3(90.0f, 10.0f, 0.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor1.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(90.0f, 0.0f, 0.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor2.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(80.0f, 0.0f, 0.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor3.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(90.0f, 10.0f, 0.0f), TEST_LOCATION );
tableView.SetProperty( Dali::Actor::Property::LAYOUT_DIRECTION, Dali::LayoutDirection::LEFT_TO_RIGHT );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor1.GetCurrentPosition(), Vector3(0.0f, 0.0f, 0.0f), TEST_LOCATION );
- DALI_TEST_EQUALS( actor2.GetCurrentPosition(), Vector3(10.0f, 0.0f, 0.0f), TEST_LOCATION );
- DALI_TEST_EQUALS( actor3.GetCurrentPosition(), Vector3(0.0f, 10.0f, 0.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor1.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(0.0f, 0.0f, 0.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor2.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(10.0f, 0.0f, 0.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor3.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(0.0f, 10.0f, 0.0f), TEST_LOCATION );
END_TEST;
}
application.Render();
// 1. check that with no fixed width/heights, actors are in default position.
- DALI_TEST_EQUALS( actor1.GetCurrentPosition(), Vector3(0.0f, 0.0f, 0.0f), TEST_LOCATION );
- DALI_TEST_EQUALS( actor2.GetCurrentPosition(), Vector3(10.0f, 0.0f, 0.0f), TEST_LOCATION );
- DALI_TEST_EQUALS( actor3.GetCurrentPosition(), Vector3(0.0f, 10.0f, 0.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor1.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(0.0f, 0.0f, 0.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor2.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(10.0f, 0.0f, 0.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor3.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(0.0f, 10.0f, 0.0f), TEST_LOCATION );
// 2. check that with a fixed width & height, actors to the right and below are offsetted.
tableView.SetFixedWidth(0, 20.0f);
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor1.GetCurrentPosition(), Vector3(0.0f, 0.0f, 0.0f), TEST_LOCATION );
- DALI_TEST_EQUALS( actor2.GetCurrentPosition(), Vector3(20.0f, 0.0f, 0.0f), TEST_LOCATION );
- DALI_TEST_EQUALS( actor3.GetCurrentPosition(), Vector3(0.0f, 50.0f, 0.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor1.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(0.0f, 0.0f, 0.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor2.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(20.0f, 0.0f, 0.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor3.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(0.0f, 50.0f, 0.0f), TEST_LOCATION );
END_TEST;
}
application.Render();
// 1. check that with no relative width/heights, actors are in default position.
- DALI_TEST_EQUALS( actor1.GetCurrentPosition(), Vector3(0.0f, 0.0f, 0.0f), TEST_LOCATION );
- DALI_TEST_EQUALS( actor2.GetCurrentPosition(), Vector3(10.0f, 0.0f, 0.0f), TEST_LOCATION );
- DALI_TEST_EQUALS( actor3.GetCurrentPosition(), Vector3(0.0f, 10.0f, 0.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor1.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(0.0f, 0.0f, 0.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor2.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(10.0f, 0.0f, 0.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor3.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(0.0f, 10.0f, 0.0f), TEST_LOCATION );
// 2. check that with a relative width & height, actors to the right and below are offsetted.
tableView.SetRelativeWidth(0, 0.3f); // cell 0,0 occupies 30%x50% of the grid (i.e. 30x50 pixels)
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor1.GetCurrentPosition(), Vector3(0.0f, 0.0f, 0.0f), TEST_LOCATION );
- DALI_TEST_EQUALS( actor2.GetCurrentPosition(), Vector3(30.0f, 0.0f, 0.0f), TEST_LOCATION );
- DALI_TEST_EQUALS( actor3.GetCurrentPosition(), Vector3(0.0f, 50.0f, 0.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor1.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(0.0f, 0.0f, 0.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor2.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(30.0f, 0.0f, 0.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor3.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(0.0f, 50.0f, 0.0f), TEST_LOCATION );
END_TEST;
}
Actor actor1 = Actor::New();
Actor actor2 = Actor::New();
Actor actor3 = Actor::New();
- actor1.SetName("Actor1");
- actor2.SetName("Actor2");
- actor3.SetName("Actor3");
+ actor1.SetProperty( Dali::Actor::Property::NAME,"Actor1");
+ actor2.SetProperty( Dali::Actor::Property::NAME,"Actor2");
+ actor3.SetProperty( Dali::Actor::Property::NAME,"Actor3");
// note: positions are specified in reversed cartesian coords - row,col (i.e. y,x)
tableView.AddChild(actor1, TableView::CellPosition(0,0));
std::vector<Actor> actorsRemoved;
tableView.DeleteRow(0, actorsRemoved);
tet_printf("Row Delete >> Actors Removed: %d {", actorsRemoved.size());
- for(size_t i = 0;i<actorsRemoved.size();i++) tet_printf("%d => %s, ", i, actorsRemoved[i].GetName().c_str());
+ for(size_t i = 0;i<actorsRemoved.size();i++) tet_printf("%d => %s, ", i, actorsRemoved[i].GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str());
tet_printf("}\n");
DALI_TEST_EQUALS( static_cast<int>(actorsRemoved.size()), 1, TEST_LOCATION );
DALI_TEST_CHECK( actorsRemoved[0] == actor1 );
actorsRemoved.clear();
tableView.DeleteColumn(3, actorsRemoved);
tet_printf("Column Delete >> Actors Removed: %d {", actorsRemoved.size());
- for(size_t i = 0;i<actorsRemoved.size();i++) tet_printf("%d => %s, ", i, actorsRemoved[i].GetName().c_str());
+ for(size_t i = 0;i<actorsRemoved.size();i++) tet_printf("%d => %s, ", i, actorsRemoved[i].GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str());
tet_printf("}\n");
DALI_TEST_EQUALS( static_cast<int>(actorsRemoved.size()), 1, TEST_LOCATION );
DALI_TEST_CHECK( actorsRemoved[0] == actor3 );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( child3.GetCurrentAnchorPoint(), AnchorPoint::TOP_LEFT, TEST_LOCATION );
- DALI_TEST_EQUALS( child3.GetCurrentParentOrigin(), ParentOrigin::TOP_LEFT, TEST_LOCATION );
- DALI_TEST_EQUALS( child3.GetCurrentPosition(), Vector3(2.5f, 5.0f, 0.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( child3.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), AnchorPoint::TOP_LEFT, TEST_LOCATION );
+ DALI_TEST_EQUALS( child3.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::TOP_LEFT, TEST_LOCATION );
+ DALI_TEST_EQUALS( child3.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(2.5f, 5.0f, 0.0f), TEST_LOCATION );
END_TEST;
}
TableView tableView = TableView::New(4,4);
tableView.SetKeyboardFocusable( true );
- tableView.SetName( "TableView");
+ tableView.SetProperty( Dali::Actor::Property::NAME, "TableView");
for ( int row = 0; row < 4; ++row )
{
Control control = Control::New();
std::ostringstream str;
str << row << "-" << col;
- control.SetName( str.str() );
+ control.SetProperty( Dali::Actor::Property::NAME, str.str() );
control.SetKeyboardFocusable( true );
tableView.AddChild( control, TableView::CellPosition( row, col ) );
}
Actor firstFocusActor = Toolkit::Internal::GetImplementation( tableView ).GetNextKeyboardFocusableActor( Actor(), Control::KeyboardFocus::RIGHT, true );
DALI_TEST_CHECK( firstFocusActor );
- DALI_TEST_CHECK( firstFocusActor.GetName() == "0-0" );
+ DALI_TEST_CHECK( firstFocusActor.GetProperty< std::string >( Dali::Actor::Property::NAME ) == "0-0" );
KeyboardFocusManager manager = KeyboardFocusManager::Get();
manager.SetFocusGroupLoop( true );
manager.SetCurrentFocusActor( firstFocusActor );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "0-0" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "0-0" );
manager.MoveFocus( Control::KeyboardFocus::RIGHT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "0-1" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "0-1" );
manager.MoveFocus( Control::KeyboardFocus::RIGHT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "0-2" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "0-2" );
manager.MoveFocus( Control::KeyboardFocus::RIGHT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "0-3" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "0-3" );
manager.MoveFocus( Control::KeyboardFocus::RIGHT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "1-0" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "1-0" );
manager.MoveFocus( Control::KeyboardFocus::LEFT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "0-3" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "0-3" );
manager.MoveFocus( Control::KeyboardFocus::LEFT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "0-2" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "0-2" );
manager.MoveFocus( Control::KeyboardFocus::LEFT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "0-1" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "0-1" );
manager.MoveFocus( Control::KeyboardFocus::LEFT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "0-0" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "0-0" );
manager.MoveFocus( Control::KeyboardFocus::LEFT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "3-3" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "3-3" );
manager.MoveFocus( Control::KeyboardFocus::RIGHT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "0-0" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "0-0" );
manager.MoveFocus( Control::KeyboardFocus::RIGHT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "0-1" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "0-1" );
manager.MoveFocus( Control::KeyboardFocus::DOWN );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "1-1" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "1-1" );
manager.MoveFocus( Control::KeyboardFocus::DOWN );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "2-1" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "2-1" );
manager.MoveFocus( Control::KeyboardFocus::DOWN );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "3-1" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "3-1" );
manager.MoveFocus( Control::KeyboardFocus::DOWN );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "0-1" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "0-1" );
manager.MoveFocus( Control::KeyboardFocus::UP );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "3-1" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "3-1" );
manager.MoveFocus( Control::KeyboardFocus::UP );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "2-1" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "2-1" );
manager.MoveFocus( Control::KeyboardFocus::UP );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "1-1" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "1-1" );
manager.MoveFocus( Control::KeyboardFocus::UP );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "0-1" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "0-1" );
END_TEST;
}
TableView tableView = TableView::New(3, 3);
tableView.SetKeyboardFocusable( true );
- tableView.SetName( "TableView");
+ tableView.SetProperty( Dali::Actor::Property::NAME, "TableView");
for ( int row = 0; row < 3; ++row )
{
{
// Add a nested 2x2 table view in the middle cell of the parent table view
TableView childTableView = TableView::New(2, 2);
- childTableView.SetName( str.str() );
+ childTableView.SetProperty( Dali::Actor::Property::NAME, str.str() );
for(int childRow = 0; childRow < 2; childRow++)
{
Control control = Control::New();
std::ostringstream nameStr;
nameStr << row << "-" << col << "-" << childRow << "-" << childCol;
- control.SetName( nameStr.str() );
+ control.SetProperty( Dali::Actor::Property::NAME, nameStr.str() );
control.SetKeyboardFocusable( true );
childTableView.AddChild( control, TableView::CellPosition( childRow, childCol ) );
}
else
{
Control control = Control::New();
- control.SetName( str.str() );
+ control.SetProperty( Dali::Actor::Property::NAME, str.str() );
control.SetKeyboardFocusable( true );
tableView.AddChild( control, TableView::CellPosition( row, col ) );
}
Actor firstFocusActor = Toolkit::Internal::GetImplementation( tableView ).GetNextKeyboardFocusableActor( Actor(), Control::KeyboardFocus::RIGHT, true );
DALI_TEST_CHECK( firstFocusActor );
- DALI_TEST_CHECK( firstFocusActor.GetName() == "0-0" );
+ DALI_TEST_CHECK( firstFocusActor.GetProperty< std::string >( Dali::Actor::Property::NAME ) == "0-0" );
KeyboardFocusManager manager = KeyboardFocusManager::Get();
manager.SetFocusGroupLoop( false );
manager.SetCurrentFocusActor( firstFocusActor );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "0-0" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "0-0" );
manager.MoveFocus( Control::KeyboardFocus::RIGHT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "0-1" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "0-1" );
manager.MoveFocus( Control::KeyboardFocus::RIGHT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "0-2" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "0-2" );
manager.MoveFocus( Control::KeyboardFocus::RIGHT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "1-0" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "1-0" );
manager.MoveFocus( Control::KeyboardFocus::RIGHT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "1-1-0-0" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "1-1-0-0" );
manager.MoveFocus( Control::KeyboardFocus::RIGHT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "1-1-0-1" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "1-1-0-1" );
manager.MoveFocus( Control::KeyboardFocus::RIGHT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "1-1-1-0" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "1-1-1-0" );
manager.MoveFocus( Control::KeyboardFocus::RIGHT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "1-1-1-1" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "1-1-1-1" );
manager.MoveFocus( Control::KeyboardFocus::RIGHT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "1-2" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "1-2" );
manager.MoveFocus( Control::KeyboardFocus::RIGHT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "2-0" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "2-0" );
manager.MoveFocus( Control::KeyboardFocus::RIGHT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "2-1" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "2-1" );
manager.MoveFocus( Control::KeyboardFocus::RIGHT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "2-2" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "2-2" );
manager.MoveFocus( Control::KeyboardFocus::LEFT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "2-1" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "2-1" );
manager.MoveFocus( Control::KeyboardFocus::LEFT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "2-0" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "2-0" );
manager.MoveFocus( Control::KeyboardFocus::LEFT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "1-2" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "1-2" );
manager.MoveFocus( Control::KeyboardFocus::LEFT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "1-1-1-1" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "1-1-1-1" );
manager.MoveFocus( Control::KeyboardFocus::LEFT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "1-1-1-0" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "1-1-1-0" );
manager.MoveFocus( Control::KeyboardFocus::LEFT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "1-1-0-1" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "1-1-0-1" );
manager.MoveFocus( Control::KeyboardFocus::LEFT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "1-1-0-0" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "1-1-0-0" );
manager.MoveFocus( Control::KeyboardFocus::LEFT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "1-0" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "1-0" );
manager.MoveFocus( Control::KeyboardFocus::LEFT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "0-2" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "0-2" );
manager.MoveFocus( Control::KeyboardFocus::LEFT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "0-1" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "0-1" );
manager.MoveFocus( Control::KeyboardFocus::LEFT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "0-0" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "0-0" );
manager.MoveFocus( Control::KeyboardFocus::RIGHT );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "0-1" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "0-1" );
manager.MoveFocus( Control::KeyboardFocus::DOWN );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "1-1-0-0" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "1-1-0-0" );
manager.MoveFocus( Control::KeyboardFocus::DOWN );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "1-1-1-0" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "1-1-1-0" );
manager.MoveFocus( Control::KeyboardFocus::DOWN );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "2-1" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "2-1" );
manager.MoveFocus( Control::KeyboardFocus::UP );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "1-1-1-1" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "1-1-1-1" );
manager.MoveFocus( Control::KeyboardFocus::UP );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "1-1-0-1" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "1-1-0-1" );
manager.MoveFocus( Control::KeyboardFocus::UP );
- DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetName() == "0-1" );
+ DALI_TEST_CHECK( manager.GetCurrentFocusActor().GetProperty< std::string >( Dali::Actor::Property::NAME ) == "0-1" );
END_TEST;
}
editor.SetSize( 300.f, 50.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
editor.SetProperty( TextEditor::Property::ENABLE_MARKUP, true );
editor.SetProperty( TextEditor::Property::TEXT, "<font family='DejaVuSerif' size='18'>He<color value='green'>llo</color> <font weight='bold'>world</font> demo</font>" );
editor.SetSize( 300.f, 50.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
editor.SetProperty( TextEditor::Property::ENABLE_MARKUP, true );
editor.SetProperty( TextEditor::Property::TEXT, "<font family='DejaVuSerif' size='18'>He<color value='blue'> l</color><color value='green'>lo</color> <font weight='bold'>world</font> demo</font>" );
Stage::GetCurrent().Add( editor );
editor.SetSize( 300.f, 50.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
// Create a second text editor and send key events to it.
TextEditor editor2 = TextEditor::New();
- editor2.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor2.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor2.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor2.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
editor2.SetSize( 100.f, 100.f );
editor2.SetPosition( 100.f, 100.f );
Stage::GetCurrent().Add( editor );
editor.SetSize( 300.f, 50.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
}
// Move the cursor and check the position changes.
- Vector3 position1 = cursor.GetCurrentPosition();
+ Vector3 position1 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
application.SendNotification();
application.Render();
- Vector3 position2 = cursor.GetCurrentPosition();
+ Vector3 position2 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
DALI_TEST_CHECK( position2.x < position1.x );
application.SendNotification();
application.Render();
- Vector3 position3 = cursor.GetCurrentPosition();
+ Vector3 position3 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
DALI_TEST_EQUALS( position1, position3, TEST_LOCATION ); // Should be in the same position1.
application.Render();
// Cursor position should be the same than position1.
- Vector3 position4 = cursor.GetCurrentPosition();
+ Vector3 position4 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
DALI_TEST_EQUALS( position2, position4, TEST_LOCATION ); // Should be in the same position2.
application.SendNotification();
application.Render();
- Vector3 position5 = cursor.GetCurrentPosition();
+ Vector3 position5 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
DALI_TEST_CHECK( position5.x > position4.x );
application.Render();
// Cursor position should be the same than position2.
- Vector3 position6 = cursor.GetCurrentPosition();
+ Vector3 position6 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
DALI_TEST_EQUALS( position2, position6, TEST_LOCATION );// Should be in the same position2.
editor.SetProperty( TextEditor::Property::TEXT, "This is a long text for the size of the text-editor." );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
editor.SetSize( 30.f, 50.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
editor.SetProperty( TextEditor::Property::TEXT, "Hello\nworl" );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
editor.SetSize( 100.f, 50.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
editor.SetProperty( TextEditor::Property::TEXT, "Hello\nworl" );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
editor.SetSize( 50.f, 50.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
editor.SetProperty( TextEditor::Property::SMOOTH_SCROLL, true );
editor.SetProperty( TextEditor::Property::SMOOTH_SCROLL_DURATION, 0.2f );
editor.SetProperty( TextEditor::Property::ENABLE_SCROLL_BAR, true );
editor.SetProperty( TextEditor::Property::TEXT, "Hello\nworld\nHello world" );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
editor.SetSize( 100.f, 50.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
editor.SetProperty( TextEditor::Property::TEXT, "Hello\nworld\nHello world" );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
editor.SetSize( 100.f, 50.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
editor.SetProperty( TextEditor::Property::TEXT, "DALi" );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
editor.SetSize( 100.f, 50.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
editor.SetProperty( TextEditor::Property::SELECTION_HANDLE_PRESSED_IMAGE_RIGHT, imagePropertyMap );
editor.SetSize( 30.f, 500.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
editor.SetSize( 50.f, 50.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
editor.SetProperty( TextEditor::Property::ENABLE_SCROLL_BAR, true );
editor.SetKeyboardFocusable(true);
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
editor.SetSize( 300.f, 50.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( editor );
application.SendNotification();
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
editor.SetSize( 300.f, 50.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( editor );
application.SendNotification();
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
editor.SetSize( 300.f, 50.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( editor );
application.SendNotification();
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
editor.SetSize( 300.f, 50.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( editor );
application.SendNotification();
field.SetSize( 300.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
field.SetProperty( TextField::Property::ENABLE_MARKUP, true );
field.SetProperty( TextField::Property::TEXT, "<font family='DejaVuSerif' size='18'>He<color value='green'>llo</color> <font weight='bold'>world</font> demo</font>" );
DALI_TEST_CHECK( field );
field.SetSize( 300.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
field.SetProperty( TextField::Property::ENABLE_MARKUP, true );
field.SetProperty( TextField::Property::TEXT, "<font family='DejaVuSerif' size='18'>He<color value='blue'> l</color><color value='green'>lo</color> <font weight='bold'>world</font> demo</font>" );
Stage::GetCurrent().Add( field );
field.SetSize( 300.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Render and notify
application.SendNotification();
// Create a second text field and send key events to it.
TextField field2 = TextField::New();
- field2.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field2.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field2.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field2.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
field2.SetSize( 100.f, 100.0f );
field2.SetPosition( 100.0f, 100.0f );
Stage::GetCurrent().Add( field );
field.SetSize( 300.0f, 50.0f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
}
// Move the cursor and check the position changes.
- Vector3 position1 = cursor.GetCurrentPosition();
+ Vector3 position1 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
application.Render();
- Vector3 position2 = cursor.GetCurrentPosition();
+ Vector3 position2 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
DALI_TEST_CHECK( position2.x < position1.x );
application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
application.SendNotification();
application.Render();
- Vector3 position3 = cursor.GetCurrentPosition();
+ Vector3 position3 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
DALI_TEST_EQUALS( position1, position3, TEST_LOCATION ); // Should be in the same position1.
application.SendNotification();
application.Render();
- Vector3 position4 = cursor.GetCurrentPosition();
+ Vector3 position4 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
// Send some taps and check the cursor positions.
application.Render();
// Cursor position should be the same than position1.
- Vector3 position5 = cursor.GetCurrentPosition();
+ Vector3 position5 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
DALI_TEST_EQUALS( position4, position5, TEST_LOCATION ); // Should be in the same position2.
application.SendNotification();
application.Render();
- Vector3 position6 = cursor.GetCurrentPosition();
+ Vector3 position6 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
DALI_TEST_CHECK( position6.x > position5.x );
application.Render();
// Cursor position should be the same than position2.
- Vector3 position7 = cursor.GetCurrentPosition();
+ Vector3 position7 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
DALI_TEST_EQUALS( position4, position7, TEST_LOCATION );// Should be in the same position2.
field.SetProperty( TextField::Property::TEXT, "This is a long text for the size of the text-field." );
field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
field.SetSize( 30.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
field.SetProperty( TextField::Property::TEXT, "This is a long text for the size of the text-field." );
field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
field.SetSize( 300.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
field.SetProperty( TextField::Property::TEXT, "This is a long text for the size of the text-field." );
field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
field.SetSize( 300.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
field.SetProperty( TextField::Property::TEXT, "Thisisalongtextforthesizeofthetextfield." );
field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
field.SetSize( 300.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
field.SetProperty( TextField::Property::TEXT, "Thisisalongtextforthesizeofthetextfield." );
field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
field.SetSize( 300.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Property::Map propertyMap;
propertyMap["PANEL_LAYOUT"] = InputMethod::PanelLayout::PASSWORD;
field.SetProperty( TextField::Property::INPUT_METHOD_SETTINGS, propertyMap );
field.SetProperty( TextField::Property::PLACEHOLDER_TEXT, "Setting Placeholder Text" );
field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
field.SetSize( 300.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
if (actor)
{
- Vector3 worldPosition = actor.GetCurrentWorldPosition();
+ Vector3 worldPosition = actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION );
Vector2 halfStageSize = stage.GetSize() / 2.0f;
Vector2 position(worldPosition.x + halfStageSize.width, worldPosition.y + halfStageSize.height);
field.SetProperty( TextField::Property::TEXT, "Hello" );
field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
field.SetSize( 300.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
field.SetProperty( TextField::Property::TEXT, "This is a long text for the size of the text-field." );
field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
field.SetSize( 300.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
Stage::GetCurrent().Add( field );
field.SetSize( 300.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
field.SetProperty( TextField::Property::TEXT, longText );
field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
field.SetSize( 300.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
field.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY , Dimension::HEIGHT );
field.SetProperty( TextField::Property::TEXT, "ኢ");
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
field.SetKeyboardFocusable(true);
KeyboardFocusManager::Get().SetCurrentFocusActor( field );
field.SetProperty( TextField::Property::TEXT, "Text" );
field.SetSize( 300.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( field );
try
TextField field = TextField::New();
DALI_TEST_CHECK( field );
field.SetSize( 300.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( field );
application.SendNotification();
TextField field = TextField::New();
DALI_TEST_CHECK( field );
field.SetSize( 300.0f, 50.0f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( field );
application.SendNotification();
TextField field = TextField::New();
DALI_TEST_CHECK( field );
field.SetSize( 300.0f, 50.0f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( field );
application.SendNotification();
TextField field = TextField::New();
DALI_TEST_CHECK( field );
field.SetSize( 300.0f, 50.0f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( field );
application.SendNotification();
Stage::GetCurrent().Add( field );
field.SetSize( 300.0f, 50.0f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
Stage::GetCurrent().Add( textField );
textField.SetSize( 300.f, 50.f );
- textField.SetParentOrigin( ParentOrigin::TOP_LEFT );
- textField.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ textField.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ textField.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
Stage::GetCurrent().Add( textField );
textField.SetSize( 300.f, 50.f );
- textField.SetParentOrigin( ParentOrigin::TOP_LEFT );
- textField.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ textField.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ textField.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
Stage::GetCurrent().Add( label );
// Turn on all the effects
- label.SetAnchorPoint( AnchorPoint::CENTER );
- label.SetParentOrigin( ParentOrigin::CENTER );
+ label.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ label.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
label.SetSize( 360.0f, 10.f );
try
application.Render();
// The text has been rendered if the height of the text-label is the height of the line.
- DALI_TEST_EQUALS( label.GetCurrentSize().height, 34.f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
+ DALI_TEST_EQUALS( label.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).height, 34.f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
END_TEST;
}
const int maxTextureSize = Dali::GetMaxTextureSize();
// Whether the rendered text is greater than maxTextureSize
- DALI_TEST_CHECK( label.GetCurrentSize().height > maxTextureSize );
+ DALI_TEST_CHECK( label.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).height > maxTextureSize );
// Check if the number of renderers is greater than 1.
DALI_TEST_CHECK( label.GetRendererCount() > 1u );
toolbar.SetProperty( Toolkit::TextSelectionToolbar::Property::MAX_SIZE, Size( 100.0f, 60.0f) );
Toolkit::PushButton option = Toolkit::PushButton::New();
- option.SetName( "test-option" );
+ option.SetProperty( Dali::Actor::Property::NAME, "test-option" );
option.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
toolbar.AddOption( option );
toolbar.AddDivider( divider );
Toolkit::PushButton option2 = Toolkit::PushButton::New();
- option2.SetName( "test-option-2" );
+ option2.SetProperty( Dali::Actor::Property::NAME, "test-option-2" );
option2.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
toolbar.AddOption( option2 );
toolbar.SetProperty( Toolkit::TextSelectionToolbar::Property::MAX_SIZE, Size( 100.0f, 60.0f) );
Toolkit::PushButton option = Toolkit::PushButton::New();
- option.SetName( "test-option" );
+ option.SetProperty( Dali::Actor::Property::NAME, "test-option" );
option.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
toolbar.AddOption( option );
}
// The order should be COPY, CUT, PASTE
- DALI_TEST_EQUALS( COPY, tableOfButtons.GetChildAt( 0 ).GetName(), TEST_LOCATION );
- DALI_TEST_EQUALS( CUT, tableOfButtons.GetChildAt( 2 ).GetName(), TEST_LOCATION );
- DALI_TEST_EQUALS( PASTE, tableOfButtons.GetChildAt( 4 ).GetName(), TEST_LOCATION );
+ DALI_TEST_EQUALS( COPY, tableOfButtons.GetChildAt( 0 ).GetProperty< std::string >( Dali::Actor::Property::NAME ), TEST_LOCATION );
+ DALI_TEST_EQUALS( CUT, tableOfButtons.GetChildAt( 2 ).GetProperty< std::string >( Dali::Actor::Property::NAME ), TEST_LOCATION );
+ DALI_TEST_EQUALS( PASTE, tableOfButtons.GetChildAt( 4 ).GetProperty< std::string >( Dali::Actor::Property::NAME ), TEST_LOCATION );
tet_result(TET_PASS);
END_TEST;
}
// The order should be PASTE, CUT, COPY
- DALI_TEST_EQUALS( PASTE, tableOfButtons.GetChildAt( 0 ).GetName(), TEST_LOCATION );
- DALI_TEST_EQUALS( CUT, tableOfButtons.GetChildAt( 2 ).GetName(), TEST_LOCATION );
- DALI_TEST_EQUALS( COPY, tableOfButtons.GetChildAt( 4 ).GetName(), TEST_LOCATION );
+ DALI_TEST_EQUALS( PASTE, tableOfButtons.GetChildAt( 0 ).GetProperty< std::string >( Dali::Actor::Property::NAME ), TEST_LOCATION );
+ DALI_TEST_EQUALS( CUT, tableOfButtons.GetChildAt( 2 ).GetProperty< std::string >( Dali::Actor::Property::NAME ), TEST_LOCATION );
+ DALI_TEST_EQUALS( COPY, tableOfButtons.GetChildAt( 4 ).GetProperty< std::string >( Dali::Actor::Property::NAME ), TEST_LOCATION );
tet_result(TET_PASS);
END_TEST;
// Create the ToggleButton actor
ToggleButton toggleButton = ToggleButton::New();
Stage::GetCurrent().Add( toggleButton );
- toggleButton.SetParentOrigin(ParentOrigin::TOP_LEFT);
- toggleButton.SetAnchorPoint(ParentOrigin::TOP_LEFT);
+ toggleButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ toggleButton.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
toggleButton.SetPosition( 0.0f, 0.0f );
{// Check empty array
// Create the ToggleButton actor
ToggleButton toggleButton = ToggleButton::New();
Stage::GetCurrent().Add( toggleButton );
- toggleButton.SetParentOrigin(ParentOrigin::TOP_LEFT);
- toggleButton.SetAnchorPoint(ParentOrigin::TOP_LEFT);
+ toggleButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ toggleButton.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
toggleButton.SetPosition( 0.0f, 0.0f );
{ // Check empty tip array
// Create the ToggleButton actor
ToggleButton toggleButton = ToggleButton::New();
Stage::GetCurrent().Add( toggleButton );
- toggleButton.SetParentOrigin(ParentOrigin::TOP_LEFT);
- toggleButton.SetAnchorPoint(ParentOrigin::TOP_LEFT);
+ toggleButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ toggleButton.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
toggleButton.SetPosition( BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS );
toggleButton.SetSize( BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS );
Control control = Control::New();
control.SetProperty( DevelControl::Property::TOOLTIP, "Test" );
- control.SetAnchorPoint( AnchorPoint::CENTER );
- control.SetParentOrigin( ParentOrigin::CENTER );
+ control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
control.SetSize( 100.0f, 100.0f );
Actor rootActor = Stage::GetCurrent().GetRootLayer();
ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
Control control = Control::New();
- control.SetAnchorPoint( AnchorPoint::CENTER );
- control.SetParentOrigin( ParentOrigin::CENTER );
+ control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
control.SetSize( 100.0f, 100.0f );
control.SetProperty( DevelControl::Property::TOOLTIP,
Property::Map().Add( Tooltip::Property::CONTENT, "Test" )
ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
Control control = Control::New();
- control.SetAnchorPoint( AnchorPoint::CENTER );
- control.SetParentOrigin( ParentOrigin::CENTER );
+ control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
control.SetSize( 100.0f, 100.0f );
control.SetProperty( DevelControl::Property::TOOLTIP,
Property::Map().Add( Tooltip::Property::CONTENT,
ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
Control control = Control::New();
- control.SetAnchorPoint( AnchorPoint::CENTER );
- control.SetParentOrigin( ParentOrigin::CENTER );
+ control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
control.SetSize( 100.0f, 100.0f );
control.SetProperty( DevelControl::Property::TOOLTIP,
Property::Map().Add( Tooltip::Property::CONTENT, "Test" )
Actor tooltip = rootActor.GetChildAt( rootActor.GetChildCount() - 1 ); // Last actor added will be our tooltip
tet_infoline( "Ensure tooltip is below control" );
- DALI_TEST_CHECK( ( control.GetCurrentWorldPosition().y + 50.0f /* Half Size */) < tooltip.GetCurrentWorldPosition().y );
+ DALI_TEST_CHECK( ( control.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ).y + 50.0f /* Half Size */) < tooltip.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ).y );
END_TEST;
}
ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
Control control = Control::New();
- control.SetAnchorPoint( AnchorPoint::CENTER );
- control.SetParentOrigin( ParentOrigin::CENTER );
+ control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
control.SetSize( 100.0f, 100.0f );
control.SetProperty( DevelControl::Property::TOOLTIP,
Property::Map().Add( Tooltip::Property::CONTENT, "Test" )
Actor tooltip = rootActor.GetChildAt( rootActor.GetChildCount() - 1 ); // Last actor added will be our tooltip
tet_infoline( "Ensure tooltip is above control" );
- DALI_TEST_CHECK( ( control.GetCurrentWorldPosition().y - 50.0f /* Half Size */) >= ( tooltip.GetCurrentWorldPosition().y + 0.5f * tooltip.GetCurrentSize().height ) );
+ DALI_TEST_CHECK( ( control.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ).y - 50.0f /* Half Size */) >= ( tooltip.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ).y + 0.5f * tooltip.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).height ) );
END_TEST;
}
ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
Control control = Control::New();
- control.SetAnchorPoint( AnchorPoint::CENTER );
- control.SetParentOrigin( ParentOrigin::CENTER );
+ control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
control.SetSize( 100.0f, 100.0f );
control.SetProperty( DevelControl::Property::TOOLTIP,
Property::Map().Add( Tooltip::Property::CONTENT, "Test" )
Actor tooltip = rootActor.GetChildAt( rootActor.GetChildCount() - 1 ); // Last actor added will be our tooltip
tet_infoline( "Ensure tooltip is below and to the right of control" );
- DALI_TEST_CHECK( ( hoverPoint.y - stageSize.height * 0.5f ) < tooltip.GetCurrentWorldPosition().y );
- DALI_TEST_CHECK( ( hoverPoint.x - stageSize.width * 0.5f ) < tooltip.GetCurrentWorldPosition().x );
+ DALI_TEST_CHECK( ( hoverPoint.y - stageSize.height * 0.5f ) < tooltip.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ).y );
+ DALI_TEST_CHECK( ( hoverPoint.x - stageSize.width * 0.5f ) < tooltip.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ).x );
END_TEST;
}
ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
Control control = Control::New();
- control.SetAnchorPoint( AnchorPoint::CENTER );
- control.SetParentOrigin( ParentOrigin::CENTER );
+ control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
control.SetSize( 100.0f, 100.0f );
control.SetProperty( DevelControl::Property::TOOLTIP,
Property::Map().Add( Tooltip::Property::CONTENT, "Test" )
ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
Control control = Control::New();
- control.SetAnchorPoint( AnchorPoint::CENTER );
- control.SetParentOrigin( ParentOrigin::CENTER );
+ control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
control.SetSize( 100.0f, 100.0f );
control.SetProperty( DevelControl::Property::TOOLTIP, "Test" );
Control control = Control::New();
control.SetProperty( DevelControl::Property::TOOLTIP, "Test" );
- control.SetAnchorPoint( AnchorPoint::CENTER );
- control.SetParentOrigin( ParentOrigin::CENTER );
+ control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
control.SetSize( 100.0f, 100.0f );
Actor rootActor = Stage::GetCurrent().GetRootLayer();
ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
Control control = Control::New();
- control.SetAnchorPoint( AnchorPoint::CENTER );
- control.SetParentOrigin( ParentOrigin::CENTER );
+ control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
control.SetSize( 100.0f, 100.0f );
control.SetProperty( DevelControl::Property::TOOLTIP,
Property::Map().Add( Tooltip::Property::CONTENT, "Test" )
Control control = Control::New();
control.SetProperty( DevelControl::Property::TOOLTIP, "Test" );
- control.SetAnchorPoint( AnchorPoint::CENTER );
- control.SetParentOrigin( ParentOrigin::CENTER );
+ control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
control.SetSize( 100.0f, 100.0f );
Actor rootActor = Stage::GetCurrent().GetRootLayer();
tet_infoline( "Create a control and place it at the bottom of the screen, setting the tooltip to appear below" );
Control control = Control::New();
- control.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER );
- control.SetParentOrigin( ParentOrigin::BOTTOM_CENTER );
+ control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER );
+ control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER );
control.SetSize( stageSize );
control.SetProperty( DevelControl::Property::TOOLTIP,
Property::Map().Add( Tooltip::Property::CONTENT, "Test" )
tet_infoline( "Ensure tooltip is still on the screen" );
Actor tooltip = rootActor.GetChildAt( rootActor.GetChildCount() - 1 ); // Last actor added will be our tooltip
- DALI_TEST_CHECK( ( tooltip.GetCurrentWorldPosition().y + tooltip.GetCurrentSize().height * 0.5f ) <= centerPoint.height );
+ DALI_TEST_CHECK( ( tooltip.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ).y + tooltip.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).height * 0.5f ) <= centerPoint.height );
END_TEST;
}
tet_infoline( "Create a control and place it at the top of the screen, setting the tooltip to appear above" );
Control control = Control::New();
- control.SetAnchorPoint( AnchorPoint::TOP_CENTER );
- control.SetParentOrigin( ParentOrigin::TOP_CENTER );
+ control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
+ control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER );
control.SetSize( stageSize );
control.SetProperty( DevelControl::Property::TOOLTIP,
Property::Map().Add( Tooltip::Property::CONTENT, "Test" )
tet_infoline( "Ensure tooltip is still on the screen" );
Actor tooltip = rootActor.GetChildAt( rootActor.GetChildCount() - 1 ); // Last actor added will be our tooltip
- DALI_TEST_CHECK( ( tooltip.GetCurrentWorldPosition().y - tooltip.GetCurrentSize().height * 0.5f ) >= -centerPoint.height );
+ DALI_TEST_CHECK( ( tooltip.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ).y - tooltip.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).height * 0.5f ) >= -centerPoint.height );
END_TEST;
}
tet_infoline( "Create a control and adjust it's position so that the tooltip will attempt to appear to the left of the screen" );
Control control = Control::New();
- control.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER );
- control.SetParentOrigin( ParentOrigin::BOTTOM_CENTER );
+ control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER );
+ control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER );
control.SetSize( stageSize );
control.SetProperty( DevelControl::Property::TOOLTIP,
Property::Map().Add( Tooltip::Property::CONTENT, "Test" )
tet_infoline( "Ensure tooltip is still on the screen" );
Actor tooltip = rootActor.GetChildAt( rootActor.GetChildCount() - 1 ); // Last actor added will be our tooltip
- DALI_TEST_CHECK( ( tooltip.GetCurrentWorldPosition().x - tooltip.GetCurrentSize().width * 0.5f ) >= -centerPoint.width );
+ DALI_TEST_CHECK( ( tooltip.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ).x - tooltip.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width * 0.5f ) >= -centerPoint.width );
END_TEST;
}
tet_infoline( "Create a control and adjust it's position so that the tooltip will attempt to appear to the right of the screen" );
Control control = Control::New();
- control.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER );
- control.SetParentOrigin( ParentOrigin::BOTTOM_CENTER );
+ control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER );
+ control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER );
control.SetSize( stageSize );
control.SetProperty( DevelControl::Property::TOOLTIP,
Property::Map().Add( Tooltip::Property::CONTENT, "Test" )
tet_infoline( "Ensure tooltip is still on the screen" );
Actor tooltip = rootActor.GetChildAt( rootActor.GetChildCount() - 1 ); // Last actor added will be our tooltip
- DALI_TEST_CHECK( ( tooltip.GetCurrentWorldPosition().x + tooltip.GetCurrentSize().width * 0.5f ) <= centerPoint.width );
+ DALI_TEST_CHECK( ( tooltip.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ).x + tooltip.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width * 0.5f ) <= centerPoint.width );
END_TEST;
}
DummyControl actor = DummyControl::New();
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
- actor.SetName("Actor1");
- actor.SetColor(Color::CYAN);
+ actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
+ actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
Stage::GetCurrent().Add(actor);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
DummyControl actor = DummyControl::New();
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
- actor.SetName("Actor1");
- actor.SetColor(Color::CYAN);
+ actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
+ actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
Stage::GetCurrent().Add(actor);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
DummyControl actor = DummyControl::New();
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
- actor.SetName("Actor1");
- actor.SetColor(Color::CYAN);
+ actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
+ actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
Stage::GetCurrent().Add(actor);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
DummyControl actor = DummyControl::New();
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
- actor.SetName("Actor1");
+ actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
Stage::GetCurrent().Add(actor);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(0,0,0), 0.001f, TEST_LOCATION);
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(0,0,0), 0.001f, TEST_LOCATION);
anim.Play();
application.Render(250); // 25%
application.SendNotification();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(-10,-10,0), 1.0, TEST_LOCATION); // High epsilon as we don't have exact figure for bezier curve at 50%
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(-10,-10,0), 1.0, TEST_LOCATION); // High epsilon as we don't have exact figure for bezier curve at 50%
application.Render(250); // Halfway thru map1 anim
application.SendNotification();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(24,24,0), 1.0, TEST_LOCATION); // High epsilon as we don't have exact figure for bezier curve at 50%
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(24,24,0), 1.0, TEST_LOCATION); // High epsilon as we don't have exact figure for bezier curve at 50%
application.Render(250); // End of map1 anim
application.SendNotification();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(100,100,0), 1.0, TEST_LOCATION); // High epsilon as we don't have exact figure for bezier curve
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(100,100,0), 1.0, TEST_LOCATION); // High epsilon as we don't have exact figure for bezier curve
application.Render(250); // End of map1 anim
application.SendNotification();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(100,100,0), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(100,100,0), TEST_LOCATION );
END_TEST;
}
DummyControl actor = DummyControl::New();
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
- actor.SetName("Actor1");
+ actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
Stage::GetCurrent().Add(actor);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
DummyControl actor = DummyControl::New();
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
- actor.SetName("Actor1");
- actor.SetColor(Color::CYAN);
+ actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
+ actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
Stage::GetCurrent().Add(actor);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
DummyControl actor = DummyControl::New();
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
- actor.SetName("Actor1");
- actor.SetColor(Color::CYAN);
+ actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
+ actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
Stage::GetCurrent().Add(actor);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
DummyControl actor = DummyControl::New();
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
- actor.SetName("Actor1");
- actor.SetColor(Color::CYAN);
+ actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
+ actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
Stage::GetCurrent().Add(actor);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
DummyControl actor = DummyControl::New();
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
- actor.SetName("Actor1");
- actor.SetColor(Color::CYAN);
+ actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
+ actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
// Don't stage actor
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
DummyControl actor = DummyControl::New();
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
- actor.SetName("Actor1");
- actor.SetColor(Color::CYAN);
+ actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
+ actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
Stage::GetCurrent().Add(actor);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
DummyControl actor = DummyControl::New();
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
- actor.SetName("Actor1");
- actor.SetColor(Color::CYAN);
+ actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
+ actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
Stage::GetCurrent().Add(actor);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
DummyControl actor = DummyControl::New();
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
- actor.SetName("Actor1");
- actor.SetColor(Color::CYAN);
+ actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
+ actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
Stage::GetCurrent().Add(actor);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
DummyControl actor = DummyControl::New();
actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
- actor.SetName("Actor1");
- actor.SetColor(Color::CYAN);
+ actor.SetProperty( Dali::Actor::Property::NAME,"Actor1");
+ actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(Radian(0), Vector3::ZAXIS), TEST_LOCATION);
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(Radian(0), Vector3::ZAXIS), TEST_LOCATION);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
Animation anim = dummyImpl.CreateTransition( transition );
DALI_TEST_CHECK( anim );
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::MAGENTA, TEST_LOCATION);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(Radian(Math::PI_2), Vector3::ZAXIS), TEST_LOCATION);
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::MAGENTA, TEST_LOCATION);
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(Radian(Math::PI_2), Vector3::ZAXIS), TEST_LOCATION);
anim.Play();
application.SendNotification();
application.Render(0); // start map2 anim
application.SendNotification();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(100,0,0), TEST_LOCATION);
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(100,0,0), TEST_LOCATION);
application.Render(500); // Start map1 animation, halfway thru map2 anim
application.SendNotification();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(50,50,0), TEST_LOCATION);
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(50,50,0), TEST_LOCATION);
application.Render(500); // Halfway thru map1 anim, end of map2 anim
application.SendNotification();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(0,100,0), TEST_LOCATION);
- DALI_TEST_EQUALS( actor.GetCurrentColor(), (Color::MAGENTA+Color::RED)*0.5f, TEST_LOCATION);
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(0,100,0), TEST_LOCATION);
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), (Color::MAGENTA+Color::RED)*0.5f, TEST_LOCATION);
application.Render(500); // End of map1 anim
application.SendNotification();
- DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::RED, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::RED, TEST_LOCATION );
END_TEST;
}
Vector3 vector(100.0f, 100.0f, 0.0f);
- DALI_TEST_CHECK(vector != videoView.GetCurrentSize());
+ DALI_TEST_CHECK(vector != videoView.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
videoView.SetSize( vector );
application.SendNotification();
application.Render();
// Check the size in the new frame
- DALI_TEST_CHECK(vector == videoView.GetCurrentSize());
+ DALI_TEST_CHECK(vector == videoView.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
END_TEST;
}
#include <toolkit-event-thread-callback.h>
#include <dali-toolkit-test-suite-utils.h>
+#include <dali/devel-api/actors/actor-devel.h>
#include <dali/devel-api/object/handle-devel.h>
#include <dali/devel-api/text-abstraction/font-client.h>
#include <dali-toolkit/devel-api/controls/control-devel.h>
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, borderVisual );
actor.SetSize(2000, 2000);
- actor.SetParentOrigin(ParentOrigin::CENTER);
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
Stage::GetCurrent().Add(actor);
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, borderVisual );
actor.SetSize(2000, 2000);
- actor.SetParentOrigin(ParentOrigin::CENTER);
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
Stage::GetCurrent().Add(actor);
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, borderVisual );
actor.SetSize(2000, 2000);
- actor.SetParentOrigin(ParentOrigin::CENTER);
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
Stage::GetCurrent().Add(actor);
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetSize(2000, 2000);
- actor.SetParentOrigin(ParentOrigin::CENTER);
- actor.SetColor(Color::BLACK);
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
+ actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
Stage::GetCurrent().Add(actor);
DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION);
application.Render(2001u); // go past end
application.SendNotification(); // Trigger signals
- DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION );
DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector4>("uColor", Vector4( 1.0f, 1.0f, 1.0f, TARGET_MIX_COLOR.a ) ), true, TEST_LOCATION );
DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector3>("mixColor", Vector3(TARGET_MIX_COLOR) ), true, TEST_LOCATION );
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetSize(2000, 2000);
- actor.SetParentOrigin(ParentOrigin::CENTER);
- actor.SetColor(Color::BLACK);
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
+ actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
Stage::GetCurrent().Add(actor);
application.SendNotification();
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>( actor.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetSize( 2000, 2000 );
- actor.SetParentOrigin(ParentOrigin::CENTER);
- actor.SetColor(Color::BLACK);
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
+ actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
Stage::GetCurrent().Add(actor);
application.SendNotification();
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>( actor.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
actor.SetSize( 2000, 2000 );
- actor.SetParentOrigin(ParentOrigin::CENTER);
- actor.SetColor(Color::BLACK);
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
+ actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
Stage::GetCurrent().Add(actor);
application.SendNotification();
DummyControl actor = DummyControl::New(true);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
actor.SetSize(2000, 2000);
- actor.SetParentOrigin(ParentOrigin::CENTER);
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
Stage::GetCurrent().Add(actor);
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummyImpl.SetLayout( DummyControl::Property::TEST_VISUAL, transformMap );
dummy.SetSize(2000, 2000);
- dummy.SetParentOrigin(ParentOrigin::CENTER);
+ dummy.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
Stage::GetCurrent().Add(dummy);
application.SendNotification();
DALI_TEST_EQUALS( dummyControl.GetRendererCount(), 0, TEST_LOCATION );
dummyControl.SetSize(200.f, 200.f);
- dummyControl.SetParentOrigin( ParentOrigin::CENTER );
+ dummyControl.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage::GetCurrent().Add( dummyControl );
application.SendNotification();
DALI_TEST_EQUALS( dummyControl.GetRendererCount(), 0, TEST_LOCATION );
dummyControl.SetSize(200.f, 200.f);
- dummyControl.SetParentOrigin( ParentOrigin::CENTER );
+ dummyControl.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage::GetCurrent().Add( dummyControl );
application.SendNotification();
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummy.SetSize( 200.f, 200.f );
- dummy.SetParentOrigin( ParentOrigin::CENTER );
+ dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage::GetCurrent().Add( dummy );
application.SendNotification();
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummy.SetSize( 200.f, 200.f );
- dummy.SetParentOrigin( ParentOrigin::CENTER );
+ dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage::GetCurrent().Add( dummy );
application.SendNotification();
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummy.SetSize( 200.f, 200.f );
- dummy.SetParentOrigin( ParentOrigin::CENTER );
+ dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage::GetCurrent().Add( dummy );
application.SendNotification();
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummy.SetSize( 200.f, 200.f );
- dummy.SetParentOrigin( ParentOrigin::CENTER );
+ dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage::GetCurrent().Add( dummy );
application.SendNotification();
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummy.SetSize( 200.f, 200.f );
- dummy.SetParentOrigin( ParentOrigin::CENTER );
+ dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage::GetCurrent().Add( dummy );
application.SendNotification();
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummyImpl.SetLayout( DummyControl::Property::TEST_VISUAL, transformMap );
dummy.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
- dummy.SetParentOrigin(ParentOrigin::CENTER);
+ dummy.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
Stage::GetCurrent().Add(dummy);
application.SendNotification();
ToolkitTestApplication application;
WebView view = WebView::New();
- view.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- view.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ view.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ view.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
view.SetPosition( 0, 0 );
view.SetSize( 800, 600 );
Stage::GetCurrent().Add( view );
ToolkitTestApplication application;
WebView view = WebView::New();
- view.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- view.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ view.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ view.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
view.SetPosition( 0, 0 );
view.SetSize( 800, 600 );
*
* e.g.
* Property::Map map;
- * map["ACTOR"] = actor.GetName(); // replaces '{ACTOR} in the template
+ * map["ACTOR"] = actor.GetProperty< std::string >( Dali::Actor::Property::NAME ); // replaces '{ACTOR} in the template
* Animation a = builder.CreateAnimation( "wobble");
*
* @pre The Builder has been initialized.
* The animation is applied to a specific actor.
* e.g.
* Property::Map map;
- * map["ACTOR"] = actor.GetName(); // replaces '{ACTOR} in the template
+ * map["ACTOR"] = actor.GetProperty< std::string >( Dali::Actor::Property::NAME ); // replaces '{ACTOR} in the template
* Actor myInstance = builder.Create( "templateActorTree" )
* Animation a = builder.CreateAnimation( "wobble", myInstance);
*
* EffectsView effectsView = EffectsView::New( Toolkit::EffectsView::EMBOSS );
*
* // set position and format
- * effectsView.SetParentOrigin( ParentOrigin::CENTER );
+ * effectsView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
* effectsView.SetSize( Vector2( width, height) );
* effectsView.SetPixelFormat( Pixel::RGBA8888 );
*
* // create and add some visible actors to the ShadowView, all these child actors will therefore cast a shadow.
* Image image = Image::New(...);
* ImageView imageView = ImageView::New(image);
- * imageView.SetParentOrigin( ParentOrigin::CENTER );
- * imageView.SetAnchorPoint( AnchorPoint::CENTER );
+ * imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ * imageView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
* shadowView.Add(imageView);\n Add the renderable actor to the shadow view
*
* ImageView shadowPlaneBg = ImageView::New(); //This will be the shadow plane
- * shadowPlaneBg.SetParentOrigin( ParentOrigin::CENTER );
- * shadowPlaneBg.SetAnchorPoint( AnchorPoint::CENTER );
+ * shadowPlaneBg.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ * shadowPlaneBg.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
* shadowPlaneBg.SetSize(700.0f, 700.0f);
* shadowPlaneBg.SetPosition( Vector3(0.0f, 0.0f, -30.0f) ); //Just behind the image view.
* shadowView.SetShadowPlaneBackground(ShadowPlane);
{
if( child )
{
- DALI_LOG_INFO( gLogFilter, Debug::Verbose, "AddChild[%s] to node[%p] at index:%d\n", child.GetName().c_str(), mImpl->mYogaNode, index );
+ DALI_LOG_INFO( gLogFilter, Debug::Verbose, "AddChild[%s] to node[%p] at index:%d\n", child.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str(), mImpl->mYogaNode, index );
NodePtr childNode( new Node() );
childNode->mImpl->mMeasureCallback = measureFunction;
childNode->mImpl->mActor = child;
- Vector2 minumumSize = child.GetMinimumSize();
- Vector2 maximumSize = child.GetMaximumSize();
+ Vector2 minumumSize = child.GetProperty< Vector2 >( Actor::Property::MINIMUM_SIZE );
+ Vector2 maximumSize = child.GetProperty< Vector2 >( Actor::Property::MAXIMUM_SIZE );
YGNodeStyleSetMaxWidth( childNode->mImpl->mYogaNode, maximumSize.width );
YGNodeStyleSetMaxHeight( childNode->mImpl->mYogaNode, maximumSize.height );
void Node::RemoveChild( Actor child )
{
- DALI_LOG_INFO( gLogFilter, Debug::Verbose, "RemoveChild child:[%s] from internal nodeCount[%d] childCount[%d]\n", child.GetName().c_str(), YGNodeGetChildCount( mImpl->mYogaNode ), mImpl->mChildNodes.size() );
+ DALI_LOG_INFO( gLogFilter, Debug::Verbose, "RemoveChild child:[%s] from internal nodeCount[%d] childCount[%d]\n", child.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str(), YGNodeGetChildCount( mImpl->mYogaNode ), mImpl->mChildNodes.size() );
auto iterator = std::find_if( mImpl->mChildNodes.begin(),mImpl->mChildNodes.end(),
[&child]( NodePtr& childNode ){ return childNode->mImpl->mActor.GetHandle() == child;});
Toolkit::Flex::SizeTuple nodeSize{8,8}; // Default size set to 8,8 to aid bug detection.
if( mImpl->mMeasureCallback && mImpl->mActor.GetHandle() )
{
- DALI_LOG_INFO( gLogFilter, Debug::Verbose, "MeasureNode MeasureCallback executing on %s\n", mImpl->mActor.GetHandle().GetName().c_str() );
+ DALI_LOG_INFO( gLogFilter, Debug::Verbose, "MeasureNode MeasureCallback executing on %s\n", mImpl->mActor.GetHandle().GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str() );
nodeSize = mImpl->mMeasureCallback( mImpl->mActor.GetHandle(), width, widthMode, height, heightMode );
}
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "MeasureNode nodeSize width:%f height:%f\n", nodeSize.width, nodeSize.height );
case Dali::HitTestAlgorithm::CHECK_ACTOR:
{
// Check whether the actor is visible and not fully transparent.
- if( actor.IsVisible()
- && actor.GetCurrentWorldColor().a > 0.01f) // not FULLY_TRANSPARENT
+ if( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE )
+ && actor.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ).a > 0.01f) // not FULLY_TRANSPARENT
{
// Check whether the actor is focusable
Property::Index propertyActorFocusable = actor.GetPropertyIndex(ACTOR_FOCUSABLE);
}
case Dali::HitTestAlgorithm::DESCEND_ACTOR_TREE:
{
- if( actor.IsVisible() ) // Actor is visible, if not visible then none of its children are visible.
+ if( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) ) // Actor is visible, if not visible then none of its children are visible.
{
hittable = true;
}
}
// Go through the actor's hierarchy to check whether the actor is visible
- bool actorVisible = actor.IsVisible();
+ bool actorVisible = actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE );
Actor parent = actor.GetParent();
while (actorVisible && parent && parent != rootActor)
{
- actorVisible = parent.IsVisible();
+ actorVisible = parent.GetCurrentProperty< bool >( Actor::Property::VISIBLE );
parent = parent.GetParent();
}
// Check whether the actor is fully transparent
- bool actorOpaque = actor.GetCurrentWorldColor().a > 0.01f;
+ bool actorOpaque = actor.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ).a > 0.01f;
// Set the focus only when the actor is focusable and visible and not fully transparent
if(actorVisible && actorFocusable && actorOpaque)
const std::string focusBorderImagePath = imageDirPath + FOCUS_BORDER_IMAGE_FILE_NAME;
mFocusIndicatorActor = Toolkit::ImageView::New(focusBorderImagePath);
- mFocusIndicatorActor.SetParentOrigin( ParentOrigin::CENTER );
+ mFocusIndicatorActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mFocusIndicatorActor.SetZ( 1.0f );
// Apply size constraint to the focus indicator
{
// no named actor; presume self
GenericAction action;
- action.actorName = actor.GetName();
+ action.actorName = actor.GetProperty< std::string >( Dali::Actor::Property::NAME );
action.actionName = *actionName;
GetParameters(child, action.parameters);
connector.Connect( action );
{
const TreeNode::KeyNodePair& key_child = *iter;
- DALI_SCRIPT_INFO(" Creating Signal for: %s\n", actor.GetName().c_str());
+ DALI_SCRIPT_INFO(" Creating Signal for: %s\n", actor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str());
OptionalString name( IsString( IsChild( key_child.second, "name")) );
DALI_ASSERT_ALWAYS(name && "Signal must have a name");
{
Actor child = Self().GetChildAt(i);
- child.SetAnchorPoint( anchorPointAndParentOrigin );
- child.SetParentOrigin( anchorPointAndParentOrigin );
+ child.SetProperty( Actor::Property::ANCHOR_POINT, anchorPointAndParentOrigin );
+ child.SetProperty( Actor::Property::PARENT_ORIGIN, anchorPointAndParentOrigin );
Vector2 currentChildSize( child.GetTargetSize().GetVectorXY() );
if( currentChildSize == Vector2::ZERO )
void BloomView::OnInitialize()
{
// root actor to parent all user added actors, needed to allow us to set that subtree as exclusive for our child render task
- mChildrenRoot.SetParentOrigin( ParentOrigin::CENTER );
- mInternalRoot.SetParentOrigin( ParentOrigin::CENTER );
+ mChildrenRoot.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ mInternalRoot.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
//////////////////////////////////////////////////////
// Create actors
// Create an image view for rendering from the scene texture to the bloom texture
mBloomExtractActor = Actor::New();
- mBloomExtractActor.SetParentOrigin( ParentOrigin::CENTER );
+ mBloomExtractActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
// Create an image view for compositing the result (scene and bloom textures) to output
mCompositeActor = Actor::New();
- mCompositeActor.SetParentOrigin( ParentOrigin::CENTER );
+ mCompositeActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
// Create an image view for holding final result, i.e. the blurred image. This will get rendered to screen later, via default / user render task
mTargetActor = Actor::New();
- mTargetActor.SetParentOrigin( ParentOrigin::CENTER );
+ mTargetActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
// Create the Gaussian Blur object + render tasks
// Note that we use mBloomExtractTarget as the source image and also re-use this as the gaussian blur final render target. This saves the gaussian blur code from creating it
// render targets etc internally, so we make better use of resources
// Note, this also internally creates the render tasks used by the Gaussian blur, this must occur after the bloom extraction and before the compositing
mGaussianBlurView = Dali::Toolkit::GaussianBlurView::New(mBlurNumSamples, mBlurBellCurveWidth, mPixelFormat, mDownsampleWidthScale, mDownsampleHeightScale, true);
- mGaussianBlurView.SetParentOrigin( ParentOrigin::CENTER );
+ mGaussianBlurView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
//////////////////////////////////////////////////////
// Create cameras for the renders corresponding to the (potentially downsampled) render targets' size
mRenderDownsampledCamera = CameraActor::New();
- mRenderDownsampledCamera.SetParentOrigin(ParentOrigin::CENTER);
+ mRenderDownsampledCamera.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER );
mRenderDownsampledCamera.SetInvertYAxis( true );
mRenderFullSizeCamera = CameraActor::New();
- mRenderFullSizeCamera.SetParentOrigin(ParentOrigin::CENTER);
+ mRenderFullSizeCamera.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER );
mRenderFullSizeCamera.SetInvertYAxis( true );
mGaussianBlurView.SetSize(mTargetSize);
GetImpl(mGaussianBlurView).AllocateResources();
- mGaussianBlurView.SetVisible( true );
+ mGaussianBlurView.SetProperty( Actor::Property::VISIBLE, true );
//////////////////////////////////////////////////////
// Create render targets
mTargetActor.RemoveRenderer( 0u );
mCompositeActor.RemoveRenderer( 0u );
- mGaussianBlurView.SetVisible( false );
+ mGaussianBlurView.SetProperty( Actor::Property::VISIBLE, false );
mActivated = false;
}
// Create a cameraActor for the off screen render task.
mCameraActor = CameraActor::New(mMovementArea);
- mCameraActor.SetParentOrigin(ParentOrigin::CENTER);
+ mCameraActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage stage = Stage::GetCurrent();
//Create RenderTask source actor
Actor sourceActor = Actor::New();
sourceActor.SetSize( mMovementArea );
- sourceActor.SetParentOrigin(ParentOrigin::CENTER);
+ sourceActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
sourceActor.RegisterProperty( "uHSVDelta", hsvDelta );
Stage::GetCurrent().Add( sourceActor );
// Push button requires the Leave event.
Actor self = Self();
- self.SetLeaveRequired( true );
+ self.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
}
void PushButton::SetIconAlignment( const PushButton::IconAlignment iconAlignment )
// Toggle button requires the Leave event.
Actor self = Self();
- self.SetLeaveRequired( true );
+ self.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
}
void ToggleButton::SetProperty( BaseObject* object, Property::Index propertyIndex, const Property::Value& value )
std::ostringstream oss;
oss << "{\n ";
- const std::string& name = control.Self().GetName();
+ const std::string& name = control.Self().GetProperty< std::string >( Dali::Actor::Property::NAME );
if( ! name.empty() )
{
oss << "\"name\":\"" << name << "\",\n";
{
std::ostringstream oss;
oss << "{\n ";
- const std::string& name = actor.GetName();
+ const std::string& name = actor.GetProperty< std::string >( Dali::Actor::Property::NAME );
if( ! name.empty() )
{
oss << "\"name\":\"" << name << "\",\n";
void EffectsView::OnInitialize()
{
CustomActor self = Self();
- mChildrenRoot.SetParentOrigin( ParentOrigin::CENTER );
+ mChildrenRoot.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
self.Add( mChildrenRoot );
}
{
// Create a camera for the children render, corresponding to its render target size
mCameraForChildren = CameraActor::New(mTargetSize);
- mCameraForChildren.SetParentOrigin(ParentOrigin::CENTER);
+ mCameraForChildren.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER );
mCameraForChildren.SetInvertYAxis( true );
Self().Add( mCameraForChildren );
}
// Anchor actor to top left of the container
if( child.GetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT ).Get< bool >() )
{
- child.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ child.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
}
- child.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ child.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
float negotiatedWidth = child.GetRelayoutSize(Dimension::WIDTH);
float negotiatedHeight = child.GetRelayoutSize(Dimension::HEIGHT);
Actor childActor = mChildrenNodes[i].actor.GetHandle();
// Intialize the style of the child.
- YGNodeStyleSetMinWidth( childNode, childActor.GetMinimumSize().x );
- YGNodeStyleSetMinHeight( childNode, childActor.GetMinimumSize().y );
- YGNodeStyleSetMaxWidth( childNode, childActor.GetMaximumSize().x );
- YGNodeStyleSetMaxHeight( childNode, childActor.GetMaximumSize().y );
+ YGNodeStyleSetMinWidth( childNode, childActor.GetProperty< Vector2 >( Actor::Property::MINIMUM_SIZE ).x );
+ YGNodeStyleSetMinHeight( childNode, childActor.GetProperty< Vector2 >( Actor::Property::MINIMUM_SIZE ).y );
+ YGNodeStyleSetMaxWidth( childNode, childActor.GetProperty< Vector2 >( Actor::Property::MAXIMUM_SIZE ).x );
+ YGNodeStyleSetMaxHeight( childNode, childActor.GetProperty< Vector2 >( Actor::Property::MAXIMUM_SIZE ).y );
// Check child properties on the child for how to layout it.
// These properties should be dynamically registered to the child which
#if defined(FLEX_CONTAINER_DEBUG)
YGNodePrint( mRootNode.node, (YGPrintOptions)( YGPrintOptionsLayout | YGPrintOptionsStyle | YGPrintOptionsChildren ) );
#endif
- YGNodeCalculateLayout( mRootNode.node, Self().GetMaximumSize().x, Self().GetMaximumSize().y, nodeLayoutDirection );
+ YGNodeCalculateLayout( mRootNode.node, Self().GetProperty< Vector2 >( Actor::Property::MAXIMUM_SIZE ).x, Self().GetProperty< Vector2 >( Actor::Property::MAXIMUM_SIZE ).y, nodeLayoutDirection );
#if defined(FLEX_CONTAINER_DEBUG)
YGNodePrint( mRootNode.node, (YGPrintOptions)( YGPrintOptionsLayout | YGPrintOptionsStyle | YGPrintOptionsChildren ) );
#endif
#include <dali/public-api/rendering/shader.h>
#include <dali/public-api/render-tasks/render-task-list.h>
#include <dali/integration-api/debug.h>
+#include <dali/devel-api/actors/actor-devel.h>
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/visuals/visual-properties.h>
void GaussianBlurView::OnInitialize()
{
// root actor to parent all user added actors, needed to allow us to set that subtree as exclusive for our child render task
- mChildrenRoot.SetParentOrigin(ParentOrigin::CENTER);
- mInternalRoot.SetParentOrigin(ParentOrigin::CENTER);
+ mChildrenRoot.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER );
+ mInternalRoot.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER );
//////////////////////////////////////////////////////
// Create shaders
// Create an actor for performing a horizontal blur on the texture
mHorizBlurActor = Actor::New();
- mHorizBlurActor.SetParentOrigin(ParentOrigin::CENTER);
+ mHorizBlurActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER );
Renderer renderer = CreateRenderer( BASIC_VERTEX_SOURCE, fragmentSource.c_str() );
mHorizBlurActor.AddRenderer( renderer );
// Create an actor for performing a vertical blur on the texture
mVertBlurActor = Actor::New();
- mVertBlurActor.SetParentOrigin(ParentOrigin::CENTER);
+ mVertBlurActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER );
renderer = CreateRenderer( BASIC_VERTEX_SOURCE, fragmentSource.c_str() );
mVertBlurActor.AddRenderer( renderer );
if(!mBlurUserImage)
{
mCompositingActor = Actor::New();
- mCompositingActor.SetParentOrigin(ParentOrigin::CENTER);
- mCompositingActor.SetOpacity(GAUSSIAN_BLUR_VIEW_DEFAULT_BLUR_STRENGTH); // ensure alpha is enabled for this object and set default value
+ mCompositingActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER );
+ mCompositingActor.SetProperty( DevelActor::Property::OPACITY,GAUSSIAN_BLUR_VIEW_DEFAULT_BLUR_STRENGTH); // ensure alpha is enabled for this object and set default value
renderer = CreateRenderer( BASIC_VERTEX_SOURCE, BASIC_FRAGMENT_SOURCE );
mCompositingActor.AddRenderer( renderer );
// Create an image view for holding final result, i.e. the blurred image. This will get rendered to screen later, via default / user render task
mTargetActor = Actor::New();
- mTargetActor.SetParentOrigin(ParentOrigin::CENTER);
+ mTargetActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER );
renderer = CreateRenderer( BASIC_VERTEX_SOURCE, BASIC_FRAGMENT_SOURCE );
mTargetActor.AddRenderer( renderer );
// Create cameras for the renders corresponding to the view size
mRenderFullSizeCamera = CameraActor::New();
mRenderFullSizeCamera.SetInvertYAxis( true );
- mRenderFullSizeCamera.SetParentOrigin(ParentOrigin::CENTER);
+ mRenderFullSizeCamera.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER );
//////////////////////////////////////////////////////
// Connect to actor tree
// Create camera for the renders corresponding to the (potentially downsampled) render targets' size
mRenderDownsampledCamera = CameraActor::New();
mRenderDownsampledCamera.SetInvertYAxis( true );
- mRenderDownsampledCamera.SetParentOrigin(ParentOrigin::CENTER);
+ mRenderDownsampledCamera.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER );
//////////////////////////////////////////////////////
// Connect to actor tree
// and what is not.
mSourceActor = Actor::New();
Stage().GetCurrent().Add(mSourceActor);
- mSourceActor.SetParentOrigin(ParentOrigin::CENTER);
+ mSourceActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER );
Constraint constraint = Constraint::New<Vector3>( mSourceActor, Actor::Property::POSITION, EqualToConstraint() );
constraint.AddSource( Source( self, Toolkit::Magnifier::Property::SOURCE_POSITION ) );
constraint.Apply();
Actor self(Self());
mFrame = Actor::New( );
- mFrame.SetInheritPosition(false);
- mFrame.SetInheritScale(true);
+ mFrame.SetProperty( Actor::Property::INHERIT_POSITION, false );
+ mFrame.SetProperty( Actor::Property::INHERIT_SCALE, true );
mFrame.SetResizePolicy( ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT, Dimension::ALL_DIMENSIONS );
Vector3 sizeOffset(IMAGE_BORDER_INDENT*2.f - 2.f, IMAGE_BORDER_INDENT*2.f - 2.f, 0.0f);
mFrame.SetSizeModeFactor( sizeOffset );
// should be updated when:
// Magnifier's world size/scale changes.
Actor self(Self());
- Vector3 worldSize = mActorSize * self.GetCurrentWorldScale();
+ Vector3 worldSize = mActorSize * self.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_SCALE );
// Adjust field of view to scale content
void NavigationView::OnStageConnection( int depth )
{
- Self().SetSensitive(true);
+ Self().SetProperty( Actor::Property::SENSITIVE,true);
Control::OnStageConnection( depth );
}
mControlSize = Vector2( mPageSize.width * 2.f, mPageSize.height );
Self().SetSize( mControlSize );
- mTurningPageLayer.SetParentOrigin( ParentOrigin::CENTER );
+ mTurningPageLayer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
}
void PageTurnLandscapeView::OnAddPage( Actor newPage, bool isLeftSide )
{
- newPage.SetParentOrigin( ParentOrigin::CENTER );
+ newPage.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
}
Vector2 PageTurnLandscapeView::SetPanPosition( const Vector2& gesturePosition )
mControlSize = mPageSize;
Self().SetSize( mPageSize );
- mTurningPageLayer.SetParentOrigin( ParentOrigin::CENTER_LEFT );
+ mTurningPageLayer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT );
}
Vector2 PageTurnPortraitView::SetPanPosition( const Vector2& gesturePosition )
OrganizePageDepth();
mPageUpdated = true;
- actor.SetVisible(true);
+ actor.SetProperty( Actor::Property::VISIBLE,true);
// Add the page to tuning page layer and set up PageTurnEffect
mShadowView.Add( actor );
{
if( isLeftSide )
{
- actor.SetVisible( false );
+ actor.SetProperty( Actor::Property::VISIBLE, false );
}
}
: isTurnBack( false )
{
actor = Actor::New();
- actor.SetAnchorPoint( AnchorPoint::CENTER_LEFT );
- actor.SetParentOrigin( ParentOrigin::CENTER_LEFT );
- actor.SetVisible( false );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT );
+ actor.SetProperty( Actor::Property::VISIBLE, false );
propertyPanDisplacement = actor.RegisterProperty( PROPERTY_PAN_DISPLACEMENT, 0.f );
propertyPanCenter = actor.RegisterProperty(PROPERTY_PAN_CENTER, Vector2::ZERO);
// create the layer for turning pages
mTurningPageLayer = Layer::New();
- mTurningPageLayer.SetAnchorPoint( AnchorPoint::CENTER_LEFT );
+ mTurningPageLayer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT );
mTurningPageLayer.SetBehavior(Layer::LAYER_3D);
mTurningPageLayer.Raise();
AddPage( i );
mPages[i].actor.SetZ( -static_cast<float>( i )*STATIC_PAGE_INTERVAL_DISTANCE );
}
- mPages[0].actor.SetVisible(true);
+ mPages[0].actor.SetProperty( Actor::Property::VISIBLE,true);
// enable the pan gesture which is attached to the control
EnableGestureDetection(Gesture::Type(Gesture::Pan));
void PageTurnView::SetupShadowView()
{
mShadowView = Toolkit::ShadowView::New( 0.25f, 0.25f );
- Vector3 origin = mTurningPageLayer.GetCurrentParentOrigin();
- mShadowView.SetParentOrigin( origin );
- mShadowView.SetAnchorPoint( origin );
+ Vector3 origin = mTurningPageLayer.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN );
+ mShadowView.SetProperty( Actor::Property::PARENT_ORIGIN, origin );
+ mShadowView.SetProperty( Actor::Property::ANCHOR_POINT, origin );
mShadowView.SetPointLightFieldOfView( Math::PI / 2.0f);
mShadowView.SetShadowColor(DEFAULT_SHADOW_COLOR);
mShadowPlaneBackground = Actor::New();
- mShadowPlaneBackground.SetParentOrigin( ParentOrigin::CENTER );
+ mShadowPlaneBackground.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mShadowPlaneBackground.SetSize( mControlSize );
Self().Add( mShadowPlaneBackground );
mShadowView.SetShadowPlaneBackground( mShadowPlaneBackground );
mPointLight = Actor::New();
- mPointLight.SetAnchorPoint( origin );
- mPointLight.SetParentOrigin( origin );
+ mPointLight.SetProperty( Actor::Property::ANCHOR_POINT, origin );
+ mPointLight.SetProperty( Actor::Property::PARENT_ORIGIN, origin );
mPointLight.SetPosition( 0.f, 0.f, mPageSize.width*POINT_LIGHT_HEIGHT_RATIO );
Self().Add( mPointLight );
mShadowView.SetPointLight( mPointLight );
AddPage( i );
}
- mPages[pageId%NUMBER_OF_CACHED_PAGES].actor.SetVisible(true);
+ mPages[pageId%NUMBER_OF_CACHED_PAGES].actor.SetProperty( Actor::Property::VISIBLE,true);
if( pageId > 0 )
{
- mPages[(pageId-1)%NUMBER_OF_CACHED_PAGES].actor.SetVisible(true);
+ mPages[(pageId-1)%NUMBER_OF_CACHED_PAGES].actor.SetProperty( Actor::Property::VISIBLE,true);
}
// set ordered depth to the stacked pages
OrganizePageDepth();
float degree = isLeftSide ? 180.f :0.f;
mPages[index].actor.SetOrientation( Degree( degree ), Vector3::YAXIS );
- mPages[index].actor.SetVisible( false );
+ mPages[index].actor.SetProperty( Actor::Property::VISIBLE, false );
mPages[index].UseEffect( mSpineEffectShader, mGeometry );
mPages[index].SetTexture( newPage );
if( pageIndex > -1 && pageIndex < mTotalPageCount)
{
int index = pageIndex % NUMBER_OF_CACHED_PAGES;
- mPages[index].actor.SetVisible(false);
+ mPages[index].actor.SetProperty( Actor::Property::VISIBLE,false);
}
}
int id = mTurningPageIndex + (mPages[mIndex].isTurnBack ? -1 : 1);
if( id >=0 && id < mTotalPageCount )
{
- mPages[id%NUMBER_OF_CACHED_PAGES].actor.SetVisible(true);
+ mPages[id%NUMBER_OF_CACHED_PAGES].actor.SetProperty( Actor::Property::VISIBLE,true);
}
mShadowView.RemoveConstraints();
int id = pageId + (mPages[index].isTurnBack ? -1 : 1);
if( id >=0 && id < mTotalPageCount )
{
- mPages[id%NUMBER_OF_CACHED_PAGES].actor.SetVisible(false);
+ mPages[id%NUMBER_OF_CACHED_PAGES].actor.SetProperty( Actor::Property::VISIBLE,false);
}
OnTurnedOver( mPages[index].actor, mPages[index].isTurnBack );
int id = pageId + (mPages[index].isTurnBack ? -1 : 1);
if( id >=0 && id < mTotalPageCount )
{
- mPages[id%NUMBER_OF_CACHED_PAGES].actor.SetVisible(false);
+ mPages[id%NUMBER_OF_CACHED_PAGES].actor.SetProperty( Actor::Property::VISIBLE,false);
}
// Guard against destruction during signal emission
// EXTERNAL INCLUDES
#include <cstring> // for strcmp
#include <dali/devel-api/adaptor-framework/physical-keyboard.h>
+#include <dali/devel-api/actors/actor-devel.h>
#include <dali/public-api/object/type-registry-helper.h>
#include <dali/integration-api/debug.h>
#include <dali/public-api/adaptor-framework/key.h>
popup.SetProperty( Toolkit::Popup::Property::AUTO_HIDE_DELAY, DEFAULT_TOAST_AUTO_HIDE_DELAY );
// Align to the bottom of the screen.
- popup.SetParentOrigin( DEFAULT_TOAST_BOTTOM_PARENT_ORIGIN );
- popup.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER );
+ popup.SetProperty( Actor::Property::PARENT_ORIGIN, DEFAULT_TOAST_BOTTOM_PARENT_ORIGIN );
+ popup.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER );
// Let events pass through the toast popup.
popup.SetProperty( Toolkit::Popup::Property::TOUCH_TRANSPARENT, true );
void Popup::OnInitialize()
{
Actor self = Self();
- self.SetName( "popup" );
+ self.SetProperty( Dali::Actor::Property::NAME, "popup" );
// Apply some default resizing rules.
- self.SetParentOrigin( ParentOrigin::CENTER );
- self.SetAnchorPoint( AnchorPoint::CENTER );
+ self.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ self.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
self.SetSizeModeFactor( DEFAULT_POPUP_PARENT_RELATIVE_SIZE );
self.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::WIDTH );
// Create a new layer so all Popup components can appear above all other actors.
mLayer = Layer::New();
- mLayer.SetName( "popupLayer" );
+ mLayer.SetProperty( Dali::Actor::Property::NAME, "popupLayer" );
- mLayer.SetParentOrigin( ParentOrigin::CENTER );
- mLayer.SetAnchorPoint( AnchorPoint::CENTER );
+ mLayer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ mLayer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mLayer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
// Important to set as invisible as otherwise, if the popup is parented,
// but not shown yet it will appear statically on the screen.
- mLayer.SetVisible( false );
+ mLayer.SetProperty( Actor::Property::VISIBLE, false );
// Add the layer to the hierarchy.
self.Add( mLayer );
mLayer.Add( mBacking );
mPopupContainer = Actor::New();
- mPopupContainer.SetName( "popupContainer" );
- mPopupContainer.SetParentOrigin( ParentOrigin::CENTER );
- mPopupContainer.SetAnchorPoint( AnchorPoint::CENTER );
+ mPopupContainer.SetProperty( Dali::Actor::Property::NAME, "popupContainer" );
+ mPopupContainer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ mPopupContainer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mPopupContainer.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::ALL_DIMENSIONS );
mLayer.Add( mPopupContainer );
const std::string imageDirPath = AssetManager::GetDaliImagePath();
SetPopupBackgroundImage( Toolkit::ImageView::New( imageDirPath + DEFAULT_BACKGROUND_IMAGE_FILE_NAME ) );
- mPopupLayout.SetName( "popupLayoutTable" );
- mPopupLayout.SetParentOrigin( ParentOrigin::CENTER );
- mPopupLayout.SetAnchorPoint( AnchorPoint::CENTER );
+ mPopupLayout.SetProperty( Dali::Actor::Property::NAME, "popupLayoutTable" );
+ mPopupLayout.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ mPopupLayout.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mPopupLayout.SetResizePolicy( ResizePolicy::USE_ASSIGNED_SIZE, Dimension::WIDTH );
mPopupLayout.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
case Toolkit::Popup::FADE:
{
// Fade animations start transparent.
- mPopupContainer.SetOpacity( 0.0f );
+ mPopupContainer.SetProperty( DevelActor::Property::OPACITY, 0.0f );
b