// 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 );
break;
}
}
else
{
- mPopupContainer.SetOpacity( transitionIn ? 1.0f : 0.0f );
+ mPopupContainer.SetProperty( DevelActor::Property::OPACITY, transitionIn ? 1.0f : 0.0f );
}
break;
}
{
mDisplayState = Toolkit::Popup::HIDDEN;
- mLayer.SetVisible( false );
- mPopupLayout.SetSensitive( false );
+ mLayer.SetProperty( Actor::Property::VISIBLE, false );
+ mPopupLayout.SetProperty( Actor::Property::SENSITIVE, false );
// Guard against destruction during signal emission.
Toolkit::Popup handle( GetOwner() );
// Adds new background to the dialog.
mPopupBackgroundImage = image;
- mPopupBackgroundImage.SetName( "popupBackgroundImage" );
- mPopupBackgroundImage.SetAnchorPoint( AnchorPoint::CENTER );
- mPopupBackgroundImage.SetParentOrigin( ParentOrigin::CENTER );
+ mPopupBackgroundImage.SetProperty( Dali::Actor::Property::NAME, "popupBackgroundImage" );
+ mPopupBackgroundImage.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ mPopupBackgroundImage.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
// OnDialogTouched only consumes the event. It prevents the touch event to be caught by the backing.
mPopupBackgroundImage.TouchSignal().Connect( this, &Popup::OnDialogTouched );
if( mContent )
{
- mContent.SetName( "popupContent" );
+ mContent.SetProperty( Dali::Actor::Property::NAME, "popupContent" );
mPopupLayout.AddChild( mContent, Toolkit::TableView::CellPosition( 1, 0 ) );
}
// We are displaying so bring the popup layer to the front, and set it visible so it is rendered.
mLayer.RaiseToTop();
- mLayer.SetVisible( true );
+ mLayer.SetProperty( Actor::Property::VISIBLE, true );
// Set up the layout if this is the first display or the layout has become dirty.
if( mLayoutDirty )
}
// Allow the popup to catch events.
- mPopupLayout.SetSensitive( true );
+ mPopupLayout.SetProperty( Actor::Property::SENSITIVE, true );
// Handle the keyboard focus when popup is shown.
Dali::Toolkit::KeyboardFocusManager keyboardFocusManager = Dali::Toolkit::KeyboardFocusManager::Get();
* | |````
* | |
*/
- mPopupContainer.SetParentOrigin( Self().GetCurrentParentOrigin() );
- mPopupContainer.SetAnchorPoint( Self().GetCurrentAnchorPoint() );
+ mPopupContainer.SetProperty( Actor::Property::PARENT_ORIGIN, Self().GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ) );
+ mPopupContainer.SetProperty( Actor::Property::ANCHOR_POINT, Self().GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ) );
// If there is only a title, use less padding.
if( mTitle )
OnLayoutSetup();
// Update background visibility.
- mPopupContainer.SetVisible( !( !mFooter && mPopupLayout.GetChildCount() == 0 ) );
+ mPopupContainer.SetProperty( Actor::Property::VISIBLE, !( !mFooter && mPopupLayout.GetChildCount() == 0 ) );
// Create / destroy / position the tail as needed.
LayoutTail();
{
// Adds the tail actor.
mTailImage = Toolkit::ImageView::New( image );
- mTailImage.SetName( "tailImage" );
- mTailImage.SetParentOrigin( parentOrigin );
- mTailImage.SetAnchorPoint( anchorPoint );
+ mTailImage.SetProperty( Dali::Actor::Property::NAME, "tailImage" );
+ mTailImage.SetProperty( Actor::Property::PARENT_ORIGIN, parentOrigin );
+ mTailImage.SetProperty( Actor::Property::ANCHOR_POINT, anchorPoint );
mTailImage.SetPosition( position );
if( mPopupBackgroundImage )
backing.SetProperty( Toolkit::Control::Property::BACKGROUND,
Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR )
.Add( Toolkit::ColorVisual::Property::MIX_COLOR, Vector4( mBackingColor.r, mBackingColor.g, mBackingColor.b, 1.0f ) ) );
- backing.SetName( "popupBacking" );
+ backing.SetProperty( Dali::Actor::Property::NAME, "popupBacking" );
// Must always be positioned top-left of stage, regardless of parent.
- backing.SetInheritPosition(false);
+ backing.SetProperty( Actor::Property::INHERIT_POSITION, false );
// Always the full size of the stage.
backing.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
backing.SetSize( Stage::GetCurrent().GetSize() );
// Catch events.
- backing.SetSensitive( true );
+ backing.SetProperty( Actor::Property::SENSITIVE, true );
// Default to being transparent.
backing.SetProperty( Actor::Property::COLOR_ALPHA, 0.0f );
return;
}
- mPopupContainer.SetParentOrigin( ParentOrigin::CENTER );
+ mPopupContainer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
// We always anchor to the CENTER, rather than a different anchor point for each contextual
// mode to allow code-reuse of the bound checking code (for maintainability).
- mPopupContainer.SetAnchorPoint( AnchorPoint::CENTER );
+ mPopupContainer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
// Setup with some pre-calculations for speed.
Vector3 halfStageSize( Stage().GetCurrent().GetSize() / 2.0f );
- Vector3 parentPosition( parent.GetCurrentPosition() );
+ Vector3 parentPosition( parent.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ) );
Vector2 halfSize( size / 2.0f );
Vector2 halfParentSize( parent.GetRelayoutSize( Dimension::WIDTH ) / 2.0f, parent.GetRelayoutSize( Dimension::HEIGHT ) / 2.0f );
Vector3 newPosition( Vector3::ZERO );
std::string currentStr;
if( currentFocusedActor )
{
- currentStr = currentFocusedActor.GetName();
+ currentStr = currentFocusedActor.GetProperty< std::string >( Dali::Actor::Property::NAME );
}
Actor nextFocusableActor( currentFocusedActor );
}
CameraActor cameraActor = CameraActor::New();
- cameraActor.SetParentOrigin( ParentOrigin::CENTER );
- cameraActor.SetAnchorPoint( AnchorPoint::CENTER );
+ cameraActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ cameraActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
if( cameraInfo.type == "orthographic" )
{
for( auto nodeIter = tempNode->CBegin(), end = tempNode->CEnd(); nodeIter != end; ++nodeIter )
{
Actor actor = AddNode( scene3dView, ( ( *nodeIter ).second ).GetInteger() );
- actor.SetParentOrigin( ParentOrigin::CENTER );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
scene3dView.GetRoot().Add( actor );
}
renderer.SetTextures( textureSet );
anchorPoint = meshInfo.pivot;
- actor.SetAnchorPoint( anchorPoint );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, anchorPoint );
actor.SetSize( Vector3( meshInfo.size.x, meshInfo.size.y, meshInfo.size.z ) );
actor.AddRenderer( renderer );
}
else
{
- actor.SetAnchorPoint( AnchorPoint::CENTER );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
actor.SetPosition( translation );
actor.RotateBy( orientation );
actor.SetSize( actorSize );
{
std::string nameString;
ReadString( tempNode, nameString );
- actor.SetName( nameString );
+ actor.SetProperty( Dali::Actor::Property::NAME, nameString );
}
SetActorCache( actor, index );
for( auto childIter = tempNode->CBegin(), end = tempNode->CEnd(); childIter != end; ++childIter )
{
Actor childActor = AddNode( scene3dView, ( ( *childIter ).second ).GetInteger() );
- childActor.SetParentOrigin( anchorPoint );
+ childActor.SetProperty( Actor::Property::PARENT_ORIGIN, anchorPoint );
actor.Add( childActor );
}
}
bool Scene3dView::SetDefaultCamera( const Dali::Camera::Type type, const float nearPlane, const Vector3 cameraPosition )
{
- mDefaultCamera.SetParentOrigin( ParentOrigin::CENTER );
- mDefaultCamera.SetAnchorPoint( AnchorPoint::CENTER );
+ mDefaultCamera.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ mDefaultCamera.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mDefaultCamera.SetType( type );
mDefaultCamera.SetNearClippingPlane( nearPlane );
mDefaultCamera.SetPosition( cameraPosition );
void Scene3dView::OnInitialize()
{
- mRoot.SetParentOrigin( ParentOrigin::CENTER );
- mRoot.SetAnchorPoint( AnchorPoint::CENTER );
+ mRoot.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ mRoot.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
Layer layer = Layer::New();
layer.SetBehavior( Layer::LAYER_3D );
- layer.SetParentOrigin( ParentOrigin::CENTER );
- layer.SetAnchorPoint( AnchorPoint::CENTER );
+ layer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ layer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
layer.Add( mRoot );
Actor self = Self();
// 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.Add( layer );
CreateScene();
#include <dali/public-api/object/type-registry-helper.h>
#include <dali/integration-api/debug.h>
#include <dali/devel-api/object/property-helper-devel.h>
+#include <dali/devel-api/actors/actor-devel.h>
// INTERNAL INCLUDES
#include <dali-toolkit/devel-api/asset-manager/asset-manager.h>
{
const std::string imageDirPath = AssetManager::GetDaliImagePath();
Toolkit::ImageView indicator = Toolkit::ImageView::New( imageDirPath + DEFAULT_INDICATOR_IMAGE_FILE_NAME );
- indicator.SetParentOrigin( ParentOrigin::TOP_LEFT );
- indicator.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ indicator.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ indicator.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
indicator.SetStyleName( "ScrollBarIndicator" );
indicator.SetColorMode( USE_OWN_MULTIPLY_PARENT_COLOR );
SetScrollIndicator(indicator);
// Set indicator height according to the indicator's height policy
if(mIndicatorHeightPolicy == Toolkit::ScrollBar::Fixed)
{
- mIndicator.SetSize(Self().GetCurrentSize().width, mIndicatorFixedHeight);
+ mIndicator.SetSize(Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, mIndicatorFixedHeight);
}
else
{
if( mIndicatorFirstShow )
{
// Preserve the alpha value from the stylesheet
- mIndicatorShowAlpha = Self().GetCurrentColor().a;
+ mIndicatorShowAlpha = Self().GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a;
mIndicatorFirstShow = false;
}
}
else
{
- mIndicator.SetOpacity(mIndicatorShowAlpha);
+ mIndicator.SetProperty( DevelActor::Property::OPACITY,mIndicatorShowAlpha);
}
}
}
else
{
- mIndicator.SetOpacity(0.0f);
+ mIndicator.SetProperty( DevelActor::Property::OPACITY,0.0f);
}
}
}
else
{
- mIndicator.SetOpacity(mIndicatorShowAlpha);
+ mIndicator.SetProperty( DevelActor::Property::OPACITY,mIndicatorShowAlpha);
}
mAnimation.AnimateTo( Property( mIndicator, Actor::Property::COLOR_ALPHA ),
0.0f, AlphaFunction::EASE_IN, TimePeriod((mIndicatorShowDuration + mTransientIndicatorDuration), mIndicatorHideDuration) );
// The domain size is the internal range
float domainSize = maxScrollPosition - minScrollPosition;
- float logicalSize = Self().GetCurrentSize().y - ( mIndicator.GetCurrentSize().y + mIndicatorStartPadding + mIndicatorEndPadding );
+ float logicalSize = Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).y - ( mIndicator.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).y + mIndicatorStartPadding + mIndicatorEndPadding );
mCurrentScrollPosition = mScrollStart - ( ( mGestureDisplacement.y * domainSize ) / logicalSize );
mCurrentScrollPosition = -std::min( maxScrollPosition, std::max( -mCurrentScrollPosition, minScrollPosition ) );
if(mIndicatorHeightPolicy == Toolkit::ScrollBar::Fixed)
{
- mIndicator.SetSize(Self().GetCurrentSize().width, mIndicatorFixedHeight);
+ mIndicator.SetSize(Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, mIndicatorFixedHeight);
}
}
* // set size and color
* bounceActor.SetSize(720.f, 42.f );
- * bounceActor.SetColor( Vector4( 0.0,0.64f,0.85f,0.25f ) );
+ * bounceActor.SetProperty( Actor::Property::COLOR, Vector4( 0.0,0.64f,0.85f,0.25f ) );
*
* // add to stage
- * bounceActor.SetParentOrigin(ParentOrigin::CENTER);
+ * bounceActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
* Stage::GetCurrent().Add(bounceActor);
* // start the bouncing animation
{
ItemRange range = GetItemRange(*mActiveLayout, mActiveLayoutTargetSize, currentLayoutPosition, cacheExtra/*reserve extra*/);
RemoveActorsOutsideRange( range );
- AddActorsWithinRange( range, Self().GetCurrentSize() );
+ AddActorsWithinRange( range, Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) );
mScrollUpdatedSignal.Emit( Vector2(0.0f, currentLayoutPosition) );
}
void ItemView::InsertItem( Item newItem, float durationSeconds )
{
mAddingItems = true;
- Vector3 layoutSize = Self().GetCurrentSize();
+ Vector3 layoutSize = Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE );
Actor displacedActor;
ItemIter afterDisplacedIter = mItemPool.end();
void ItemView::InsertItems( const ItemContainer& newItems, float durationSeconds )
{
mAddingItems = true;
- Vector3 layoutSize = Self().GetCurrentSize();
+ Vector3 layoutSize = Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE );
// Insert from lowest id to highest
ItemContainer sortedItems(newItems);
void ItemView::ReplaceItem( Item replacementItem, float durationSeconds )
{
mAddingItems = true;
- Vector3 layoutSize = Self().GetCurrentSize();
+ Vector3 layoutSize = Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE );
SetupActor( replacementItem, layoutSize );
Self().Add( replacementItem.second );
// Total number of items may change dynamically.
// Always recalculate the domain size to reflect that.
- CalculateDomainSize(Self().GetCurrentSize());
+ CalculateDomainSize(Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
}
void ItemView::AddNewActor( unsigned int itemId, const Vector3& layoutSize )
void ItemView::SetupActor( Item item, const Vector3& layoutSize )
{
- item.second.SetParentOrigin( mItemsParentOrigin );
- item.second.SetAnchorPoint( mItemsAnchorPoint );
+ item.second.SetProperty( Actor::Property::PARENT_ORIGIN, mItemsParentOrigin );
+ item.second.SetProperty( Actor::Property::ANCHOR_POINT, mItemsAnchorPoint );
if( mActiveLayout )
{
if (mActiveLayout)
{
Actor self = Self();
- const Vector3 layoutSize = Self().GetCurrentSize();
+ const Vector3 layoutSize = Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE );
float layoutPositionDelta = GetCurrentLayoutPosition(0) - (event.z * mWheelScrollDistanceStep * mActiveLayout->GetScrollSpeedFactor());
float firstItemScrollPosition = ClampFirstItemPosition(layoutPositionDelta, layoutSize, *mActiveLayout);
void ItemView::ReapplyAllConstraints()
{
- Vector3 layoutSize = Self().GetCurrentSize();
+ Vector3 layoutSize = Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE );
for (ConstItemIter iter = mItemPool.begin(); iter != mItemPool.end(); ++iter)
{
void ItemView::OnItemsRemoved()
{
- CalculateDomainSize(Self().GetCurrentSize());
+ CalculateDomainSize(Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
// Adjust scroll-position after an item is removed
if( mActiveLayout )
{
- float firstItemScrollPosition = ClampFirstItemPosition(GetCurrentLayoutPosition(0), Self().GetCurrentSize(), *mActiveLayout);
+ float firstItemScrollPosition = ClampFirstItemPosition(GetCurrentLayoutPosition(0), Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), *mActiveLayout);
Self().SetProperty( Toolkit::ItemView::Property::LAYOUT_POSITION, firstItemScrollPosition );
}
}
void ItemView::OnPan( const PanGesture& gesture )
{
Actor self = Self();
- const Vector3 layoutSize = Self().GetCurrentSize();
+ const Vector3 layoutSize = Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE );
RemoveAnimation(mScrollAnimation);
}
}
float layoutPosition = mActiveLayout->GetClosestAnchorPosition( GetCurrentLayoutPosition(0) );
- Vector3 layoutSize = Self().GetCurrentSize();
+ Vector3 layoutSize = Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE );
if(!nextFocusActor)
{
// likely the current item is not buffered, so not in our item pool, probably best to get first viewable item
{
int nextItemID = GetItemId(commitedFocusableActor);
float layoutPosition = GetCurrentLayoutPosition(0);
- Vector3 layoutSize = Self().GetCurrentSize();
+ Vector3 layoutSize = Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE );
float scrollTo = mActiveLayout->GetClosestOnScreenLayoutPosition(nextItemID, layoutPosition, layoutSize);
ScrollTo(Vector2(0.0f, scrollTo), DEFAULT_KEYBOARD_FOCUS_SCROLL_DURATION);
void ItemView::ScrollToItem(unsigned int itemId, float durationSeconds)
{
Actor self = Self();
- const Vector3 layoutSize = Self().GetCurrentSize();
+ const Vector3 layoutSize = Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE );
float firstItemScrollPosition = ClampFirstItemPosition(mActiveLayout->GetItemScrollToPosition(itemId), layoutSize, *mActiveLayout);
if(durationSeconds > 0.0f)
Vector2 ItemView::GetCurrentScrollPosition() const
{
- return Vector2(0.0f, GetScrollPosition(GetCurrentLayoutPosition(0), Self().GetCurrentSize()));
+ return Vector2(0.0f, GetScrollPosition(GetCurrentLayoutPosition(0), Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE )));
}
void ItemView::AddOverlay(Actor actor)
void ItemView::ScrollTo(const Vector2& position, float duration)
{
Actor self = Self();
- const Vector3 layoutSize = Self().GetCurrentSize();
+ const Vector3 layoutSize = Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE );
float firstItemScrollPosition = ClampFirstItemPosition(position.y, layoutSize, *mActiveLayout);
mOvershootEffectColor = color;
if( mOvershootOverlay )
{
- mOvershootOverlay.SetColor( color );
+ mOvershootOverlay.SetProperty( Actor::Property::COLOR, color );
}
}
{
Property::Index effectOvershootPropertyIndex = Property::INVALID_INDEX;
mOvershootOverlay = CreateBouncingEffectActor( effectOvershootPropertyIndex );
- mOvershootOverlay.SetColor(mOvershootEffectColor);
- mOvershootOverlay.SetParentOrigin(ParentOrigin::TOP_LEFT);
- mOvershootOverlay.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ mOvershootOverlay.SetProperty( Actor::Property::COLOR,mOvershootEffectColor);
+ mOvershootOverlay.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT );
+ mOvershootOverlay.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
mOvershootOverlay.SetDrawMode( DrawMode::OVERLAY_2D );
self.Add(mOvershootOverlay);
Actor self = Self();
float scrollDistance = CalculateScrollDistance(mTotalPanDisplacement, *mActiveLayout) * mActiveLayout->GetScrollSpeedFactor();
float positionDelta = GetCurrentLayoutPosition(0) + scrollDistance;
- float minLayoutPosition = mActiveLayout->GetMinimumLayoutPosition(mItemFactory.GetNumberOfItems(), Self().GetCurrentSize());
+ float minLayoutPosition = mActiveLayout->GetMinimumLayoutPosition(mItemFactory.GetNumberOfItems(), Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
self.SetProperty(Toolkit::Scrollable::Property::SCROLL_POSITION_MAX, Vector2(0.0f, -minLayoutPosition));
float clamppedPosition = std::min(0.0f, std::max(minLayoutPosition, positionDelta));
overshoot = positionDelta - clamppedPosition;
if (mOvershootOverlay)
{
- duration = mOvershootOverlay.GetCurrentSize().height * (animatingOn ? (1.0f - fabsf(currentOvershoot)) : fabsf(currentOvershoot)) / mOvershootAnimationSpeed;
+ duration = mOvershootOverlay.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).height * (animatingOn ? (1.0f - fabsf(currentOvershoot)) : fabsf(currentOvershoot)) / mOvershootAnimationSpeed;
}
// Mark the animation as in progress to prevent manual property sets overwriting it.
mItemsParentOrigin = parentOrigin;
for (ItemIter iter = mItemPool.begin(); iter != mItemPool.end(); ++iter)
{
- iter->second.SetParentOrigin(parentOrigin);
+ iter->second.SetProperty( Actor::Property::PARENT_ORIGIN,parentOrigin );
}
}
}
mItemsAnchorPoint = anchorPoint;
for (ItemIter iter = mItemPool.begin(); iter != mItemPool.end(); ++iter)
{
- iter->second.SetAnchorPoint(anchorPoint);
+ iter->second.SetProperty( Actor::Property::ANCHOR_POINT,anchorPoint);
}
}
}
mAnimationStateFlags(0)
{
mOvershootOverlay = CreateBouncingEffectActor(mEffectOvershootProperty);
- mOvershootOverlay.SetColor(mAttachedScrollView.GetOvershootEffectColor());
- mOvershootOverlay.SetParentOrigin(ParentOrigin::TOP_LEFT);
- mOvershootOverlay.SetAnchorPoint(AnchorPoint::TOP_LEFT);
- mOvershootOverlay.SetVisible(false);
+ mOvershootOverlay.SetProperty( Actor::Property::COLOR,mAttachedScrollView.GetOvershootEffectColor());
+ mOvershootOverlay.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT );
+ mOvershootOverlay.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+ mOvershootOverlay.SetProperty( Actor::Property::VISIBLE,false);
}
void ScrollOvershootEffectRipple::Reset()
{
- mOvershootOverlay.SetVisible(false);
+ mOvershootOverlay.SetProperty( Actor::Property::VISIBLE,false);
mOvershootOverlay.SetProperty( mEffectOvershootProperty, 0.f);
}
{
if(mOvershootOverlay)
{
- mOvershootOverlay.SetColor(color);
+ mOvershootOverlay.SetProperty( Actor::Property::COLOR,color);
}
}
void ScrollOvershootEffectRipple::UpdateVisibility( bool visible )
{
- mOvershootOverlay.SetVisible(visible);
+ mOvershootOverlay.SetProperty( Actor::Property::VISIBLE,visible);
// make sure overshoot image is correctly placed
if( visible )
{
if(mOvershoot > 0.0f)
{
// positive overshoot
- const Vector3 size = mOvershootOverlay.GetCurrentSize();
+ const Vector3 size = mOvershootOverlay.GetCurrentProperty< Vector3 >( Actor::Property::SIZE );
Vector3 relativeOffset;
- const Vector3 parentSize = self.GetCurrentSize();
+ const Vector3 parentSize = self.GetCurrentProperty< Vector3 >( Actor::Property::SIZE );
if(IsVertical())
{
mOvershootOverlay.SetOrientation( Quaternion( Radian( 0.0f ), Vector3::ZAXIS ) );
else
{
// negative overshoot
- const Vector3 size = mOvershootOverlay.GetCurrentSize();
+ const Vector3 size = mOvershootOverlay.GetCurrentProperty< Vector3 >( Actor::Property::SIZE );
Vector3 relativeOffset;
- const Vector3 parentSize = self.GetCurrentSize();
+ const Vector3 parentSize = self.GetCurrentProperty< Vector3 >( Actor::Property::SIZE );
if(IsVertical())
{
mOvershootOverlay.SetOrientation( Quaternion( Radian( Math::PI ), Vector3::ZAXIS ) );
if( animate && overshootAnimationSpeed > Math::MACHINE_EPSILON_0 )
{
float currentOvershoot = fabsf( mOvershootOverlay.GetProperty( mEffectOvershootProperty ).Get<float>() );
- float duration = mOvershootOverlay.GetCurrentSize().height * (animatingOn ? (1.0f - currentOvershoot) : currentOvershoot) / overshootAnimationSpeed;
+ float duration = mOvershootOverlay.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).height * (animatingOn ? (1.0f - currentOvershoot) : currentOvershoot) / overshootAnimationSpeed;
if( duration > Math::MACHINE_EPSILON_0 )
{
if( mAnimationStateFlags & AnimatingOut )
{
// should now be offscreen
- mOvershootOverlay.SetVisible(false);
+ mOvershootOverlay.SetProperty( Actor::Property::VISIBLE,false);
}
if( (mAnimationStateFlags & AnimateBack) )
{
*/
Vector3 GetPositionOfAnchor(Actor &actor, const Vector3 &anchor)
{
- Vector3 childPosition = actor.GetCurrentPosition();
- Vector3 childAnchor = - actor.GetCurrentAnchorPoint() + anchor;
- Vector3 childSize = actor.GetCurrentSize();
+ Vector3 childPosition = actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
+ Vector3 childAnchor = - actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ) + anchor;
+ Vector3 childSize = actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE );
return childPosition + childAnchor * childSize;
}
mInternalActor = Actor::New();
self.Add(mInternalActor);
- mInternalActor.SetParentOrigin(ParentOrigin::CENTER);
- mInternalActor.SetAnchorPoint(AnchorPoint::CENTER);
+ mInternalActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER );
+ mInternalActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
mInternalActor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
mAlterChild = true;
DALI_ASSERT_ALWAYS(actor.GetParent() == Self());
Actor self = Self();
- Vector3 size = self.GetCurrentSize();
- Vector3 position = actor.GetCurrentPosition();
+ Vector3 size = self.GetCurrentProperty< Vector3 >( Actor::Property::SIZE );
+ Vector3 position = actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
Vector2 prePosition = GetPropertyPrePosition();
position.GetVectorXY() -= prePosition;
Actor ScrollView::FindClosestActor()
{
Actor self = Self();
- Vector3 size = self.GetCurrentSize();
+ Vector3 size = self.GetCurrentProperty< Vector3 >( Actor::Property::SIZE );
return FindClosestActorToPosition(Vector3(size.width * 0.5f,size.height * 0.5f,0.0f));
}
if(mActorAutoSnapEnabled)
{
- Vector3 size = Self().GetCurrentSize();
+ Vector3 size = Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE );
Actor child = FindClosestActorToPosition( Vector3(size.width * 0.5f,size.height * 0.5f,0.0f), horizontal, vertical );
if( scrollBar )
{
mScrollBar = scrollBar;
- scrollBar.SetName("ScrollBar");
+ scrollBar.SetProperty( Dali::Actor::Property::NAME,"ScrollBar");
mInternalActor.Add( scrollBar );
if( scrollBar.GetScrollDirection() == Toolkit::ScrollBar::Horizontal )
Toolkit::ScrollBar scrollBar = mScrollBar.GetHandle();
if( scrollBar && mTransientScrollBar )
{
- Vector3 size = Self().GetCurrentSize();
+ Vector3 size = Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE );
const Toolkit::RulerDomain& rulerDomainX = mRulerX->GetDomain();
const Toolkit::RulerDomain& rulerDomainY = mRulerY->GetDomain();
Vector2 ScrollView::GetOvershoot(Vector2& position) const
{
- Vector3 size = Self().GetCurrentSize();
+ Vector3 size = Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE );
Vector2 overshoot;
const RulerDomain rulerDomainX = mRulerX->GetDomain();
void ScrollView::ClampPosition(Vector2& position, ClampState2D &clamped) const
{
- Vector3 size = Self().GetCurrentSize();
+ Vector3 size = Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE );
position.x = -mRulerX->Clamp(-position.x, size.width, 1.0f, clamped.x); // NOTE: X & Y rulers think in -ve coordinate system.
position.y = -mRulerY->Clamp(-position.y, size.height, 1.0f, clamped.y); // That is scrolling RIGHT (e.g. 100.0, 0.0) means moving LEFT.
mShadowPlaneBg = shadowPlaneBackground;
mShadowPlane = Actor::New();
- mShadowPlane.SetName( "SHADOW_PLANE" );
- mShadowPlane.SetParentOrigin( ParentOrigin::CENTER );
- mShadowPlane.SetAnchorPoint( AnchorPoint::CENTER );
+ mShadowPlane.SetProperty( Actor::Property::NAME, "SHADOW_PLANE" );
+ mShadowPlane.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ mShadowPlane.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
Renderer shadowRenderer = CreateRenderer( RENDER_SHADOW_VERTEX_SOURCE, RENDER_SHADOW_FRAGMENT_SOURCE, Shader::Hint::OUTPUT_IS_TRANSPARENT, Uint16Pair(20,20) );
TextureSet textureSet = shadowRenderer.GetTextures();
textureSet.SetTexture( 0u, mOutputFrameBuffer.GetColorTexture() );
// Rather than parent the shadow plane drawable and have constraints to move it to the same
// position, instead parent the shadow plane drawable on the shadow plane passed in.
mShadowPlaneBg.Add( mShadowPlane );
- mShadowPlane.SetParentOrigin( ParentOrigin::CENTER );
+ mShadowPlane.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mShadowPlane.SetZ( 1.0f );
ConstrainCamera();
void ShadowView::OnInitialize()
{
// root actor to parent all user added actors. Used as source actor for shadow render task.
- mChildrenRoot.SetParentOrigin( ParentOrigin::CENTER );
+ mChildrenRoot.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mChildrenRoot.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
Vector2 stageSize = Stage::GetCurrent().GetSize();
mCameraActor = CameraActor::New(stageSize);
- mCameraActor.SetParentOrigin( ParentOrigin::CENTER );
+ mCameraActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
// Target is constrained to point at the shadow plane origin
mCameraActor.SetNearClippingPlane( 1.0f );
mBlurFilter.SetPixelFormat( Pixel::RGBA8888 );
mBlurRootActor = Actor::New();
- mBlurRootActor.SetName( "BLUR_ROOT_ACTOR" );
+ mBlurRootActor.SetProperty( Actor::Property::NAME, "BLUR_ROOT_ACTOR" );
// Turn off inheritance to ensure filter renders properly
- mBlurRootActor.SetParentOrigin( ParentOrigin::CENTER );
- mBlurRootActor.SetInheritPosition( false );
- mBlurRootActor.SetInheritOrientation( false );
- mBlurRootActor.SetInheritScale( false );
+ mBlurRootActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ mBlurRootActor.SetProperty( Actor::Property::INHERIT_POSITION, false );
+ mBlurRootActor.SetProperty( Actor::Property::INHERIT_ORIENTATION, false );
+ mBlurRootActor.SetProperty( Actor::Property::INHERIT_SCALE, false );
mBlurRootActor.SetColorMode( USE_OWN_COLOR );
Self().Add( mBlurRootActor );
Actor Slider::CreateHitRegion()
{
Actor hitRegion = Actor::New();
- hitRegion.SetParentOrigin( ParentOrigin::CENTER );
- hitRegion.SetAnchorPoint( AnchorPoint::CENTER );
+ hitRegion.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ hitRegion.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
hitRegion.TouchSignal().Connect( this, &Slider::OnTouch );
return hitRegion;
Toolkit::ImageView Slider::CreateTrack()
{
Toolkit::ImageView track = Toolkit::ImageView::New();
- track.SetName("SliderTrack");
- track.SetParentOrigin( ParentOrigin::CENTER );
- track.SetAnchorPoint( AnchorPoint::CENTER );
+ track.SetProperty( Dali::Actor::Property::NAME,"SliderTrack");
+ track.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ track.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
return track;
}
Toolkit::ImageView Slider::CreateProgress()
{
Toolkit::ImageView progress = Toolkit::ImageView::New();
- progress.SetName("SliderProgress");
- progress.SetParentOrigin( ParentOrigin::CENTER_LEFT );
- progress.SetAnchorPoint( AnchorPoint::CENTER_LEFT );
+ progress.SetProperty( Dali::Actor::Property::NAME,"SliderProgress");
+ progress.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT );
+ progress.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT );
return progress;
}
Toolkit::ImageView Slider::CreateHandle()
{
Toolkit::ImageView handle = Toolkit::ImageView::New();
- handle.SetName("SliderHandle");
- handle.SetParentOrigin( ParentOrigin::CENTER_LEFT );
- handle.SetAnchorPoint( AnchorPoint::CENTER );
+ handle.SetProperty( Dali::Actor::Property::NAME,"SliderHandle");
+ handle.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT );
+ handle.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
return handle;
}
{
Toolkit::ImageView arrow = Toolkit::ImageView::New();
arrow.SetStyleName("SliderPopupArrow");
- arrow.SetName("SliderPopupArrow");
- arrow.SetParentOrigin( ParentOrigin::BOTTOM_CENTER );
- arrow.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER );
+ arrow.SetProperty( Dali::Actor::Property::NAME,"SliderPopupArrow");
+ arrow.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER );
+ arrow.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER );
return arrow;
}
Toolkit::TextLabel Slider::CreatePopupText()
{
Toolkit::TextLabel textLabel = Toolkit::TextLabel::New();
- textLabel.SetName( "SliderPopupTextLabel" );
+ textLabel.SetProperty( Dali::Actor::Property::NAME, "SliderPopupTextLabel" );
textLabel.SetStyleName( "SliderPopupTextLabel" );
- textLabel.SetParentOrigin( ParentOrigin::CENTER );
- textLabel.SetAnchorPoint( AnchorPoint::CENTER );
+ textLabel.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ textLabel.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
textLabel.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
textLabel.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
textLabel.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
Toolkit::ImageView Slider::CreatePopup()
{
Toolkit::ImageView popup = Toolkit::ImageView::New();
- popup.SetName( "SliderPopup" );
- popup.SetParentOrigin( ParentOrigin::TOP_CENTER );
- popup.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER );
+ popup.SetProperty( Dali::Actor::Property::NAME, "SliderPopup" );
+ popup.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER );
+ popup.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER );
popup.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::WIDTH );
mValueTextLabel = CreatePopupText();
if( mHandle && !mHandleValueTextLabel )
{
mHandleValueTextLabel = Toolkit::TextLabel::New();
- mHandleValueTextLabel.SetName("SliderHandleTextLabel");
+ mHandleValueTextLabel.SetProperty( Dali::Actor::Property::NAME,"SliderHandleTextLabel");
mHandleValueTextLabel.SetStyleName("SliderHandleTextLabel");
- mHandleValueTextLabel.SetParentOrigin( ParentOrigin::CENTER );
- mHandleValueTextLabel.SetAnchorPoint( AnchorPoint::CENTER );
+ mHandleValueTextLabel.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ mHandleValueTextLabel.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mHandleValueTextLabel.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
mHandleValueTextLabel.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
mHandle.Add( mHandleValueTextLabel );
Actor Slider::CreateValueDisplay()
{
Actor popup = Actor::New();
- popup.SetParentOrigin( ParentOrigin::TOP_CENTER );
- popup.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER );
+ popup.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER );
+ popup.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER );
mPopupArrow = CreatePopupArrow();
popup.Add( mPopupArrow );
{
case NORMAL:
{
- mTrack.SetColor( Color::WHITE );
- mHandle.SetColor( Color::WHITE );
- mProgress.SetColor( Color::WHITE );
+ mTrack.SetProperty( Actor::Property::COLOR, Color::WHITE );
+ mHandle.SetProperty( Actor::Property::COLOR, Color::WHITE );
+ mProgress.SetProperty( Actor::Property::COLOR, Color::WHITE );
break;
}
case DISABLED:
{
Vector4 disabledColor = GetDisabledColor();
- mTrack.SetColor( disabledColor );
- mHandle.SetColor( disabledColor );
- mProgress.SetColor( disabledColor );
+ mTrack.SetProperty( Actor::Property::COLOR, disabledColor );
+ mHandle.SetProperty( Actor::Property::COLOR, disabledColor );
+ mProgress.SetProperty( Actor::Property::COLOR, disabledColor );
break;
}
case PRESSED:
if( !mValueDisplay )
{
mValueDisplay = CreateValueDisplay();
- mValueDisplay.SetVisible( false );
+ mValueDisplay.SetProperty( Actor::Property::VISIBLE, false );
mHandle.Add( mValueDisplay );
CreatePopupImage( GetPopupVisual() );
{
if( mValueDisplay )
{
- mValueDisplay.SetVisible( false );
+ mValueDisplay.SetProperty( Actor::Property::VISIBLE, false );
}
return false;
if( mValueDisplay )
{
- mValueDisplay.SetVisible( true );
+ mValueDisplay.SetProperty( Actor::Property::VISIBLE, true );
mValueTimer.SetInterval( VALUE_VIEW_SHOW_DURATION );
}
GAUSSIAN_BLUR_BELL_CURVE_WIDTH + GAUSSIAN_BLUR_BELL_CURVE_WIDTH_INCREMENTATION*static_cast<float>(idx),
GAUSSIAN_BLUR_RENDER_TARGET_PIXEL_FORMAT,
GAUSSIAN_BLUR_DOWNSAMPLE_WIDTH_SCALE, GAUSSIAN_BLUR_DOWNSAMPLE_HEIGHT_SCALE, true );
- mGaussianBlurView[idx].SetParentOrigin(ParentOrigin::CENTER);
+ mGaussianBlurView[idx].SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER );
mGaussianBlurView[idx].SetSize(mTargetSize);
Stage::GetCurrent().Add( mGaussianBlurView[idx] );
if( data.actor )
{
actor = 'A';
- actorName = data.actor.GetName();
+ actorName = data.actor.GetProperty< std::string >( Dali::Actor::Property::NAME );
}
TV_LOG("Array[%d,%d]=%c %s %d,%d,%d,%d ", i, j, actor, actorName.c_str(),
data.position.rowIndex, data.position.columnIndex,
// Anchor actor to top left of the cell
if( actor.GetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT ).Get< bool >() )
{
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
}
- actor.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
Padding padding;
actor.GetPadding( padding );
// Creates an extra control to be used as stencil buffer.
mStencil = Control::New();
- mStencil.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- mStencil.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ mStencil.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ mStencil.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
// Creates a background visual. Even if the color is transparent it updates the stencil.
mStencil.SetProperty( Toolkit::Control::Property::BACKGROUND,
}
else
{
- actor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Self().Add( actor );
mActiveLayer = actor;
}
{
mScrollBar = Toolkit::ScrollBar::New( Toolkit::ScrollBar::Vertical );
mScrollBar.SetIndicatorHeightPolicy( Toolkit::ScrollBar::Variable );
- mScrollBar.SetParentOrigin( ParentOrigin::TOP_RIGHT );
- mScrollBar.SetAnchorPoint( AnchorPoint::TOP_RIGHT );
+ mScrollBar.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_RIGHT );
+ mScrollBar.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_RIGHT );
mScrollBar.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::HEIGHT );
mScrollBar.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::WIDTH );
{
mAnimation = Animation::New( mAnimationPeriod.durationSeconds );
}
- indicator.SetOpacity(1.0f);
+ indicator.SetProperty( DevelActor::Property::OPACITY,1.0f);
mAnimation.AnimateTo( Property( indicator, Actor::Property::COLOR_ALPHA ), 0.0f, AlphaFunction::EASE_IN, mAnimationPeriod );
mAnimation.Play();
mAnimation.FinishedSignal().Connect( this, &TextEditor::OnScrollIndicatorAnimationFinished );
self.Add( *it );
it->LowerToBottom();
- if ( it->GetName() == "HighlightActor" )
+ if ( it->GetProperty< std::string >( Dali::Actor::Property::NAME ) == "HighlightActor" )
{
highlightActor = *it;
}
}
else
{
- actor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Self().Add( actor );
mActiveLayer = actor;
}
{
// Creates an extra control to be used as stencil buffer.
mStencil = Control::New();
- mStencil.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- mStencil.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ mStencil.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ mStencil.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
// Creates a background visual. Even if the color is transparent it updates the stencil.
mStencil.SetProperty( Toolkit::Control::Property::BACKGROUND,
DALI_LOG_INFO( gLogFilter, Debug::General, "TextSelectionPopup::AddOption\n" );
Toolkit::PushButton option = Toolkit::PushButton::New();
- option.SetName( button.name );
+ option.SetProperty( Dali::Actor::Property::NAME, button.name );
option.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
switch( button.id )
Toolkit::Control divider = Toolkit::Control::New();
#ifdef DECORATOR_DEBUG
- divider.SetName("Text's popup divider");
+ divider.SetProperty( Dali::Actor::Property::NAME,"Text's popup divider");
#endif
divider.SetSize( size );
divider.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::HEIGHT );
{
mToolbar.SetProperty( Toolkit::TextSelectionToolbar::Property::MAX_SIZE, mPopupMaxSize );
}
- mToolbar.SetParentOrigin( ParentOrigin::CENTER );
+ mToolbar.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
#ifdef DECORATOR_DEBUG
- mToolbar.SetName("TextSelectionToolbar");
+ mToolbar.SetProperty( Dali::Actor::Property::NAME,"TextSelectionToolbar");
#endif
self.Add( mToolbar );
}
mMaxSize = maxSize;
if (mScrollView && mToolbarLayer )
{
- mScrollView.SetMaximumSize( mMaxSize );
- mToolbarLayer.SetMaximumSize( mMaxSize );
+ mScrollView.SetProperty( Actor::Property::MAXIMUM_SIZE, mMaxSize );
+ mToolbarLayer.SetProperty( Actor::Property::MAXIMUM_SIZE, mMaxSize );
}
}
void TextSelectionToolbar::SetUpScrollView()
{
- mScrollView.SetName("TextSelectionScrollView");
+ mScrollView.SetProperty( Dali::Actor::Property::NAME,"TextSelectionScrollView");
mScrollView.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::ALL_DIMENSIONS );
- mScrollView.SetParentOrigin( ParentOrigin::CENTER_LEFT );
- mScrollView.SetAnchorPoint( AnchorPoint::CENTER_LEFT );
+ mScrollView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT );
+ mScrollView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT );
mScrollView.SetScrollingDirection( PanGestureDetector::DIRECTION_HORIZONTAL, Degree( 40.0f ) );
mScrollView.SetAxisAutoLock( true );
// Create Layer to house the toolbar.
mToolbarLayer = Layer::New();
mToolbarLayer.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::ALL_DIMENSIONS );
- mToolbarLayer.SetAnchorPoint( AnchorPoint::CENTER );
- mToolbarLayer.SetParentOrigin( ParentOrigin::CENTER );
+ mToolbarLayer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ mToolbarLayer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
if( !mScrollView )
{
// Toolbar must start with at least one option, adding further options with increase it's size
mTableOfButtons = Dali::Toolkit::TableView::New( 1, 1 );
mTableOfButtons.SetFitHeight( 0 );
- mTableOfButtons.SetParentOrigin( ParentOrigin::CENTER_LEFT );
- mTableOfButtons.SetAnchorPoint( AnchorPoint::CENTER_LEFT );
+ mTableOfButtons.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT );
+ mTableOfButtons.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT );
mScrollView.Add( mTableOfButtons );
mToolbarLayer.Add( mScrollView );
if( ! mScrollBar )
{
Toolkit::ImageView indicator = Toolkit::ImageView::New();
- indicator.SetParentOrigin( ParentOrigin::TOP_LEFT );
- indicator.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ indicator.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ indicator.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
indicator.SetStyleName( "TextSelectionScrollIndicator" );
mScrollBar = Toolkit::ScrollBar::New( Toolkit::ScrollBar::Horizontal );
- mScrollBar.SetName( "Text popup scroll bar" );
+ mScrollBar.SetProperty( Dali::Actor::Property::NAME, "Text popup scroll bar" );
mScrollBar.SetStyleName( "TextSelectionScrollBar" );
- mScrollBar.SetParentOrigin( ParentOrigin::BOTTOM_LEFT );
- mScrollBar.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ mScrollBar.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_LEFT );
+ mScrollBar.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
mScrollBar.SetPosition( mScrollBarPadding.x, -mScrollBarPadding.y );
mScrollBar.SetResizePolicy( Dali::ResizePolicy::FIT_TO_CHILDREN, Dali::Dimension::WIDTH );
mScrollBar.SetOrientation( Quaternion( Radian( 1.5f * Math::PI ), Vector3::ZAXIS ) );
{
mScrollView.SetOvershootEnabled( true );
}
- mTableOfButtons.SetSensitive( false );
+ mTableOfButtons.SetProperty( Actor::Property::SENSITIVE, false );
}
void TextSelectionToolbar::OnScrollCompleted( const Vector2& position )
{
mFirstScrollEnd = true;
- mTableOfButtons.SetSensitive( true );
+ mTableOfButtons.SetProperty( Actor::Property::SENSITIVE, true );
}
void TextSelectionToolbar::AddOption( Actor& option )
// Layout
mLayout = Toolkit::TableView::New( 1, 1 );
- mLayout.SetName( "TOOLBAR_LAYOUT" );
+ mLayout.SetProperty( Dali::Actor::Property::NAME, "TOOLBAR_LAYOUT" );
mLayout.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
- mLayout.SetParentOrigin( ParentOrigin::CENTER );
+ mLayout.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Self().Add( mLayout );
if( connectSignals && ! mSignalsConnected )
{
control.HoveredSignal().Connect( this, &Tooltip::OnHovered );
- control.SetLeaveRequired( true );
+ control.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
mSignalsConnected = true;
}
}
mPopup.SetProperty( Toolkit::Popup::Property::ANIMATION_MODE, "NONE" );
mPopup.SetProperty( Toolkit::Popup::Property::BACKING_ENABLED, false ); // Disable the dimmed backing.
mPopup.SetProperty( Toolkit::Popup::Property::TOUCH_TRANSPARENT, true ); // Let events pass through the popup
- mPopup.SetParentOrigin( ParentOrigin::TOP_LEFT );
- mPopup.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ mPopup.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ mPopup.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Background
mPopup.SetProperty( Toolkit::Popup::Property::POPUP_BACKGROUND_IMAGE, mBackgroundImage );
Toolkit::Control control = mControl.GetHandle();
if( control )
{
- Vector3 worldPos = control.GetCurrentWorldPosition();
+ Vector3 worldPos = control.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION );
float height = control.GetRelayoutSize( Dimension::HEIGHT );
position.x = stageSize.width * 0.5f + worldPos.x - popupWidth * 0.5f;
Toolkit::Control control = mControl.GetHandle();
if( control )
{
- Vector3 worldPos = control.GetCurrentWorldPosition();
+ Vector3 worldPos = control.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION );
float height = control.GetRelayoutSize( Dimension::HEIGHT );
position.x = stageSize.width * 0.5f + worldPos.x - popupWidth * 0.5f;
if( yPosChanged && tail )
{
// If we change the y position, then the tail may be shown pointing to the wrong control so just hide it.
- tail.SetVisible( false );
+ tail.SetProperty( Actor::Property::VISIBLE, false );
}
mPopup.SetPosition( position );
Actor self( Self() );
bool positionUsesAnchorPoint = self.GetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT ).Get< bool >();
- Vector3 actorSize = self.GetCurrentSize() * self.GetCurrentScale();
- Vector3 anchorPointOffSet = actorSize * ( positionUsesAnchorPoint ? self.GetCurrentAnchorPoint() : AnchorPoint::TOP_LEFT );
+ Vector3 actorSize = self.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) * self.GetCurrentProperty< Vector3 >( Actor::Property::SCALE );
+ Vector3 anchorPointOffSet = actorSize * ( positionUsesAnchorPoint ? self.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ) : AnchorPoint::TOP_LEFT );
Vector2 screenPosition = self.GetProperty( DevelActor::Property::SCREEN_POSITION ).Get< Vector2 >();
mShadowControl.SetPosition(actorPos);
mShadowControl.SetSize(width, height);
mShadowControl.SetBackgroundColor(Vector4(0.3f, 0.3f, 0.3f, 0.7f));
- mShadowControl.SetParentOrigin(control.GetCurrentParentOrigin());
- mShadowControl.SetAnchorPoint(control.GetCurrentAnchorPoint());
+ mShadowControl.SetProperty( Actor::Property::PARENT_ORIGIN, control.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ) );
+ mShadowControl.SetProperty( Actor::Property::ANCHOR_POINT,control.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ));
control.GetParent().Add(mShadowControl);
SetPosition(gesture.screenPosition);
EmitStartedSignal(control);
{
SetPosition(data.GetScreenPosition(0));
ClearContent();
- SetContent(mDragControl.GetName());
+ SetContent(mDragControl.GetProperty< std::string >( Dali::Actor::Property::NAME ));
EmitDroppedSignal(control);
}
// create actor to render input with applied emboss effect
mActorForInput = Actor::New();
- mActorForInput.SetParentOrigin( ParentOrigin::CENTER );
+ mActorForInput.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mActorForInput.SetSize( mTargetSize );
Renderer rendererForInput = CreateRenderer( BASIC_VERTEX_SOURCE, fragmentSource.c_str() );
SetRendererTexture( rendererForInput, mInputTexture );
// create an actor to render mImageForHorz for vertical blur pass
mActorForHorz = Actor::New();
- mActorForHorz.SetParentOrigin( ParentOrigin::CENTER );
+ mActorForHorz.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mActorForHorz.SetSize( mTargetSize );
Renderer rendererForHorz = CreateRenderer( BASIC_VERTEX_SOURCE, fragmentSource.c_str() );
SetRendererTexture( rendererForHorz, textureForHorz );
textureSetForBlending.SetTexture( 0u, blurredTexture );
textureSetForBlending.SetTexture( 1u, mInputTexture );
mActorForBlending.AddRenderer( rendererForBlending );
- mActorForBlending.SetParentOrigin( ParentOrigin::CENTER );
+ mActorForBlending.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mActorForBlending.SetSize( mTargetSize );
for( int i = 0; i < kernelSize; ++i )
// create actor to render input with applied emboss effect
mActorForInput1 = Actor::New();
- mActorForInput1.SetParentOrigin( ParentOrigin::CENTER );
+ mActorForInput1.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mActorForInput1.SetSize(mTargetSize);
Vector2 textureScale( 1.5f/mTargetSize.width, 1.5f/mTargetSize.height);
mActorForInput1.RegisterProperty( TEX_SCALE_UNIFORM_NAME, textureScale );
mRootActor.Add( mActorForInput1 );
mActorForInput2 = Actor::New();
- mActorForInput2.SetParentOrigin( ParentOrigin::CENTER );
+ mActorForInput2.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mActorForInput2.SetSize(mTargetSize);
mActorForInput2.RegisterProperty( TEX_SCALE_UNIFORM_NAME, textureScale );
mActorForInput2.RegisterProperty( COEFFICIENT_UNIFORM_NAME, Vector3( -1.f, -1.f, 2.f ) );
mRootActor.Add( mActorForInput2 );
mActorForComposite = Actor::New();
- mActorForComposite.SetParentOrigin( ParentOrigin::CENTER );
+ mActorForComposite.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mActorForComposite.SetSize(mTargetSize);
- mActorForComposite.SetColor( Color::BLACK );
+ mActorForComposite.SetProperty( Actor::Property::COLOR, Color::BLACK );
mRootActor.Add( mActorForComposite );
{
// create a camera for the render task, corresponding to its render target size
mCameraActor = CameraActor::New(mTargetSize);
- mCameraActor.SetParentOrigin(ParentOrigin::CENTER);
+ mCameraActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mCameraActor.SetInvertYAxis( true );
mRootActor.Add( mCameraActor );
}
{
// create actor to render input with applied emboss effect
mActorForInput = Actor::New();
- mActorForInput.SetParentOrigin( ParentOrigin::CENTER );
+ mActorForInput.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mActorForInput.SetSize(mTargetSize);
// register properties as shader uniforms
mActorForInput.RegisterProperty( SPREAD_UNIFORM_NAME, mSpread );
// create an actor to render mImageForHorz for vertical blur pass
mActorForHorz = Actor::New();
- mActorForHorz.SetParentOrigin( ParentOrigin::CENTER );
+ mActorForHorz.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mActorForHorz.SetSize(mTargetSize);
// register properties as shader uniforms
mActorForHorz.RegisterProperty( SPREAD_UNIFORM_NAME, mSpread );
mFocusIndicatorActor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
}
- mFocusIndicatorActor.SetParentOrigin( ParentOrigin::CENTER );
- mFocusIndicatorActor.SetAnchorPoint( AnchorPoint::CENTER );
+ mFocusIndicatorActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ mFocusIndicatorActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mFocusIndicatorActor.SetPosition(0.0f, 0.0f);
return mFocusIndicatorActor;
cursor.position.y );
mPrimaryCursor.SetSize( Size( mCursorWidth, cursor.cursorHeight ) );
}
- mPrimaryCursor.SetVisible( mPrimaryCursorVisible && mCursorBlinkStatus );
+ mPrimaryCursor.SetProperty( Actor::Property::VISIBLE, mPrimaryCursorVisible && mCursorBlinkStatus );
}
if( mSecondaryCursor )
{
cursor.position.y );
mSecondaryCursor.SetSize( Size( mCursorWidth, cursor.cursorHeight ) );
}
- mSecondaryCursor.SetVisible( mSecondaryCursorVisible && mCursorBlinkStatus );
+ mSecondaryCursor.SetProperty( Actor::Property::VISIBLE, mSecondaryCursorVisible && mCursorBlinkStatus );
}
// Show or hide the grab handle
if( grabHandle.actor )
{
- grabHandle.actor.SetVisible( isVisible );
+ grabHandle.actor.SetProperty( Actor::Property::VISIBLE, isVisible );
}
}
else if( grabHandle.actor )
if( primary.actor )
{
- primary.actor.SetVisible( primaryVisible );
+ primary.actor.SetProperty( Actor::Property::VISIBLE, primaryVisible );
}
if( secondary.actor )
{
- secondary.actor.SetVisible( secondaryVisible );
+ secondary.actor.SetProperty( Actor::Property::VISIBLE, secondaryVisible );
}
}
if( primaryHandle.active || secondaryHandle.active )
{
// The origin of the decorator's coordinate system in world coords.
- const Vector3 originWorldCoords = mActiveLayer.GetCurrentWorldPosition() - mActiveLayer.GetCurrentSize() * ACTIVE_LAYER_ANCHOR_POINT;
+ const Vector3 originWorldCoords = mActiveLayer.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ) - mActiveLayer.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) * ACTIVE_LAYER_ANCHOR_POINT;
if( preferBelow )
{
// Check first the horizontal dimension. If is not within the boundaries, it calculates the offset.
// The origin of the decorator's coordinate system in world coords.
- const Vector3 originWorldCoords = mActiveLayer.GetCurrentWorldPosition() - mActiveLayer.GetCurrentSize() * ACTIVE_LAYER_ANCHOR_POINT;
+ const Vector3 originWorldCoords = mActiveLayer.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ) - mActiveLayer.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) * ACTIVE_LAYER_ANCHOR_POINT;
// The popup's position in world coords.
Vector3 popupPositionWorldCoords = originWorldCoords + mCopyPastePopup.position;
{
cursor = Control::New();
cursor.SetBackgroundColor( color );
- cursor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- cursor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ cursor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ cursor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
}
// Add or Remove cursor(s) from parent
{
CreateCursor( mPrimaryCursor, mCursor[PRIMARY_CURSOR].color );
#ifdef DECORATOR_DEBUG
- mPrimaryCursor.SetName( "PrimaryCursorActor" );
+ mPrimaryCursor.SetProperty( Dali::Actor::Property::NAME, "PrimaryCursorActor" );
#endif
}
{
CreateCursor( mSecondaryCursor, mCursor[SECONDARY_CURSOR].color );
#ifdef DECORATOR_DEBUG
- mSecondaryCursor.SetName( "SecondaryCursorActor" );
+ mSecondaryCursor.SetProperty( Dali::Actor::Property::NAME, "SecondaryCursorActor" );
#endif
}
// Cursor blinking
if ( mPrimaryCursor )
{
- mPrimaryCursor.SetVisible( mPrimaryCursorVisible && mCursorBlinkStatus );
+ mPrimaryCursor.SetProperty( Actor::Property::VISIBLE, mPrimaryCursorVisible && mCursorBlinkStatus );
}
if ( mSecondaryCursor )
{
- mSecondaryCursor.SetVisible( mSecondaryCursorVisible && mCursorBlinkStatus );
+ mSecondaryCursor.SetProperty( Actor::Property::VISIBLE, mSecondaryCursorVisible && mCursorBlinkStatus );
}
mCursorBlinkStatus = !mCursorBlinkStatus;
{
mActiveLayer = Layer::New();
#ifdef DECORATOR_DEBUG
- mActiveLayer.SetName ( "ActiveLayerActor" );
+ mActiveLayer.SetProperty( Actor::Property::NAME, "ActiveLayerActor" );
#endif
- mActiveLayer.SetParentOrigin( ParentOrigin::CENTER );
+ mActiveLayer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mActiveLayer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
// Add the active layer telling the controller it doesn't need clipping.
{
grabHandle.actor = ImageView::New( mHandleImages[GRAB_HANDLE][HANDLE_IMAGE_RELEASED] );
GetImpl( grabHandle.actor).SetDepthIndex( DepthIndex::DECORATION );
- grabHandle.actor.SetAnchorPoint( AnchorPoint::TOP_CENTER );
+ grabHandle.actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
// Area that Grab handle responds to, larger than actual handle so easier to move
#ifdef DECORATOR_DEBUG
- grabHandle.actor.SetName( "GrabHandleActor" );
+ grabHandle.actor.SetProperty( Dali::Actor::Property::NAME, "GrabHandleActor" );
if ( Dali::Internal::gLogFilter->IsEnabledFor( Debug::Verbose ) )
{
grabHandle.grabArea = Control::New();
Toolkit::Control control = Toolkit::Control::DownCast( grabHandle.grabArea );
control.SetBackgroundColor( Vector4( 1.0f, 1.0f, 1.0f, 0.5f ) );
- grabHandle.grabArea.SetName( "GrabArea" );
+ grabHandle.grabArea.SetProperty( Dali::Actor::Property::NAME, "GrabArea" );
}
else
{
grabHandle.grabArea = Actor::New();
- grabHandle.grabArea.SetName( "GrabArea" );
+ grabHandle.grabArea.SetProperty( Dali::Actor::Property::NAME, "GrabArea" );
}
#else
grabHandle.grabArea = Actor::New();
#endif
- grabHandle.grabArea.SetParentOrigin( ParentOrigin::TOP_CENTER );
- grabHandle.grabArea.SetAnchorPoint( AnchorPoint::TOP_CENTER );
+ grabHandle.grabArea.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER );
+ grabHandle.grabArea.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
grabHandle.grabArea.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
grabHandle.grabArea.SetSizeModeFactor( DEFAULT_GRAB_HANDLE_RELATIVE_SIZE );
grabHandle.actor.Add( grabHandle.grabArea );
- grabHandle.actor.SetColor( mHandleColor );
+ grabHandle.actor.SetProperty( Actor::Property::COLOR, mHandleColor );
grabHandle.grabArea.TouchSignal().Connect( this, &Decorator::Impl::OnGrabHandleTouched );
if( image )
{
handle.markerActor = ImageView::New( image );
- handle.markerActor.SetColor( mHandleColor );
+ handle.markerActor.SetProperty( Actor::Property::COLOR, mHandleColor );
handle.actor.Add( handle.markerActor );
handle.markerActor.SetResizePolicy ( ResizePolicy::FIXED, Dimension::HEIGHT );
if( LEFT_SELECTION_HANDLE == handleType )
{
- handle.markerActor.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT );
- handle.markerActor.SetParentOrigin( ParentOrigin::TOP_RIGHT );
+ handle.markerActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT );
+ handle.markerActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_RIGHT );
}
else if( RIGHT_SELECTION_HANDLE == handleType )
{
- handle.markerActor.SetAnchorPoint( AnchorPoint::BOTTOM_LEFT );
- handle.markerActor.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ handle.markerActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_LEFT );
+ handle.markerActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
}
}
}
{
primary.actor = ImageView::New( mHandleImages[LEFT_SELECTION_HANDLE][HANDLE_IMAGE_RELEASED] );
#ifdef DECORATOR_DEBUG
- primary.actor.SetName("SelectionHandleOne");
+ primary.actor.SetProperty( Dali::Actor::Property::NAME,"SelectionHandleOne");
#endif
- primary.actor.SetAnchorPoint( AnchorPoint::TOP_RIGHT ); // Change to BOTTOM_RIGHT if Look'n'Feel requires handle above text.
+ primary.actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_RIGHT ); // Change to BOTTOM_RIGHT if Look'n'Feel requires handle above text.
GetImpl( primary.actor ).SetDepthIndex( DepthIndex::DECORATION );
- primary.actor.SetColor( mHandleColor );
+ primary.actor.SetProperty( Actor::Property::COLOR, mHandleColor );
primary.grabArea = Actor::New(); // Area that Grab handle responds to, larger than actual handle so easier to move
#ifdef DECORATOR_DEBUG
- primary.grabArea.SetName("SelectionHandleOneGrabArea");
+ primary.grabArea.SetProperty( Dali::Actor::Property::NAME,"SelectionHandleOneGrabArea");
#endif
primary.grabArea.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
- primary.grabArea.SetParentOrigin( ParentOrigin::TOP_CENTER );
- primary.grabArea.SetAnchorPoint( AnchorPoint::TOP_CENTER );
+ primary.grabArea.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER );
+ primary.grabArea.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
primary.grabArea.SetSizeModeFactor( DEFAULT_SELECTION_HANDLE_RELATIVE_SIZE );
primary.grabArea.TouchSignal().Connect( this, &Decorator::Impl::OnHandleOneTouched );
{
secondary.actor = ImageView::New( mHandleImages[RIGHT_SELECTION_HANDLE][HANDLE_IMAGE_RELEASED] );
#ifdef DECORATOR_DEBUG
- secondary.actor.SetName("SelectionHandleTwo");
+ secondary.actor.SetProperty( Dali::Actor::Property::NAME,"SelectionHandleTwo");
#endif
- secondary.actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); // Change to BOTTOM_LEFT if Look'n'Feel requires handle above text.
+ secondary.actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT ); // Change to BOTTOM_LEFT if Look'n'Feel requires handle above text.
GetImpl( secondary.actor ).SetDepthIndex( DepthIndex::DECORATION );
- secondary.actor.SetColor( mHandleColor );
+ secondary.actor.SetProperty( Actor::Property::COLOR, mHandleColor );
secondary.grabArea = Actor::New(); // Area that Grab handle responds to, larger than actual handle so easier to move
#ifdef DECORATOR_DEBUG
- secondary.grabArea.SetName("SelectionHandleTwoGrabArea");
+ secondary.grabArea.SetProperty( Dali::Actor::Property::NAME,"SelectionHandleTwoGrabArea");
#endif
secondary.grabArea.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
- secondary.grabArea.SetParentOrigin( ParentOrigin::TOP_CENTER );
- secondary.grabArea.SetAnchorPoint( AnchorPoint::TOP_CENTER );
+ secondary.grabArea.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER );
+ secondary.grabArea.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
secondary.grabArea.SetSizeModeFactor( DEFAULT_SELECTION_HANDLE_RELATIVE_SIZE );
secondary.grabArea.TouchSignal().Connect( this, &Decorator::Impl::OnHandleTwoTouched );
void CalculateHandleWorldCoordinates( HandleImpl& handle, Vector2& position )
{
// Gets the world position of the active layer. The active layer is where the handles are added.
- const Vector3 parentWorldPosition = mActiveLayer.GetCurrentWorldPosition();
+ const Vector3 parentWorldPosition = mActiveLayer.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION );
// The grab handle position in world coords.
// The active layer's world position is the center of the active layer. The origin of the
HandleImpl& grabHandle = mHandle[GRAB_HANDLE];
// Transforms the handle position into world coordinates.
- // @note This is not the same value as grabHandle.actor.GetCurrentWorldPosition()
+ // @note This is not the same value as grabHandle.actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION )
// as it's transforming the handle's position set by the text-controller and not
- // the final position set to the actor. Another difference is the GetCurrentWorldPosition()
+ // the final position set to the actor. Another difference is the.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION )
// retrieves the position of the center of the actor but the handle's position set
// by the text controller is not the center of the actor.
Vector2 grabHandleWorldPosition;
HandleImpl& handle = mHandle[type];
// Transforms the handle position into world coordinates.
- // @note This is not the same value as handle.actor.GetCurrentWorldPosition()
+ // @note This is not the same value as handle.actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION )
// as it's transforming the handle's position set by the text-controller and not
- // the final position set to the actor. Another difference is the GetCurrentWorldPosition()
+ // the final position set to the actor. Another difference is the.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION )
// retrieves the position of the center of the actor but the handle's position set
// by the text controller is not the center of the actor.
Vector2 handleWorldPosition;
if( handle.actor && !handle.horizontallyFlipped )
{
// Change the anchor point to flip the image.
- handle.actor.SetAnchorPoint( isPrimaryHandle ? AnchorPoint::TOP_LEFT : AnchorPoint::TOP_RIGHT );
+ handle.actor.SetProperty( Actor::Property::ANCHOR_POINT, isPrimaryHandle ? AnchorPoint::TOP_LEFT : AnchorPoint::TOP_RIGHT );
handle.horizontallyFlipped = true;
}
if( handle.actor && handle.horizontallyFlipped )
{
// Reset the anchor point.
- handle.actor.SetAnchorPoint( isPrimaryHandle ? AnchorPoint::TOP_RIGHT : AnchorPoint::TOP_LEFT );
+ handle.actor.SetProperty( Actor::Property::ANCHOR_POINT, isPrimaryHandle ? AnchorPoint::TOP_RIGHT : AnchorPoint::TOP_LEFT );
handle.horizontallyFlipped = false;
}
{
mHighlightActor = Actor::New();
- mHighlightActor.SetName( "HighlightActor" );
- mHighlightActor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- mHighlightActor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- mHighlightActor.SetColor( mHighlightColor );
+ mHighlightActor.SetProperty( Dali::Actor::Property::NAME, "HighlightActor" );
+ mHighlightActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ mHighlightActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ mHighlightActor.SetProperty( Actor::Property::COLOR, mHighlightColor );
mHighlightActor.SetColorMode( USE_OWN_COLOR );
}
{
mImpl->mCopyPastePopup.actor = TextSelectionPopup::New( &mImpl->mTextSelectionPopupCallbackInterface );
#ifdef DECORATOR_DEBUG
- mImpl->mCopyPastePopup.actor.SetName("mCopyPastePopup");
+ mImpl->mCopyPastePopup.actor.SetProperty( Dali::Actor::Property::NAME,"mCopyPastePopup");
#endif
- mImpl->mCopyPastePopup.actor.SetAnchorPoint( AnchorPoint::CENTER );
+ mImpl->mCopyPastePopup.actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mImpl->mCopyPastePopup.actor.OnRelayoutSignal().Connect( mImpl, &Decorator::Impl::SetPopupPosition ); // Position popup after size negotiation
}
{
// Create a container actor to act as a common parent for text and shadow, to avoid color inheritence issues.
mActor = Actor::New();
- mActor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- mActor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ mActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
mActor.SetSize( textSize );
mActor.SetColorMode( USE_OWN_MULTIPLY_PARENT_COLOR );
}
Actor shadowActor = CreateMeshActor(textControl, animatablePropertyIndex, color, meshRecord, textSize, STYLE_DROP_SHADOW );
#if defined(DEBUG_ENABLED)
- shadowActor.SetName( "Text Shadow renderable actor" );
+ shadowActor.SetProperty( Dali::Actor::Property::NAME, "Text Shadow renderable actor" );
#endif
// Offset shadow in x and y
shadowActor.RegisterProperty("uOffset", shadowOffset );
Actor actor = Actor::New();
#if defined(DEBUG_ENABLED)
- actor.SetName( "Text renderable actor" );
+ actor.SetProperty( Dali::Actor::Property::NAME, "Text renderable actor" );
#endif
actor.AddRenderer( renderer );
// Keep all of the origins aligned
- actor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
actor.SetSize( actorSize );
actor.RegisterProperty("uOffset", Vector2::ZERO );
actor.SetColorMode( USE_OWN_MULTIPLY_PARENT_COLOR );
UnparentAndReset( mImpl->mActor );
mImpl->mActor = Actor::New();
- mImpl->mActor.SetParentOrigin( ParentOrigin::CENTER );
+ mImpl->mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mImpl->mActor.SetSize( view.GetControlSize() );
- mImpl->mActor.SetColor( Color::WHITE );
+ mImpl->mActor.SetProperty( Actor::Property::COLOR, Color::WHITE );
#if defined(DEBUG_ENABLED)
- mImpl->mActor.SetName( "Text renderable actor" );
+ mImpl->mActor.SetProperty( Dali::Actor::Property::NAME, "Text renderable actor" );
#endif
Length numberOfGlyphs = view.GetNumberOfGlyphs();
renderer.SetProperty( Dali::Renderer::Property::DEPTH_INDEX, DepthIndex::CONTENT );
actor = Actor::New();
- actor.SetName( "TextBackgroundColorActor" );
- actor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Dali::Actor::Property::NAME, "TextBackgroundColorActor" );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
actor.SetSize( textSize );
actor.SetColorMode( USE_OWN_MULTIPLY_PARENT_COLOR );
actor.AddRenderer( renderer );
}
}
- const Vector2 halfSize = Self().GetCurrentSize().GetVectorXY() * 0.5f;
+ const Vector2 halfSize = Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).GetVectorXY() * 0.5f;
//the centre to "explode" the tiles outwards from
Vector3 centre( halfSize.x, halfSize.y, -1.0f / mDisplacementSpreadFactor );
void CubeTransitionCrossEffect::SetupAnimation( unsigned int actorIndex, unsigned int x, unsigned int y, float angle, const Vector3 axis, const Vector3& displacementCentre )
{
- const Vector2 size = Self().GetCurrentSize().GetVectorXY();
+ const Vector2 size = Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).GetVectorXY();
Vector2 halfSize = size * 0.5f;
//the position of the centre of the front face tile
Actor CreateTile( const Vector4& samplerRect )
{
Actor tile = Actor::New();
- tile.SetAnchorPoint( AnchorPoint::CENTER );
+ tile.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
tile.RegisterProperty( "uTextureRect", samplerRect );
return tile;
}
mBoxes[ idx ].SetProperty(Actor::Property::PARENT_ORIGIN_Z, 1.0f - mTileSize.x * 0.5f );
- mTargetTiles[ idx ].SetParentOrigin( Vector3( 1.f, 0.5f, 0.5f) );
+ mTargetTiles[ idx ].SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 1.f, 0.5f, 0.5f) );
mTargetTiles[ idx ].SetOrientation( Degree( 90.f ), Vector3::YAXIS );
}
mBoxes[ idx ].SetProperty(Actor::Property::PARENT_ORIGIN_Z, 1.0f - mTileSize.x * 0.5f );
- mTargetTiles[ idx ].SetParentOrigin( Vector3( 0.f, 0.5f, 0.5f) );
+ mTargetTiles[ idx ].SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.f, 0.5f, 0.5f) );
mTargetTiles[ idx ].SetOrientation( Degree( -90.f ), Vector3::YAXIS );
}
mBoxes[ idx ].SetProperty(Actor::Property::PARENT_ORIGIN_Z, 1.0f - mTileSize.y * 0.5f );
- mTargetTiles[ idx ].SetParentOrigin( Vector3( 0.5f, 0.f, 0.5f) );
+ mTargetTiles[ idx ].SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5f, 0.f, 0.5f) );
mTargetTiles[ idx ].SetOrientation( Degree( 90.f ), Vector3::XAXIS );
}
mBoxes[ idx ].SetProperty(Actor::Property::PARENT_ORIGIN_Z, 1.0f - mTileSize.y * 0.5f );
- mTargetTiles[ idx ].SetParentOrigin( Vector3( 0.5f, 1.f, 0.5f) );
+ mTargetTiles[ idx ].SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5f, 1.f, 0.5f) );
mTargetTiles[ idx ].SetOrientation( Degree( -90.f ), Vector3::XAXIS );
}
//create the box parents
mBoxRoot = Actor::New();
- mBoxRoot.SetParentOrigin( ParentOrigin::CENTER );
- mBoxRoot.SetAnchorPoint( AnchorPoint::CENTER );
+ mBoxRoot.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ mBoxRoot.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mCurrentTiles.clear();
mTargetTiles.clear();
Actor currentTile = CreateTile( textureRect );
currentTile.SetProperty( Actor::Property::COLOR, FULL_BRIGHTNESS );
- currentTile.SetParentOrigin( ParentOrigin::CENTER );
+ currentTile.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mCurrentTiles.push_back( currentTile );
Actor targetTile = CreateTile( textureRect );
mTargetTiles.push_back( targetTile );
Actor box = Actor::New();
- box.SetParentOrigin( anchor + offset );
- box.SetAnchorPoint( AnchorPoint::CENTER );
+ box.SetProperty( Actor::Property::PARENT_ORIGIN, anchor + offset );
+ box.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
box.Add( currentTile );
box.Add( targetTile );
void CubeTransitionEffect::StartTransition( bool toNextImage )
{
- Vector3 size = Self().GetCurrentSize();
+ Vector3 size = Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE );
if( toNextImage )
{
StartTransition( Vector2(size.x* 0.5f, size.y*0.5f), Vector2( -10.f, 0.f ) );
for( ActorArray::iterator it = mCurrentTiles.begin(); it != mCurrentTiles.end(); ++it )
{
- it->SetParentOrigin( Vector3( 0.5f, 0.5f, 1.0f) );
+ it->SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5f, 0.5f, 1.0f) );
it->SetProperty( Actor::Property::ORIENTATION, Quaternion( Radian( 0.0f ), Vector3::XAXIS ) );
it->AddRenderer( mCurrentRenderer );
}
for( ActorArray::iterator it = mCurrentTiles.begin(); it != mCurrentTiles.end(); ++it )
{
- it->SetParentOrigin( Vector3( 0.5f, 0.5f, 1.0f) );
+ it->SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5f, 0.5f, 1.0f) );
it->SetProperty( Actor::Property::ORIENTATION, Quaternion( Radian( 0.0f ), Vector3::XAXIS ) );
it->SetProperty( Actor::Property::COLOR, FULL_BRIGHTNESS );
}
float delta = (float)x * mTileSize.x * ( 1.4142f - 1.0f );
- Vector3 position( mBoxes[ actorIndex ].GetCurrentPosition() );
+ Vector3 position( mBoxes[ actorIndex ].GetCurrentProperty< Vector3 >( Actor::Property::POSITION ) );
mAnimation.AnimateTo( Property( mBoxes[ actorIndex ], Actor::Property::ORIENTATION ), Quaternion( Radian( angle ), Vector3::YAXIS ), AlphaFunction::LINEAR );
mAnimation.AnimateTo( Property( mBoxes[ actorIndex ], Actor::Property::POSITION_X ), position.x + delta, AlphaFunction::BOUNCE );
void CubeTransitionWaveEffect::CalculateSaddleSurfaceParameters( Vector2 position, Vector2 displacement )
{
- const Vector2 size = Self().GetCurrentSize().GetVectorXY();
+ const Vector2 size = Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).GetVectorXY();
// the line passes through 'position' and has the direction of 'displacement'
float coefA, coefB, coefC; //line equation: Ax+By+C=0;
coefA = displacement.y;
Actor actor = mPlacementActor.GetHandle();
if( actor )
{
- Vector3 size = actor.GetCurrentSize();
+ Vector3 size = actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE );
mVisualSize.width = size.width;
mVisualSize.height = size.height;
* void HelloWorldExample::Create( Application& application )
* {
* CheckBoxButton button = CheckBoxButton::New();
- * button.SetParentOrigin( ParentOrigin::CENTER );
+ * button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
* button.SetProperty( Button::Property::LABEL, "Check" );
* button.SetSize( 200, 40 );
* button.SetBackgroundColor( Color::WHITE );
* void HelloWorldExample::Create( Application& application )
* {
* PushButton button = PushButton::New();
- * button.SetParentOrigin( ParentOrigin::CENTER );
+ * button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
* button.SetProperty( Button::Property::LABEL, "Press" );
* Stage::GetCurrent().Add( button );
*
*
* // Create a group to bind two or more RadioButtons together
* Actor radioGroup = Actor::New();
- * radioGroup.SetParentOrigin( ParentOrigin::CENTER );
+ * radioGroup.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
* Stage::GetCurrent().Add( radioGroup );
*
* // Make the first RadioButton and add it to its parent
if( pinch.state == Gesture::Started )
{
- *( mImpl->mStartingPinchScale ) = Self().GetCurrentScale();
+ *( mImpl->mStartingPinchScale ) = Self().GetCurrentProperty< Vector3 >( Actor::Property::SCALE );
}
Self().SetScale( *( mImpl->mStartingPinchScale ) * pinch.scale );
Vector3 Control::GetNaturalSize()
{
- DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Control::GetNaturalSize for %s\n", Self().GetName().c_str() );
+ DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Control::GetNaturalSize for %s\n", Self().GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str() );
Toolkit::Visual::Base visual = mImpl->GetVisual( Toolkit::Control::Property::BACKGROUND );
if( visual )
{
*
* @SINCE_1_0.0
* @param[in] sensitive @c true to enable scroll, @c false to disable scrolling
- * @note Unlike Actor::SetSensitive(), this determines whether this ScrollView
+ * @note Unlike Actor::Property::SENSITIVE, this determines whether this ScrollView
* should react (e.g. pan), without disrupting the sensitivity of its children.
*
*/
// Create text label
mTagText = Toolkit::TextLabel::New( "0" );
- mTagText.SetParentOrigin( ParentOrigin::BOTTOM_CENTER );
- mTagText.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER );
+ mTagText.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER );
+ mTagText.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER );
mTagText.SetProperty( TextLabel::Property::TEXT_COLOR, Color::WHITE );
mTagText.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
stage.Add( mTagText );
<h2 class="pg">Reading an animated value</h2>
-When a property is animatable, it can only be modified in the rendering thread. The value returned from a getter method, is the value used when the previous frame was rendered.
+When a property is animatable, it can only be modified in the rendering thread. The value returned from the property, is the value used when the previous frame was rendered.
-For example \ref Dali::Actor::GetCurrentPosition "Dali::Actor::GetCurrentPosition" returns the position at which the Actor was last rendered. Since \ref Dali::Actor::SetPosition "Dali::Actor::SetPosition" is asynchronous, a call to \ref Dali::Actor::GetCurrentPosition "Dali::Actor::GetCurrentPosition" won't immediately return the same value.
+For example \ref Dali::Actor::Property::POSITION "Dali::Actor::Property::POSITION" returns the position at which the Actor was last rendered. Since \ref Dali::Actor::SetPosition "Dali::Actor::SetPosition" is asynchronous, a call to \ref Dali::Actor::Property::POSITION "Dali::Actor::Property::POSITION" won't immediately return the same value.
@code
// Whilst handling an event...
actor.SetPosition(Vector3(10,10,10));
Vector3 current;
-current = actor.GetCurrentPosition();
+current = actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
std::cout << "Current position: " << current.x << ", " << current.y << ", " << current.z << std::endl;
std::cout << "..." << std::endl;
// Whilst handling another event...
-current = actor.GetCurrentPosition();
+current = actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
std::cout << "Current position: " << current.x << ", " << current.y << ", " << current.z << std::endl;
@endcode
void OnPinch( Dali::Actor actor, const Dali::PinchGesture& pinch )
{
// Scale your actor according to the pinch scale
- Vector3 newSize = actor.GetCurrentSize() * pinch.scale;
+ Vector3 newSize = actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) * pinch.scale;
actor.SetSize(newSize);
}
// Create the main flex container
Dali::Toolkit::FlexContainer flexContainer = Dali::Toolkit::FlexContainer::New();
flexContainer.SetParentOrigin( Dali::ParentOrigin::TOP_LEFT );
-flexContainer.SetAnchorPoint( Dali::AnchorPoint::TOP_LEFT );
+flexContainer.SetProperty( Dali::Actor::Property::ANCHOR_POINT, Dali::AnchorPoint::TOP_LEFT );
flexContainer.SetResizePolicy( Dali::ResizePolicy::FILL_TO_PARENT, Dali::Dimension::ALL_DIMENSIONS );
flexContainer.SetBackgroundColor( Dali::Color::WHITE ); // set the background color to be white
// Create the toolbar
Dali::Toolkit::FlexContainer toolBar = Dali::Toolkit::FlexContainer::New();
toolBar.SetParentOrigin( Dali::ParentOrigin::TOP_LEFT );
-toolBar.SetAnchorPoint( Dali::AnchorPoint::TOP_LEFT );
+toolBar.SetProperty( Dali::Actor::Property::ANCHOR_POINT, Dali::AnchorPoint::TOP_LEFT );
toolBar.SetBackgroundColor( Dali::Color::CYAN ); // Set the background color for the toolbar
// Add it to the main container
// Create the content area
Dali::Toolkit::FlexContainer content = Dali::Toolkit::FlexContainer::New();
content.SetParentOrigin( Dali::ParentOrigin::TOP_LEFT );
-content.SetAnchorPoint( Dali::AnchorPoint::TOP_LEFT );
+content.SetProperty( Dali::Actor::Property::ANCHOR_POINT, Dali::AnchorPoint::TOP_LEFT );
content.SetProperty( Dali::Toolkit::FlexContainer::Property::FLEX_DIRECTION, Dali::Toolkit::FlexContainer::ROW ); // display items horizontally
content.SetProperty( Dali::Toolkit::FlexContainer::Property::JUSTIFY_CONTENT, Dali::Toolkit::FlexContainer::JUSTIFY_CENTER ); // align items horizontally center
content.SetProperty( Dali::Toolkit::FlexContainer::Property::ALIGN_ITEMS, Dali::Toolkit::FlexContainer::ALIGN_CENTER ); // align items vertically center
// Add a button to the left of the toolbar
Dali::Toolkit::PushButton prevButton = Dali::Toolkit::PushButton::New();
prevButton.SetParentOrigin( Dali::ParentOrigin::TOP_LEFT );
-prevButton.SetAnchorPoint( Dali::AnchorPoint::TOP_LEFT );
-prevButton.SetMinimumSize( Dali::Vector2( 100.0f, 60.0f ) ); // this is the minimum size the button should keep
+prevButton.SetProperty( Dali::Actor::Property::ANCHOR_POINT, Dali::AnchorPoint::TOP_LEFT );
+prevButton.SetProperty( Dali::Actor::Property::MINIMUM_SIZE, Dali::Vector2( 100.0f, 60.0f ) ); // this is the minimum size the button should keep
prevButton.SetProperty( Dali::Toolkit::FlexContainer::ChildProperty::FLEX_MARGIN, Dali::Vector4(10.0f, 10.0f, 10.0f, 10.0f) ); // set 10 pixel margin around the button
toolBar.Add( prevButton );
// Add a title to the center of the toolbar
Dali::Toolkit::TextLabel title = Dali::Toolkit::TextLabel::New( "Gallery" );
title.SetParentOrigin( Dali::ParentOrigin::TOP_LEFT );
-title.SetAnchorPoint( Dali::AnchorPoint::TOP_LEFT );
+title.SetProperty( Dali::Actor::Property::ANCHOR_POINT, Dali::AnchorPoint::TOP_LEFT );
title.SetResizePolicy( Dali::ResizePolicy::USE_NATURAL_SIZE, Dali::Dimension::ALL_DIMENSIONS );
title.SetProperty( Dali::Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
title.SetProperty( Dali::Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
// Add a button to the right of the toolbar
Dali::Toolkit::PushButton nextButton = Dali::Toolkit::PushButton::New();
nextButton.SetParentOrigin( Dali::ParentOrigin::TOP_LEFT );
-nextButton.SetAnchorPoint( Dali::AnchorPoint::TOP_LEFT );
-nextButton.SetMinimumSize( Dali::Vector2( 100.0f, 60.0f ) ); // this is the minimum size the button should keep
+nextButton.SetProperty( Dali::Actor::Property::ANCHOR_POINT, Dali::AnchorPoint::TOP_LEFT );
+nextButton.SetProperty( Dali::Actor::Property::MINIMUM_SIZE, Dali::Vector2( 100.0f, 60.0f ) ); // this is the minimum size the button should keep
nextButton.SetProperty( Dali::Toolkit::FlexContainer::ChildProperty::FLEX_MARGIN, Dali::Vector4(10.0f, 10.0f, 10.0f, 10.0f) ); // set 10 pixel margin around the button
toolBar.Add( nextButton );
// Add an image to the center of the content area
Dali::Toolkit::ImageView imageView = Dali::Toolkit::ImageView::New( "image.jpg" );
imageView.SetParentOrigin( Dali::ParentOrigin::TOP_LEFT );
-imageView.SetAnchorPoint( Dali::AnchorPoint::TOP_LEFT );
+imageView.SetProperty( Dali::Actor::Property::ANCHOR_POINT, Dali::AnchorPoint::TOP_LEFT );
content.Add( imageView );
~~~
Stage stage = Stage::GetCurrent();
mTextLabel = TextLabel::New( "Hello World" );
- mTextLabel.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ mTextLabel.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
stage.Add( mTextLabel );
// Respond to a click anywhere on the stage
MyFactory factory; // Should store this as a member variable
Dali::Toolkit::ItemView itemView = Dali::Toolkit::ItemView::New( factory ); // Pass in our factory
itemView.SetParentOrigin( ParentOrigin::CENTER );
-itemView.SetAnchorPoint( AnchorPoint::CENTER );
+itemView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
// Now create a layout
Dali::Toolkit::ItemLayoutPtr spiralLayout = Dali::Toolkit::DefaultItemLayout::New( Dali::Toolkit::DefaultItemLayout::SPIRAL );
~~~{.cpp}
// C++
-layer1.SetAnchorPoint( AnchorPoint::CENTER );
+layer1.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
layer1.SetParentOrigin( ParentOrigin::CENTER );
layer1.SetClipping( true );
layer1.SetClippingBox( 20, 20, 100, 100 ); // X, Y, Width, Height
- An actor is only hittable if the actor's touch signal has a connection.
- An actor is only hittable when it is between the camera's near and far planes.
- - If an actor is made insensitive, then the actor and its children are not hittable; see Dali::Actor::IsSensitive()
- - If an actor's visibility flag is unset, then none of its children are hittable either; see Dali::Actor::IsVisible()
+ - If an actor is made insensitive, then the actor and its children are not hittable; see Dali::Actor:.Property::SENSITIVE
+ - If an actor's visibility flag is unset, then none of its children are hittable either; see Dali::Actor::Property::VISIBLE
- To be hittable, an actor must have a non-zero size.
- - If an actor's world color is fully transparent, then it is not hittable; see GetCurrentWorldColor()
+ - If an actor's world color is fully transparent, then it is not hittable; see Dali::Actor::Property::WORLD_COLOR
### Hit Test Algorithm:
footer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
footer.SetResizePolicy( ResizePolicy::FIXED, Dimension::HEIGHT );
footer.SetSize( 0.0f, 80.0f );
-footer.SetAnchorPoint( AnchorPoint::CENTER );
+footer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
footer.SetParentOrigin( ParentOrigin::CENTER );
Toolkit::PushButton okButton = Toolkit::PushButton::New();
okButton.SetLabelText( "OK" );
okButton.SetParentOrigin( ParentOrigin::CENTER );
-okButton.SetAnchorPoint( AnchorPoint::CENTER );
+okButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
okButton.SetResizePolicy( ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT, Dimension::ALL_DIMENSIONS );
okButton.SetSizeModeFactor( Vector3( -20.0f, -20.0f, 0.0 ) );
okButton.ClickedSignal().Connect( this, &MyExample::OnOKButtonClicked );
Toolkit::PushButton cancelButton = Toolkit::PushButton::New();
cancelButton.SetLabelText( "Cancel" );
cancelButton.SetParentOrigin( ParentOrigin::CENTER );
-cancelButton.SetAnchorPoint( AnchorPoint::CENTER );
+cancelButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
cancelButton.SetResizePolicy( ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT, Dimension::ALL_DIMENSIONS );
cancelButton.SetSizeModeFactor( Vector3( -20.0f, -20.0f, 0.0 ) );
cancelButton.ClickedSignal().Connect( this, &MyExample::OnCancelButtonClicked );
// Set up the footer's layout.
Toolkit::TableView controlLayout = Toolkit::TableView::New( 1, 2 );
controlLayout.SetParentOrigin( ParentOrigin::CENTER );
-controlLayout.SetAnchorPoint( AnchorPoint::CENTER );
+controlLayout.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
controlLayout.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
controlLayout.SetCellPadding( Size( 10.0f, 10.0f ) );
controlLayout.SetRelativeWidth( 0, 0.5f );
~~~{.cpp}
Dali::Actor actor = Dali::Actor::New();
actor.SetParentOrigin( Dali::ParentOrigin::CENTER );
-actor.SetAnchorPoint( Dali::AnchorPoint::CENTER );
+actor.SetProperty( Dali::Actor::Property::ANCHOR_POINT, Dali::AnchorPoint::CENTER );
Dali::Stage::GetCurrent().Add( actor );
...
bool OnPressed( Dali::Actor, const TouchData& touch )
To constrain the final negotiated size of an actor, set the following for minimum and maximum sizes respectively.
@code
-void SetMinimumSize( const Vector2& size )
-void SetMaximumSize( const Vector2& size )
+actor.SetProperty( Actor::Property::MINIMUM_SIZE, minSize );
+actor.SetProperty( Actor::Property::MAXIMUM_SIZE, maxSize );
@endcode
<h3>Altering Negotiated Size</h3>
TextLabel label = TextLabel::New();
label.SetProperty( TextLabel::Property::TEXT, "Hello World" );
-label.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+label.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( label );
~~~
// C++
TextLabel label = TextLabel::New( "Hello World" );
-label.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+label.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
label.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
label.SetBackgroundColor( Color::BLUE );
Stage::GetCurrent().Add( label );
TableView parent = TableView::New( 3, 1 );
parent.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
parent.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
-parent.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+parent.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( parent );
TextLabel label = TextLabel::New( "Hello World" );
-label.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+label.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
label.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
label.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT );
label.SetBackgroundColor( Color::BLUE );
parent.SetFitHeight( 0 );
label = TextLabel::New( "A Quick Brown Fox Jumps Over The Lazy Dog" );
-label.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+label.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
label.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
label.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT );
label.SetBackgroundColor( Color::GREEN );
parent.SetFitHeight( 1 );
label = TextLabel::New( "لإعادة ترتيب الشاشات، يجب تغيير نوع العرض إلى شبكة قابلة للتخصيص." );
-label.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+label.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
label.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
label.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT );
label.SetBackgroundColor( Color::BLUE );