Toolkit::Visual::Base visualBaseHandle = Toolkit::Visual::Base( dummyVisualPtr.Get() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visualBaseHandle );
- dummyControl.SetSize(200.f, 200.f);
+ dummyControl.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
Stage::GetCurrent().Add( dummyControl );
application.SendNotification();
// Create a text field
TextField textField = TextField::New();
- textField.SetSize( 400.f, 60.f );
+ textField.SetProperty( Actor::Property::SIZE, Vector2( 400.f, 60.f ) );
textField.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
textField.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Toolkit::Visual::Base visualBaseHandle = Toolkit::Visual::Base( dummyVisualPtr.Get() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visualBaseHandle );
- dummyControl.SetSize(200.f, 200.f);
+ dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
Stage::GetCurrent().Add( dummyControl );
application.SendNotification();
Visual::Base visual = factory.CreateVisual( propertyMap );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- dummyControl.SetSize(200.f, 200.f);
+ dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
Stage::GetCurrent().Add( dummyControl );
application.SendNotification();
Toolkit::Visual::Base visualBaseHandle = Toolkit::Visual::Base( colorVisualPtr.Get() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visualBaseHandle );
- dummyControl.SetSize( 200.f, 200.f );
+ dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
Stage::GetCurrent().Add( dummyControl );
application.SendNotification();
DummyControl actor = DummyControl::New( true );
DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize( 200.0f, 200.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) );
Stage::GetCurrent().Add( actor );
application.SendNotification();
renderer.SetTextures( textureSet );
// Set actor to the size of the texture if set
- actor.SetSize( texture.GetWidth(), texture.GetHeight() );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( texture.GetWidth(), texture.GetHeight() ) );
}
return actor;
accAdaptor.HandleActionEnableEvent();
Dali::Toolkit::PushButton button = Dali::Toolkit::PushButton::New();
- button.SetSize(480, 800);
+ button.SetProperty( Actor::Property::SIZE, Vector2(480, 800) );
Stage::GetCurrent().Add(button);
manager.SetFocusOrder( button, 1 );
manager.SetCurrentFocusActor( button );
manager.ActionUpSignal().Connect( &callback, &AccessibilityManagerSignalHandler::Callback );
DummyControl dummyControl = DummyControl::New(true);
- dummyControl.SetSize(480, 800);
+ dummyControl.SetProperty( Actor::Property::SIZE, Vector2(480, 800) );
manager.SetFocusOrder( dummyControl, 1 );
Stage::GetCurrent().Add( dummyControl );
manager.SetCurrentFocusActor( dummyControl );
manager.ActionDownSignal().Connect( &callback, &AccessibilityManagerSignalHandler::Callback );
Dali::Toolkit::PushButton button = Dali::Toolkit::PushButton::New();
- button.SetSize(480, 800);
+ button.SetProperty( Actor::Property::SIZE, Vector2(480, 800) );
Stage::GetCurrent().Add(button);
manager.SetFocusOrder( button, 1 );
manager.SetCurrentFocusActor( button );
DALI_TEST_CHECK( manager );
Dali::Toolkit::PushButton button = Dali::Toolkit::PushButton::New();
- button.SetSize(480, 800);
+ button.SetProperty( Actor::Property::SIZE, Vector2(480, 800) );
Stage::GetCurrent().Add(button);
manager.SetFocusOrder( button, 1 );
manager.SetCurrentFocusActor( button );
DummyControl dummyControl = DummyControl::New(true);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummyControl.GetImplementation());
- dummyControl.SetSize(480, 800);
+ dummyControl.SetProperty( Actor::Property::SIZE, Vector2(480, 800) );
manager.SetFocusOrder( dummyControl, 1 );
Stage::GetCurrent().Add( dummyControl );
manager.SetCurrentFocusActor( dummyControl );
Dali::AccessibilityAdaptor accessibilityAdaptor = Dali::AccessibilityAdaptor::Get();
DummyControl dummyControl = DummyControl::New(true);
- dummyControl.SetSize(480, 800);
+ dummyControl.SetProperty( Actor::Property::SIZE, Vector2(480, 800) );
Stage::GetCurrent().Add( dummyControl );
AccessibilityGestureEvent panGestureEvent(AccessibilityGestureEvent::Started);
application.SendNotification();
Vector2 size( 100.0f, 200.0f );
- alignment.SetSize(size);
+ alignment.SetProperty( Actor::Property::SIZE, size);
application.Render();
application.SendNotification();
ToolkitTestApplication application;
Alignment alignment = Alignment::New();
- alignment.SetSize(100.0f, 100.0f);
+ alignment.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
alignment.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(alignment);
DummyControl actor = DummyControl::New( true );
DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize( 200.0f, 200.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) );
Stage::GetCurrent().Add( actor );
application.SendNotification();
DummyControl actor = DummyControl::New( true );
DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize( 200.0f, 200.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) );
Stage::GetCurrent().Add( actor );
application.SendNotification();
DummyControl actor = DummyControl::New( true );
DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize( 200.0f, 200.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) );
Stage::GetCurrent().Add( actor );
application.SendNotification();
DummyControl actor = DummyControl::New( true );
DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize( 200.0f, 200.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) );
Stage::GetCurrent().Add( actor );
application.SendNotification();
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
Vector2 controlSize( 20.f, 30.f );
- actor.SetSize( controlSize );
+ actor.SetProperty( Actor::Property::SIZE, controlSize );
Stage::GetCurrent().Add( actor );
// Change Size
Vector3 newSize( 100.0f, 100.0f, 0.0f );
- dummyControl.SetSize( newSize );
+ dummyControl.SetProperty( Actor::Property::SIZE, newSize );
application.SendNotification();
application.Render(16);
Impl::DummyControl& dummyImpl = static_cast< Impl::DummyControl& >( dummy.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- dummy.SetSize( 200.f, 200.f );
+ dummy.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage::GetCurrent().Add( dummy );
DALI_TEST_EQUALS( naturalSize, Vector2( 100.0f, 100.0f ), TEST_LOCATION ); // 100x100 is the content default size.
- actor.SetSize( controlSize );
+ actor.SetProperty( Actor::Property::SIZE, controlSize );
application.SendNotification();
application.Render();
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
Vector2 controlSize( 20.f, 30.f );
- actor.SetSize( controlSize );
+ actor.SetProperty( Actor::Property::SIZE, controlSize );
Stage::GetCurrent().Add( actor );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
Vector2 controlSize( 20.f, 30.f );
- actor.SetSize( controlSize );
+ actor.SetProperty( Actor::Property::SIZE, controlSize );
Stage::GetCurrent().Add( actor );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
Vector2 controlSize( 20.f, 30.f );
- actor.SetSize( controlSize );
+ actor.SetProperty( Actor::Property::SIZE, controlSize );
Stage::GetCurrent().Add( actor );
DevelControl::VisualEventSignal( actor ).Connect( &VisualEventSignal );
Vector2 controlSize( 20.f, 30.f );
- actor.SetSize( controlSize );
+ actor.SetProperty( Actor::Property::SIZE, controlSize );
Stage::GetCurrent().Add( actor );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
Vector2 controlSize( 20.f, 30.f );
- actor.SetSize( controlSize );
+ actor.SetProperty( Actor::Property::SIZE, controlSize );
Stage::GetCurrent().Add( actor );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
Vector2 controlSize( 20.f, 30.f );
- actor.SetSize( controlSize );
+ actor.SetProperty( Actor::Property::SIZE, controlSize );
Stage::GetCurrent().Add( actor );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
Vector2 controlSize( 20.f, 30.f );
- actor.SetSize( controlSize );
+ actor.SetProperty( Actor::Property::SIZE, controlSize );
Stage::GetCurrent().Add( actor );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
Vector2 controlSize( 20.f, 30.f );
- actor.SetSize( controlSize );
+ actor.SetProperty( Actor::Property::SIZE, controlSize );
Stage::GetCurrent().Add( actor );
Vector2 controlSize( 20.f, 30.f );
Vector3 controlScale( 2.0f, 2.0f, 1.0f );
- actor.SetSize( controlSize );
- actor.SetScale( controlScale );
+ actor.SetProperty( Actor::Property::SIZE, controlSize );
+ actor.SetProperty( Actor::Property::SCALE, controlScale );
Stage::GetCurrent().Add( actor );
// Change scale and size
controlSize = Vector2( 50.f, 40.f );
controlScale= Vector3( 0.5f, 0.5f, 1.0f );
- actor.SetSize( controlSize );
- actor.SetScale( controlScale );
+ actor.SetProperty( Actor::Property::SIZE, controlSize );
+ actor.SetProperty( Actor::Property::SCALE, controlScale );
application.SendNotification();
application.Render();
dummyImpl1.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual1 );
Vector2 controlSize( 20.f, 30.f );
- actor1.SetSize( controlSize );
+ actor1.SetProperty( Actor::Property::SIZE, controlSize );
Stage::GetCurrent().Add( actor1 );
DummyControlImpl& dummyImpl2 = static_cast< DummyControlImpl& >( actor2.GetImplementation() );
dummyImpl2.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual2 );
- actor2.SetSize( controlSize );
+ actor2.SetProperty( Actor::Property::SIZE, controlSize );
Stage::GetCurrent().Add( actor2 );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
Vector2 controlSize( 20.f, 30.f );
- actor.SetSize( controlSize );
+ actor.SetProperty( Actor::Property::SIZE, controlSize );
Stage::GetCurrent().Add( actor );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
Vector2 controlSize( 20.f, 30.f );
- actor.SetSize( controlSize );
+ actor.SetProperty( Actor::Property::SIZE, controlSize );
Stage::GetCurrent().Add( actor );
DummyControl actor = DummyControl::New( true );
DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize( 200.0f, 200.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) );
Stage::GetCurrent().Add( actor );
application.SendNotification();
DummyControl actor = DummyControl::New( true );
DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize( 200.0f, 200.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) );
Stage::GetCurrent().Add( actor );
application.SendNotification();
DummyControl actor = DummyControl::New( true );
DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize( 200.0f, 200.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) );
Stage::GetCurrent().Add( actor );
application.SendNotification();
view.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- view.SetSize(Stage::GetCurrent().GetSize());
+ view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize());
view.Add(actor);
Stage::GetCurrent().Add(view);
DALI_TEST_CHECK( 1u == taskList.GetTaskCount() );
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- view.SetSize(Stage::GetCurrent().GetSize());
+ view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize());
view.Add(Actor::New());
Stage::GetCurrent().Add(view);
view.Activate();
application.Render();
Vector3 size( 200.0f, 300.0f, 0.0f );
- view.SetSize( size );
+ view.SetProperty( Actor::Property::SIZE, size );
application.SendNotification();
application.Render();
DALI_TEST_CHECK(emitter);
Actor root = emitter.GetRootActor();
Stage::GetCurrent().Add( root );
- root.SetPosition( Vector3::ZERO );
+ root.SetProperty( Actor::Property::POSITION, Vector3::ZERO );
root.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
root.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
BubbleEmitter emitter = BubbleEmitter::New( movementArea,shapeImage, 90, Vector2( 5.f, 10.f ));
Actor root = emitter.GetRootActor();
Stage::GetCurrent().Add( root );
- root.SetPosition( Vector3::ZERO );
+ root.SetProperty( Actor::Property::POSITION, Vector3::ZERO );
root.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
root.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
Button button = PushButton::New();
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 );
+ button.SetProperty( Actor::Property::POSITION, Vector2( 240, 400 ));
+ button.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) );
Stage::GetCurrent().Add( button );
application.SendNotification();
Button button = PushButton::New();
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 );
+ button.SetProperty( Actor::Property::POSITION, Vector2( 240, 400 ));
+ button.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) );
Stage::GetCurrent().Add( button );
Button button = PushButton::New();
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 );
+ button.SetProperty( Actor::Property::POSITION, Vector2( 240, 400 ));
+ button.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) );
Stage::GetCurrent().Add( button );
Button parentButton = PushButton::New();
parentButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
parentButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
- parentButton.SetSize( 20, 20 );
+ parentButton.SetProperty( Actor::Property::SIZE, Vector2( 20, 20 ) );
Stage::GetCurrent().Add( parentButton );
Button childButton = PushButton::New();
childButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
childButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_LEFT );
- childButton.SetSize( 20, 20 );
+ childButton.SetProperty( Actor::Property::SIZE, Vector2( 20, 20 ) );
parentButton.Add( childButton );
// Reset signal flags
Button parentButton = PushButton::New();
parentButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
parentButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
- parentButton.SetSize( 20, 20 );
+ parentButton.SetProperty( Actor::Property::SIZE, Vector2( 20, 20 ) );
Stage::GetCurrent().Add( parentButton );
parentButton.ReleasedSignal().Connect( &ButtonCallback );
button.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
- button.SetSize( 20, 20 );
+ button.SetProperty( Actor::Property::SIZE, Vector2( 20, 20 ) );
Stage::GetCurrent().Add( button );
button.ReleasedSignal().Connect( &ButtonCallback );
CheckBoxButton checkBox = CheckBoxButton::New();
Stage::GetCurrent().Add( checkBox );
- checkBox.SetSize( Vector2( 20.0f, 20.0f ) );
+ checkBox.SetProperty( Actor::Property::SIZE, Vector2( 20.0f, 20.0f ) );
checkBox.SetProperty(checkBox.GetPropertyIndex("disabledUnselectedBackgroundVisual"), "Image.jpg" );
application.SendNotification();
CheckBoxButton checkBox = CheckBoxButton::New();
Stage::GetCurrent().Add( checkBox );
- checkBox.SetSize( Vector2( 20.0f, 20.0f ) );
+ checkBox.SetProperty( Actor::Property::SIZE, Vector2( 20.0f, 20.0f ) );
checkBox.SetProperty(Button::Property::DISABLED_UNSELECTED_VISUAL, "Image.jpg" );
application.SendNotification();
DALI_TEST_EQUALS( actor.OnStageSignal().GetConnectionCount(), 0u, TEST_LOCATION );
const Vector3 ignoredSize( 20, 20, 0 );
- actor.SetSize( ignoredSize );
+ actor.SetProperty( Actor::Property::SIZE, ignoredSize );
END_TEST;
}
ToolkitTestApplication application;
DummyControl test = DummyControl::New();
- test.SetSize( 0.7f, 0.7f, 0.7f );
+ test.SetProperty( Actor::Property::SIZE, Vector3( 0.7f, 0.7f, 0.7f ) );
Stage::GetCurrent().Add( test );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, smallVisual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
Toolkit::Visual::ResourceStatus resourceStatus = actor.GetVisualResourceStatus(DummyControl::Property::TEST_VISUAL);
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
gResourceReadySignalFired = false;
Control control = Control::New();
- control.SetSize( 200.f, 200.f );
+ control.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
control.ResourceReadySignal().Connect( &ResourceReadySignal );
Property::Map propertyMap;
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummyControl.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual );
- dummyControl.SetSize(200.f, 200.f);
+ dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
Stage::GetCurrent().Add( dummyControl );
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummyControl.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual );
- dummyControl.SetSize(200.f, 200.f);
+ dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
application.SendNotification();
application.Render();
// Check gesture actually happens
{
DummyControl dummy = DummyControl::New(true);
- dummy.SetSize( Vector2(100.0f, 100.0f ) );
+ dummy.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f ) );
dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummy);
DALI_TEST_EQUALS( dummyImpl.sizeSetCalled, false, TEST_LOCATION ); // Size not set, no onSizeSet called
Vector2 size(100.0f, 200.0f);
- dummy.SetSize( size );
+ dummy.SetProperty( Actor::Property::SIZE, size );
DALI_TEST_EQUALS( dummyImpl.sizeSetCalled, false, TEST_LOCATION ); // Size is going to get negotiated, no onSizeSet called
application.SendNotification();
application.Render();
- dummy.SetSize(size);
+ dummy.SetProperty( Actor::Property::SIZE, size);
application.SendNotification();
application.Render();
DummyControl dummy = DummyControl::New( true );
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
- dummy.SetSize( Vector2( 100.0f, 100.0f ) );
+ dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummy);
{
DummyControl dummy = DummyControl::New();
- dummy.SetSize( Vector2( 100.0f, 100.0f ) );
+ dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummy);
DummyControl dummy = DummyControl::New( true );
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
- dummy.SetSize( Vector2( 100.0f, 100.0f ) );
+ dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummy);
{
DummyControl dummy = DummyControl::New();
- dummy.SetSize( Vector2( 100.0f, 100.0f ) );
+ dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummy);
DummyControl dummy = DummyControl::New( true );
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
- dummy.SetSize( Vector2( 100.0f, 100.0f ) );
+ dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummy);
{
DummyControl dummy = DummyControl::New();
- dummy.SetSize( Vector2( 100.0f, 100.0f ) );
+ dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummy);
{
DummyControl dummy = DummyControl::New( true );
- dummy.SetSize( Vector2( 100.0f, 100.0f ) );
+ dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummy);
Actor child = Actor::New();
child.SetResizePolicy( Dali::ResizePolicy::FIXED, Dali::Dimension::ALL_DIMENSIONS );
- child.SetSize(150, 150);
+ child.SetProperty( Actor::Property::SIZE, Vector2(150, 150) );
application.SendNotification();
application.Render();
controlWrapperImpl->TestRegisterVisual( index, visual );
Stage::GetCurrent().Add( controlWrapper );
- controlWrapper.SetSize( 100, 100 );
+ controlWrapper.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) );
application.SendNotification();
application.Render(0); // Trigger animation start
DALI_TEST_CHECK( !waveEffect );
waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS );
- waveEffect.SetSize( VIEW_AREA_SIZE );
+ waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
DALI_TEST_CHECK( waveEffect );
registry.ObjectCreatedSignal().Connect( &TestCallback );
{
CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS );
- waveEffect.SetSize( VIEW_AREA_SIZE );
+ waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
}
DALI_TEST_CHECK( gObjectCreatedCallBackCalled );
END_TEST;
DALI_TEST_CHECK( !crossEffect );
crossEffect = CubeTransitionCrossEffect::New( NUM_ROWS, NUM_COLUMNS );
- crossEffect.SetSize( VIEW_AREA_SIZE );
+ crossEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
DALI_TEST_CHECK( crossEffect );
registry.ObjectCreatedSignal().Connect( &TestCallback );
{
CubeTransitionEffect crossEffect = CubeTransitionCrossEffect::New( NUM_ROWS, NUM_COLUMNS );
- crossEffect.SetSize( VIEW_AREA_SIZE );
+ crossEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
}
DALI_TEST_CHECK( gObjectCreatedCallBackCalled );
END_TEST;
DALI_TEST_CHECK( !foldEffect );
foldEffect = CubeTransitionFoldEffect::New( NUM_ROWS, NUM_COLUMNS );
- foldEffect.SetSize( VIEW_AREA_SIZE );
+ foldEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
DALI_TEST_CHECK( foldEffect );
registry.ObjectCreatedSignal().Connect( &TestCallback );
{
CubeTransitionEffect foldEffect = CubeTransitionFoldEffect::New( NUM_ROWS, NUM_COLUMNS );
- foldEffect.SetSize( VIEW_AREA_SIZE );
+ foldEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
}
DALI_TEST_CHECK( gObjectCreatedCallBackCalled );
END_TEST;
CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS );
waveEffect.SetTransitionDuration( TRANSITION_DURATION );
- waveEffect.SetSize( VIEW_AREA_SIZE );
+ waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
DALI_TEST_EQUALS( TRANSITION_DURATION, waveEffect.GetTransitionDuration(), TEST_LOCATION );
CubeTransitionEffect crossEffect = CubeTransitionCrossEffect::New( NUM_ROWS, NUM_COLUMNS );
crossEffect.SetTransitionDuration( TRANSITION_DURATION );
- crossEffect.SetSize( VIEW_AREA_SIZE );
+ crossEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
DALI_TEST_EQUALS( TRANSITION_DURATION, crossEffect.GetTransitionDuration(), TEST_LOCATION );
CubeTransitionEffect foldEffect = CubeTransitionFoldEffect::New( NUM_ROWS, NUM_COLUMNS );
- foldEffect.SetSize( VIEW_AREA_SIZE );
+ foldEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
foldEffect.SetTransitionDuration( TRANSITION_DURATION );
DALI_TEST_EQUALS( TRANSITION_DURATION, foldEffect.GetTransitionDuration(), TEST_LOCATION );
END_TEST;
tet_infoline(" UtcDaliCubeTransitionEffectSetGetTransitionDuration ");
CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS);
- waveEffect.SetSize( VIEW_AREA_SIZE );
+ waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
waveEffect.SetCubeDisplacement( CUBE_DISPLACEMENT );
DALI_TEST_EQUALS( CUBE_DISPLACEMENT, waveEffect.GetCubeDisplacement(), TEST_LOCATION );
CubeTransitionEffect crossEffect = CubeTransitionCrossEffect::New( NUM_ROWS, NUM_COLUMNS );
- crossEffect.SetSize( VIEW_AREA_SIZE );
+ crossEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
crossEffect.SetCubeDisplacement( CUBE_DISPLACEMENT );
DALI_TEST_EQUALS( CUBE_DISPLACEMENT, crossEffect.GetCubeDisplacement(), TEST_LOCATION );
Texture texture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 40, 40 );
CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS );
- waveEffect.SetSize( VIEW_AREA_SIZE );
+ waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
Stage::GetCurrent().Add( waveEffect );
waveEffect.SetCurrentTexture( texture );
waveEffect.SetTargetTexture( texture );
Texture texture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 40, 40 );
CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS );
- waveEffect.SetSize( VIEW_AREA_SIZE );
+ waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
Stage::GetCurrent().Add( waveEffect );
waveEffect.SetTransitionDuration( TRANSITION_DURATION );
DALI_TEST_CHECK( !waveEffect.IsTransitioning() );
CubeTransitionEffect crossEffect = CubeTransitionCrossEffect::New( NUM_ROWS, NUM_COLUMNS );
- crossEffect.SetSize( VIEW_AREA_SIZE );
+ crossEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
Stage::GetCurrent().Add( crossEffect );
crossEffect.SetTransitionDuration( TRANSITION_DURATION );
DALI_TEST_CHECK( !crossEffect.IsTransitioning() );
CubeTransitionEffect foldEffect = CubeTransitionFoldEffect::New( NUM_ROWS, NUM_COLUMNS );
- foldEffect.SetSize( VIEW_AREA_SIZE );
+ foldEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
Stage::GetCurrent().Add( foldEffect );
foldEffect.SetTransitionDuration( TRANSITION_DURATION );
Texture texture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 40, 40 );
CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS );
- waveEffect.SetSize( VIEW_AREA_SIZE );
+ waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
waveEffect.SetCurrentTexture( texture );
Stage::GetCurrent().Add( waveEffect );
application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE );
Texture texture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 40, 40 );
CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS );
- waveEffect.SetSize( VIEW_AREA_SIZE );
+ waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
Stage::GetCurrent().Add( waveEffect );
waveEffect.SetCurrentTexture( texture );
texture.Upload( pixelData );
CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS );
- waveEffect.SetSize( VIEW_AREA_SIZE );
+ waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
waveEffect.SetTransitionDuration( TRANSITION_DURATION );
waveEffect.SetCubeDisplacement( CUBE_DISPLACEMENT );
waveEffect.SetCurrentTexture( texture );
texture.Upload( pixelData );
CubeTransitionEffect crossEffect = CubeTransitionCrossEffect::New( NUM_ROWS, NUM_COLUMNS );
- crossEffect.SetSize( VIEW_AREA_SIZE );
+ crossEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
crossEffect.SetTransitionDuration( TRANSITION_DURATION );
crossEffect.SetCubeDisplacement( CUBE_DISPLACEMENT );
crossEffect.SetCurrentTexture( texture );
application.GetGlAbstraction().SetCheckFramebufferStatusResult(GL_FRAMEBUFFER_COMPLETE );
Texture texture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 40, 40 );
CubeTransitionEffect foldEffect = CubeTransitionFoldEffect::New( NUM_ROWS, NUM_COLUMNS );
- foldEffect.SetSize( VIEW_AREA_SIZE );
+ foldEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
foldEffect.SetTransitionDuration( TRANSITION_DURATION );
foldEffect.SetCurrentTexture( texture );
foldEffect.SetTargetTexture( texture );
Texture thirdTexture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 40, 40 );
CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS );
- waveEffect.SetSize( VIEW_AREA_SIZE );
+ waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
waveEffect.SetTransitionDuration( TRANSITION_DURATION );
waveEffect.SetCubeDisplacement( CUBE_DISPLACEMENT );
Stage::GetCurrent().Add( waveEffect );
CubeTransitionEffect crossEffect = CubeTransitionCrossEffect::New( NUM_ROWS, NUM_COLUMNS );
- crossEffect.SetSize( VIEW_AREA_SIZE );
+ crossEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
crossEffect.SetTransitionDuration( TRANSITION_DURATION );
crossEffect.SetCubeDisplacement( CUBE_DISPLACEMENT );
Stage::GetCurrent().Add( crossEffect );
CubeTransitionEffect foldEffect = CubeTransitionCrossEffect::New( NUM_ROWS, NUM_COLUMNS );
- foldEffect.SetSize( VIEW_AREA_SIZE );
+ foldEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
foldEffect.SetTransitionDuration( TRANSITION_DURATION );
Stage::GetCurrent().Add( foldEffect );
Texture secondTexture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 20, 20 );
CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS );
- waveEffect.SetSize( VIEW_AREA_SIZE );
+ waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
waveEffect.SetTransitionDuration( TRANSITION_DURATION );
waveEffect.SetCubeDisplacement( CUBE_DISPLACEMENT );
Stage::GetCurrent().Add( waveEffect );
CubeTransitionEffect crossEffect = CubeTransitionCrossEffect::New( NUM_ROWS, NUM_COLUMNS );
- crossEffect.SetSize( VIEW_AREA_SIZE );
+ crossEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
crossEffect.SetTransitionDuration( TRANSITION_DURATION );
crossEffect.SetCubeDisplacement( CUBE_DISPLACEMENT );
Stage::GetCurrent().Add( crossEffect );
CubeTransitionEffect foldEffect = CubeTransitionFoldEffect::New( NUM_ROWS, NUM_COLUMNS );
- foldEffect.SetSize( VIEW_AREA_SIZE );
+ foldEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
foldEffect.SetTransitionDuration( TRANSITION_DURATION );
Stage::GetCurrent().Add( foldEffect );
Texture secondTexture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 20, 20 );
CubeTransitionEffect waveEffect = CubeTransitionWaveEffect::New( NUM_ROWS, NUM_COLUMNS );
- waveEffect.SetSize( VIEW_AREA_SIZE );
+ waveEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
waveEffect.SetTransitionDuration( TRANSITION_DURATION );
waveEffect.SetCubeDisplacement( CUBE_DISPLACEMENT );
waveEffect.SetCurrentTexture( firstTexture );
Texture secondTexture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 20, 20 );
CubeTransitionEffect crossEffect = CubeTransitionCrossEffect::New( NUM_ROWS, NUM_COLUMNS );
- crossEffect.SetSize( VIEW_AREA_SIZE );
+ crossEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
crossEffect.SetTransitionDuration( TRANSITION_DURATION );
crossEffect.SetCubeDisplacement( CUBE_DISPLACEMENT );
crossEffect.SetCurrentTexture( firstTexture );
Texture secondTexture = Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, 20, 20 );
CubeTransitionEffect foldEffect = CubeTransitionFoldEffect::New( NUM_ROWS, NUM_COLUMNS );
- foldEffect.SetSize( VIEW_AREA_SIZE );
+ foldEffect.SetProperty( Actor::Property::SIZE, Vector2( VIEW_AREA_SIZE ) );
foldEffect.SetTransitionDuration( TRANSITION_DURATION );
foldEffect.SetCurrentTexture( firstTexture );
foldEffect.SetTargetTexture( secondTexture );
Dali::Toolkit::DragAndDropDetector detector = Dali::Toolkit::DragAndDropDetector::New();
Control control = Control::New();
- control.SetSize(100.0f, 100.0f);
+ control.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
control.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(control);
detector.Attach(control);
Dali::Toolkit::DragAndDropDetector detector = Dali::Toolkit::DragAndDropDetector::New();
Control control1 = Control::New();
Control control2 = Control::New();
- control1.SetSize(100.0f,100.0f);
- control2.SetSize(100.0f, 100.0f);
+ control1.SetProperty( Actor::Property::SIZE, Vector2(100.0f,100.0f) );
+ control2.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
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.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 0.0f));
+ control2.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 100.0f));
Stage::GetCurrent().Add(control1);
Stage::GetCurrent().Add(control2);
Dali::Toolkit::DragAndDropDetector detector = Dali::Toolkit::DragAndDropDetector::New();
Control control1 = Control::New();
Control control2 = Control::New();
- control1.SetSize(100.0f,100.0f);
- control2.SetSize(100.0f, 100.0f);
+ control1.SetProperty( Actor::Property::SIZE, Vector2(100.0f,100.0f) );
+ control2.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
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.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 0.0f));
+ control2.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 100.0f));
Stage::GetCurrent().Add(control1);
Stage::GetCurrent().Add(control2);
Dali::Toolkit::DragAndDropDetector detector = Dali::Toolkit::DragAndDropDetector::New();
Control control1 = Control::New();
Control control2 = Control::New();
- control1.SetSize(100.0f,100.0f);
- control2.SetSize(100.0f, 100.0f);
+ control1.SetProperty( Actor::Property::SIZE, Vector2(100.0f,100.0f) );
+ control2.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
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.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 0.0f));
+ control2.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 100.0f));
control1.SetProperty( Actor::Property::LEAVE_REQUIRED,true);
control2.SetProperty( Actor::Property::LEAVE_REQUIRED,true);
Dali::Toolkit::DragAndDropDetector detector = Dali::Toolkit::DragAndDropDetector::New();
Control control1 = Control::New();
Control control2 = Control::New();
- control1.SetSize(100.0f,100.0f);
- control2.SetSize(100.0f, 100.0f);
+ control1.SetProperty( Actor::Property::SIZE, Vector2(100.0f,100.0f) );
+ control2.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
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.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 0.0f));
+ control2.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 100.0f));
Stage::GetCurrent().Add(control1);
Stage::GetCurrent().Add(control2);
Dali::Toolkit::DragAndDropDetector detector = Dali::Toolkit::DragAndDropDetector::New();
Control control1 = Control::New();
Control control2 = Control::New();
- control1.SetSize(100.0f,100.0f);
- control2.SetSize(100.0f, 100.0f);
+ control1.SetProperty( Actor::Property::SIZE, Vector2(100.0f,100.0f) );
+ control2.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
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.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 0.0f));
+ control2.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 100.0f));
Stage::GetCurrent().Add(control1);
Stage::GetCurrent().Add(control2);
Control control2 = Control::New();
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.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
+ control2.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
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.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 0.0f));
+ control2.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 100.0f));
Stage::GetCurrent().Add(control1);
Stage::GetCurrent().Add(control2);
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- view.SetSize(Stage::GetCurrent().GetSize());
+ view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize());
view.Add(actor);
Stage::GetCurrent().Add(view);
ToolkitTestApplication application;
EffectsView view = EffectsView::New(EffectsView::EMBOSS);
- view.SetSize(100.f, 100.f);
+ view.SetProperty( Actor::Property::SIZE, Vector2(100.f, 100.f) );
Stage stage = Stage::GetCurrent();
DALI_TEST_CHECK( stage.GetRenderTaskList().GetTaskCount() == 1 );
ToolkitTestApplication application;
EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW);
- view.SetSize(100.f, 100.f);
+ view.SetProperty( Actor::Property::SIZE, Vector2(100.f, 100.f) );
Stage stage = Stage::GetCurrent();
DALI_TEST_CHECK( stage.GetRenderTaskList().GetTaskCount() == 1 );
ToolkitTestApplication application;
EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW);
- view.SetSize(100.f, 100.f);
+ view.SetProperty( Actor::Property::SIZE, Vector2(100.f, 100.f) );
Stage stage = Stage::GetCurrent();
stage.Add( view );
{
EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW);
- view.SetSize( 200.0f, 200.0f, 0.0f );
+ view.SetProperty( Actor::Property::SIZE, Vector3( 200.0f, 200.0f, 0.0f ) );
stage.Add( view );
application.SendNotification();
application.Render();
{
EffectsView view = EffectsView::New(EffectsView::EMBOSS);
- view.SetSize( 200.0f, 200.0f, 0.0f );
+ view.SetProperty( Actor::Property::SIZE, Vector3( 200.0f, 200.0f, 0.0f ) );
stage.Add( view );
application.SendNotification();
application.Render();
{
EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW);
- view.SetSize( 200.0f, 200.0f, 0.0f );
+ view.SetProperty( Actor::Property::SIZE, Vector3( 200.0f, 200.0f, 0.0f ) );
stage.Add( view );
application.SendNotification();
application.Render();
RelayoutSignalHandler relayoutSignal(flexContainer);
flexContainer.OnRelayoutSignal().Connect(&relayoutSignal, &RelayoutSignalHandler::RelayoutCallback );
- flexContainer.SetSize( stageSize );
+ flexContainer.SetProperty( Actor::Property::SIZE, stageSize );
// Create two actors and add them to the container
Actor actor1 = Actor::New();
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- view.SetSize(Stage::GetCurrent().GetSize());
+ view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize());
view.Add(actor);
Stage::GetCurrent().Add(view);
DALI_TEST_CHECK( 1u == taskList.GetTaskCount() );
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- view.SetSize(Stage::GetCurrent().GetSize());
+ view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize());
view.Add(Actor::New());
Stage::GetCurrent().Add(view);
view.Activate();
DALI_TEST_CHECK( view );
view.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- view.SetSize(Stage::GetCurrent().GetSize());
+ view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize());
view.Add(Actor::New());
Stage::GetCurrent().Add(view);
view.Activate();
DALI_TEST_CHECK( view );
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- view.SetSize(Stage::GetCurrent().GetSize());
+ view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize());
view.Add(Actor::New());
Stage::GetCurrent().Add(view);
view.Activate();
DALI_TEST_CHECK( 1u == taskList.GetTaskCount() );
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- view.SetSize(Stage::GetCurrent().GetSize());
+ view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize());
view.Add(Actor::New());
Stage::GetCurrent().Add(view);
view.ActivateOnce();
DALI_TEST_CHECK( view );
view.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- view.SetSize(Stage::GetCurrent().GetSize());
+ view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize());
view.Add(Actor::New());
Stage::GetCurrent().Add(view);
view.ActivateOnce();
DALI_TEST_CHECK( view );
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- view.SetSize(Stage::GetCurrent().GetSize());
+ view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize());
view.Add(Actor::New());
Stage::GetCurrent().Add(view);
view.Activate();
imageView2.SetProperty( ImageView::Property::IMAGE, imageMap2 );
// ImageView doesn't do size negotiation properly: it only listens to OnSizeSet:
- imageView1.SetSize( 100, 100 );
- imageView2.SetSize( 100, 100 );
+ imageView1.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) );
+ imageView2.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) );
imageView1.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
imageView2.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
// By default, Aysnc loading is used
Stage::GetCurrent().Add( imageView );
- imageView.SetSize(100, 100);
+ imageView.SetProperty( Actor::Property::SIZE, Vector2(100, 100) );
imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
ImageView childImage = ImageView::New();
childImage.SetBackgroundColor( Color::BLACK );
- childImage.SetSize( 10.f, 10.f );
+ childImage.SetProperty( Actor::Property::SIZE, Vector2( 10.f, 10.f ) );
imageView.Add( childImage );
application.SendNotification();
imageMap.Add( DevelVisual::Property::VISUAL_FITTING_MODE , Toolkit::DevelVisual::FIT_KEEP_ASPECT_RATIO );
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
- imageView.SetSize(600,700);
+ imageView.SetProperty( Actor::Property::SIZE, Vector2(600,700) );
Stage::GetCurrent().Add( imageView );
imageMap.Add( DevelVisual::Property::VISUAL_FITTING_MODE , Toolkit::DevelVisual::FILL );
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
- imageView.SetSize(600,700);
+ imageView.SetProperty( Actor::Property::SIZE, Vector2(600,700) );
Stage::GetCurrent().Add( imageView );
imageMap.Add( DevelVisual::Property::VISUAL_FITTING_MODE , Toolkit::DevelVisual::OVER_FIT_KEEP_ASPECT_RATIO );
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
- imageView.SetSize(600,500);
+ imageView.SetProperty( Actor::Property::SIZE, Vector2(600,500) );
Stage::GetCurrent().Add( imageView );
imageMap.Add( DevelVisual::Property::VISUAL_FITTING_MODE, Toolkit::DevelVisual::CENTER);
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
- imageView.SetSize(700,700);
+ imageView.SetProperty( Actor::Property::SIZE, Vector2(700,700) );
Stage::GetCurrent().Add( imageView );
imageMap.Add( DevelVisual::Property::VISUAL_FITTING_MODE, Toolkit::DevelVisual::CENTER);
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
- imageView.SetSize(700,700);
+ imageView.SetProperty( Actor::Property::SIZE, Vector2(700,700) );
Stage::GetCurrent().Add( imageView );
imageMap.Add( DevelVisual::Property::VISUAL_FITTING_MODE, Toolkit::DevelVisual::FIT_HEIGHT);
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
- imageView.SetSize(600,700);
+ imageView.SetProperty( Actor::Property::SIZE, Vector2(600,700) );
Stage::GetCurrent().Add( imageView );
imageMap.Add( DevelVisual::Property::VISUAL_FITTING_MODE, Toolkit::DevelVisual::FIT_HEIGHT);
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
- imageView.SetSize(700,600);
+ imageView.SetProperty( Actor::Property::SIZE, Vector2(700,600) );
Stage::GetCurrent().Add( imageView );
imageMap.Add( DevelVisual::Property::VISUAL_FITTING_MODE, Toolkit::DevelVisual::FIT_WIDTH);
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
- imageView.SetSize(600,700);
+ imageView.SetProperty( Actor::Property::SIZE, Vector2(600,700) );
Stage::GetCurrent().Add( imageView );
imageMap.Add( DevelVisual::Property::VISUAL_FITTING_MODE, Toolkit::DevelVisual::FIT_WIDTH);
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
- imageView.SetSize(700,600);
+ imageView.SetProperty( Actor::Property::SIZE, Vector2(700,600) );
Stage::GetCurrent().Add( imageView );
imageMap[ DevelVisual::Property::VISUAL_FITTING_MODE ] = Toolkit::DevelVisual::FIT_KEEP_ASPECT_RATIO;
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
- imageView.SetSize(800,700);
+ imageView.SetProperty( Actor::Property::SIZE, Vector2(800,700) );
Stage::GetCurrent().Add( imageView );
imageMap2[ DevelVisual::Property::VISUAL_FITTING_MODE ] = Toolkit::DevelVisual::CENTER;
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap2 );
- imageView.SetSize(800,700);
+ imageView.SetProperty( Actor::Property::SIZE, Vector2(800,700) );
Stage::GetCurrent().Add( imageView );
imageMap3[ DevelVisual::Property::VISUAL_FITTING_MODE ] = Toolkit::DevelVisual::FIT_KEEP_ASPECT_RATIO;
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap3 );
- imageView.SetSize(800,700);
+ imageView.SetProperty( Actor::Property::SIZE, Vector2(800,700) );
Stage::GetCurrent().Add( imageView );
imageMap[ DevelVisual::Property::VISUAL_FITTING_MODE ] = Toolkit::DevelVisual::OVER_FIT_KEEP_ASPECT_RATIO;
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
- imageView.SetSize(800,700);
+ imageView.SetProperty( Actor::Property::SIZE, Vector2(800,700) );
Stage::GetCurrent().Add( imageView );
imageMap2[ DevelVisual::Property::VISUAL_FITTING_MODE ] = Toolkit::DevelVisual::CENTER;
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap2 );
- imageView.SetSize(800,700);
+ imageView.SetProperty( Actor::Property::SIZE, Vector2(800,700) );
Stage::GetCurrent().Add( imageView );
imageMap3[ DevelVisual::Property::VISUAL_FITTING_MODE ] = Toolkit::DevelVisual::OVER_FIT_KEEP_ASPECT_RATIO;
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap3 );
- imageView.SetSize(800,700);
+ imageView.SetProperty( Actor::Property::SIZE, Vector2(800,700) );
Stage::GetCurrent().Add( imageView );
imageMap.Add( Toolkit::ImageVisual::Property::URL, TEST_VECTOR_IMAGE_FILE_NAME ); // 249x169 image
imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, imageMap );
- imageView.SetSize(600,600);
+ imageView.SetProperty( Actor::Property::SIZE, Vector2(600,600) );
Stage::GetCurrent().Add( imageView );
imageView.SetImage("https://upload.wikimedia.org/wikipedia/commons/thumb/0/02/SVG_logo.svg/64px-SVG_logo.svg.png");
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 ) );
+ imageView.SetProperty( Actor::Property::SIZE, Vector2(300, 300) );
+ imageView.SetProperty( Actor::Property::POSITION, Vector3( 150.0f , 150.0f , 0.0f ) );
Stage::GetCurrent().Add( imageView );
gResourceReadySignalFired = false;
ImageView imageView = ImageView::New( TEST_RESOURCE_DIR "/Kid1.svg" );
- imageView.SetSize( 200.f, 200.f );
+ imageView.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
imageView.ResourceReadySignal().Connect( &ResourceReadySignal);
DALI_TEST_EQUALS( imageView.IsResourceReady(), false, TEST_LOCATION );
gResourceReadySignalFired = false;
ImageView imageView = ImageView::New( "https://bar.org/foobar.svg" );
- imageView.SetSize( 200.f, 200.f );
+ imageView.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
imageView.ResourceReadySignal().Connect( &ResourceReadySignal);
DALI_TEST_EQUALS( imageView.IsResourceReady(), false, TEST_LOCATION );
Visual::Base visual = factory.CreateVisual( map );
DALI_TEST_CHECK( visual );
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
return actor;
}
application.GetPlatform().SetClosestImageSize( Vector2(imageDimensions.GetWidth(), imageDimensions.GetHeight()) );
}
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
Stage::GetCurrent().Add( actor );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
Stage::GetCurrent().Add( actor );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
Stage::GetCurrent().Add( actor );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
Stage::GetCurrent().Add( actor );
DummyControlImpl& newDummyImpl = static_cast< DummyControlImpl& >( newActor.GetImplementation() );
newDummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, newVisual );
- newActor.SetSize( 200.f, 200.f );
+ newActor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( newActor.GetRendererCount(), 0u, TEST_LOCATION );
Stage::GetCurrent().Add( newActor );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
Stage::GetCurrent().Add( actor );
DummyControl actor = DummyControl::New();
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
- actor.SetSize(2000, 2000);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(2000, 2000) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
Stage::GetCurrent().Add( actor );
DummyControl actor = DummyControl::New();
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
- actor.SetSize(2000, 2000);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(2000, 2000) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
Stage::GetCurrent().Add( actor );
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize(2000, 2000);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(2000, 2000) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
Stage::GetCurrent().Add(actor);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize(2000, 2000);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(2000, 2000) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
Stage::GetCurrent().Add(actor);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize(2000, 2000);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(2000, 2000) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize(2000, 2000);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(2000, 2000) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
Stage::GetCurrent().Add(actor);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
Stage::GetCurrent().Add( actor );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
Stage::GetCurrent().Add( actor );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
Stage::GetCurrent().Add( actor );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
DALI_TEST_EQUALS( actor.IsResourceReady(), false, TEST_LOCATION );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
DALI_TEST_EQUALS( actor.IsResourceReady(), false, TEST_LOCATION );
DALI_TEST_EQUALS( actor.IsResourceReady(), false, TEST_LOCATION );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
Stage::GetCurrent().Add( actor );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
DALI_TEST_EQUALS( actor.IsResourceReady(), false, TEST_LOCATION );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual );
imageVisual.Reset();
- actor.SetSize(200.f, 200.f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
application.SendNotification();
application.Render(0);
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual );
imageVisual.Reset(); // reduce ref count so only the control keeps the visual alive.
- actor.SetSize(200.f, 200.f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
application.SendNotification();
application.Render(0);
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual );
imageVisual.Reset(); // reduce ref count so only the control keeps the visual alive.
- actor.SetSize(200.f, 200.f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
application.SendNotification();
application.Render(0);
imageVisualNever.Reset(); // reduce ref count so only the control keeps the visual alive.
imageVisualDestroyed.Reset(); // reduce ref count so only the control keeps the visual alive.
- actor.SetSize(200.f, 200.f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
// Test initially zero renderers
application.SendNotification();
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual );
imageVisual.Reset(); // reduce ref count so only the control keeps the visual alive.
- actor.SetSize(200.f, 200.f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
application.SendNotification();
application.Render(0);
imageVisualDestroyed.Reset(); // reduce ref count so only the control keeps the visual alive.
imageVisualDetached.Reset(); // reduce ref count so only the control keeps the visual alive.
- actor.SetSize(200.f, 200.f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
// Test initially zero renderers
application.SendNotification();
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual );
imageVisual.Reset(); // reduce ref count so only the control keeps the visual alive.
- actor.SetSize(200.f, 200.f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
Stage::GetCurrent().Add( actor );
tet_infoline( "Ensure nothing triggers another load as texure already loaded" );
const unsigned int TIME_OUT_3_SECONDS = 3;
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual );
imageVisual.Reset(); // reduce ref count so only the control keeps the visual alive.
- actor.SetSize(200.f, 200.f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
Stage::GetCurrent().Add( actor );
tet_infoline( "Allow image time to load" );
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
DummyControl actor = DummyControl::New(true);
actor.ResourceReadySignal().Connect( &ResourceReadySignal);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
- actor.SetSize(200.f, 200.f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
tet_infoline( "Create visual with IMMEDIATE load policy" );
Visual::Base imageVisual = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, ImageVisual::Property::LOAD_POLICY, ImageVisual::LoadPolicy::IMMEDIATE );
DummyControl actor = DummyControl::New(true);
actor.ResourceReadySignal().Connect( &ResourceReadySignal);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
- actor.SetSize(200.f, 200.f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
tet_infoline( "Create visual with IMMEDIATE load policy" );
Visual::Base imageVisual = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, ImageVisual::Property::LOAD_POLICY, ImageVisual::LoadPolicy::IMMEDIATE );
tet_infoline( "Registering visual this should trigger the loading signal as is already image loaded for previous control" );
dummyImpl2.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual2 );
imageVisual2.Reset(); // reduce ref count so only the control keeps the visual alive.
- actor2.SetSize(200.f, 200.f);
+ actor2.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 0 ), true, TEST_LOCATION ); // Not expecting any further loading as texture is being reused.
DALI_TEST_EQUALS( gResourceReadySignalFired, true, TEST_LOCATION );
DummyControl actor = DummyControl::New(true);
actor.ResourceReadySignal().Connect( &ResourceReadySignal);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
- actor.SetSize(200.f, 200.f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
Stage::GetCurrent().Add( actor );
tet_infoline( "Create visual with ATTACHED load policy" );
tet_infoline( "Registering visual this should trigger the loading signal as is already image loaded for previous control" );
dummyImpl2.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual2 );
imageVisual2.Reset(); // reduce ref count so only the control keeps the visual alive.
- actor2.SetSize(200.f, 200.f);
+ actor2.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 0 ), true, TEST_LOCATION ); // Not expecting any further loading as texture is being reused.
DALI_TEST_EQUALS( gResourceReadySignalFired, true, TEST_LOCATION );
Impl::DummyControl& dummyImpl = static_cast< Impl::DummyControl& >( dummy.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- dummy.SetSize( 200.f, 200.f );
+ dummy.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage::GetCurrent().Add( dummy );
DummyControl dummy1 = DummyControl::New( true );
Impl::DummyControl& dummyImpl1 = static_cast< Impl::DummyControl& >( dummy1.GetImplementation() );
dummyImpl1.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual1 );
- dummy1.SetSize( 200, 200 );
+ dummy1.SetProperty( Actor::Property::SIZE, Vector2( 200, 200 ) );
dummy1.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage::GetCurrent().Add( dummy1 );
int actor1Id = actor.GetId();
actor.ResourceReadySignal().Connect( &ResourceReadySignal);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
- actor.SetSize(200.f, 200.f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
Stage::GetCurrent().Add(actor);
tet_infoline( "Create visual with IMMEDIATE load policy" );
tet_infoline( "Registering visual this should trigger the ready signal when the image fails to load" );
dummyImpl2.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual2 );
- actor2.SetSize(200.f, 200.f);
+ actor2.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
Stage::GetCurrent().Add(actor2);
tet_infoline( "Wait for loading thread to finish");
view.SetProperty( Dali::Actor::Property::NAME,"view actor");
view.AddLayout(*layout);
- view.SetSize(vec);
+ view.SetProperty( Actor::Property::SIZE, vec );
Stage::GetCurrent().Add(view);
layout->SetOrientation(ControlOrientation::Down);
DummyControl dummy = DummyControl::New(true);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
- dummy.SetSize(100.0f, 100.0f);
+ dummy.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
stage.Add( dummy );
DALI_TEST_CHECK( ! dummyImpl.keyInputFocusGained );
DummyControl dummy1 = DummyControl::New(true);
Impl::DummyControl& dummy1Impl = static_cast<Impl::DummyControl&>(dummy1.GetImplementation());
- dummy1.SetSize(100.0f, 100.0f);
+ dummy1.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
stage.Add( dummy1 );
DALI_TEST_CHECK( ! dummy1Impl.keyInputFocusGained );
DALI_TEST_CHECK( ! dummy1Impl.keyInputFocusLost );
DummyControl dummy2 = DummyControl::New(true);
Impl::DummyControl& dummy2Impl = static_cast<Impl::DummyControl&>(dummy2.GetImplementation());
- dummy2.SetSize(100.0f, 100.0f);
+ dummy2.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
stage.Add( dummy2 );
DALI_TEST_CHECK( ! dummy2Impl.keyInputFocusGained );
DALI_TEST_CHECK( ! dummy1Impl.keyInputFocusLost );
stage.KeyEventSignal().Connect( &stageCallback, &KeyEventCallback::Callback );
DummyControl dummy1 = DummyControl::New(true);
- dummy1.SetSize(100.0f, 100.0f);
+ dummy1.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
KeyEventCallback callback1( false );
dummy1.KeyEventSignal().Connect( &callback1, &KeyEventCallback::Callback );
stage.Add( dummy1 );
DummyControl dummy2 = DummyControl::New(true);
- dummy2.SetSize(100.0f, 100.0f);
+ dummy2.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
KeyEventCallback callback2( false );
dummy2.KeyEventSignal().Connect( &callback2, &KeyEventCallback::Callback );
dummy1.Add( dummy2 );
DummyControl dummy3 = DummyControl::New(true);
Impl::DummyControl& dummy3Impl = static_cast<Impl::DummyControl&>(dummy3.GetImplementation());
- dummy3.SetSize(100.0f, 100.0f);
+ dummy3.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
KeyEventCallback callback3( false );
dummy3.KeyEventSignal().Connect( &callback3, &KeyEventCallback::Callback );
dummy2.Add( dummy3 );
DALI_TEST_CHECK(manager);
DummyControl dummy1 = DummyControl::New(true);
- dummy1.SetSize(100.0f, 100.0f);
+ dummy1.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
KeyEventCallback callback1( false );
dummy1.KeyEventSignal().Connect( &callback1, &KeyEventCallback::Callback );
stage.Add( dummy1 );
DummyControl dummy2 = DummyControl::New(true);
- dummy2.SetSize(100.0f, 100.0f);
+ dummy2.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
KeyEventCallback callback2( true );
dummy2.KeyEventSignal().Connect( &callback2, &KeyEventCallback::Callback );
dummy1.Add( dummy2 );
DummyControl dummy3 = DummyControl::New(true);
Impl::DummyControl& dummy3Impl = static_cast<Impl::DummyControl&>(dummy3.GetImplementation());
- dummy3.SetSize(100.0f, 100.0f);
+ dummy3.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
KeyEventCallback callback3( false );
dummy3.KeyEventSignal().Connect( &callback3, &KeyEventCallback::Callback );
dummy2.Add( dummy3 );
DummyControl dummy1 = DummyControl::New(true);
Impl::DummyControl& dummy1Impl = static_cast<Impl::DummyControl&>(dummy1.GetImplementation());
- dummy1.SetSize(100.0f, 100.0f);
+ dummy1.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
stage.Add( dummy1 );
DALI_TEST_CHECK( ! dummy1Impl.keyInputFocusGained );
DALI_TEST_CHECK( ! dummy1Impl.keyInputFocusLost );
DummyControl dummy2 = DummyControl::New(true);
Impl::DummyControl& dummy2Impl = static_cast<Impl::DummyControl&>(dummy2.GetImplementation());
- dummy2.SetSize(100.0f, 100.0f);
+ dummy2.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
stage.Add( dummy2 );
DALI_TEST_CHECK( ! dummy2Impl.keyInputFocusGained );
DALI_TEST_CHECK( ! dummy2Impl.keyInputFocusLost );
DummyControl dummy1 = DummyControl::New(true);
Impl::DummyControl& dummy1Impl = static_cast<Impl::DummyControl&>(dummy1.GetImplementation());
- dummy1.SetSize(100.0f, 100.0f);
+ dummy1.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
stage.Add( dummy1 );
DALI_TEST_CHECK( ! dummy1Impl.keyInputFocusGained );
DALI_TEST_CHECK( ! dummy1Impl.keyInputFocusLost );
application.Render();
Vector3 size( 200.0f, 300.0f, 0.0f );
- view.SetSize( size );
+ view.SetProperty( Actor::Property::SIZE, size );
application.SendNotification();
application.Render();
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- view.SetSize(Stage::GetCurrent().GetSize());
+ view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize());
view.Add(actor);
Stage::GetCurrent().Add(view);
application.Render();
Vector3 size( 200.0f, 300.0f, 0.0f );
- view.SetSize( size );
+ view.SetProperty( Actor::Property::SIZE, size );
application.SendNotification();
application.Render();
Actor container = Actor::New();
PushButton button1 = PushButton::New();
PushButton button2 = PushButton::New();
- button1.SetSize( DEFAULT_BUTTON_SIZE.GetVectorXY() );
- button2.SetSize( DEFAULT_BUTTON_SIZE.GetVectorXY() );
+ button1.SetProperty( Actor::Property::SIZE, DEFAULT_BUTTON_SIZE.GetVectorXY() );
+ button2.SetProperty( Actor::Property::SIZE, DEFAULT_BUTTON_SIZE.GetVectorXY() );
container.Add( button1 );
container.Add( button2 );
popup.SetFooter( container );
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( Actor::Property::SIZE, Vector2( 50.0f, 50.0f ) );
popup.SetProperty( Popup::Property::ANIMATION_DURATION, 0.0f );
Stage::GetCurrent().Add( popup );
popup.OutsideTouchedSignal().Connect( &OnPopupTouchedOutside );
Actor container = Actor::New();
PushButton button1 = PushButton::New();
- button1.SetSize( DEFAULT_BUTTON_SIZE.GetVectorXY() );
+ button1.SetProperty( Actor::Property::SIZE, DEFAULT_BUTTON_SIZE.GetVectorXY() );
container.Add( button1 );
popup.SetFooter( container );
Actor placement = Actor::New();
placement.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
placement.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- placement.SetSize( 1.0f, 1.0f );
+ placement.SetProperty( Actor::Property::SIZE, Vector2( 1.0f, 1.0f ) );
placement.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
Stage::GetCurrent().Add( placement );
popup.SetProperty( Popup::Property::ANIMATION_DURATION, 0.0f );
popup.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
popup.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
- popup.SetSize( 100, 100 );
+ popup.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
popup.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
// Create a button (to go underneath the popup).
PushButton button = Toolkit::PushButton::New();
button.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
- button.SetSize( 100, 100 );
+ button.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
button.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
button.ClickedSignal().Connect( &PushButtonClicked );
Popup popup = Popup::New();
popup.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
popup.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
- popup.SetSize( 100, 100 );
+ popup.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
popup.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
TextLabel content = TextLabel::New( "text" );
popup.SetContent( content );
Stage::GetCurrent().Add( progressBar );
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.SetProperty( Actor::Property::SIZE, Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) );
+ progressBar.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
progressBar.ValueChangedSignal().Connect( &OnProgressBarValueChanged );
progressBar.SetProperty(ProgressBar::Property::PROGRESS_VALUE, 0.2f);
ProgressBar progressBar = ProgressBar::New();
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.SetProperty( Actor::Property::SIZE, Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) );
+ progressBar.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
progressBar.ValueChangedSignal().Connect( &OnProgressBarValueChanged );
Stage::GetCurrent().Add(progressBar);
application.SendNotification();
ProgressBar progressBar = ProgressBar::New();
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.SetProperty( Actor::Property::SIZE, Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) );
+ progressBar.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
progressBar.ValueChangedSignal().Connect( &OnProgressBarValueChanged );
Stage::GetCurrent().Add(progressBar);
ProgressBar progressBar = ProgressBar::New();
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( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
progressBar.SetProperty(ProgressBar::Property::LABEL_VISUAL, "test");
progressBar.SetProperty(ProgressBar::Property::INDETERMINATE, true);
progressBar.SetProperty(ProgressBar::Property::TRACK_VISUAL, trackImage);
progressBar.SetProperty(ProgressBar::Property::SECONDARY_PROGRESS_VALUE, 0.3f);
progressBar.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
- progressBar.SetSize( Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) );
+ progressBar.SetProperty( Actor::Property::SIZE, Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) );
Stage::GetCurrent().Add(progressBar);
application.SendNotification();
application.Render();
{
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 );
+ button.SetProperty( Actor::Property::POSITION, BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS );
if ( useDefaultImages )
{
const Vector2 TEST_IMAGE_SIZE = Vector2( BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS );
PushButton pushButton = PushButton::New();
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 );
+ pushButton.SetProperty( Actor::Property::POSITION, BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS );
+ pushButton.SetProperty( Actor::Property::SIZE, BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS );
Stage::GetCurrent().Add( pushButton );
PushButton pushButton = PushButton::New();
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 );
+ pushButton.SetProperty( Actor::Property::POSITION, BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS );
+ pushButton.SetProperty( Actor::Property::SIZE, BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS );
Stage::GetCurrent().Add( pushButton );
PushButton pushButton = PushButton::New();
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 );
+ pushButton.SetProperty( Actor::Property::POSITION, BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS );
+ pushButton.SetProperty( Actor::Property::SIZE, BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS );
Stage::GetCurrent().Add( pushButton );
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.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
pushButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
Stage::GetCurrent().Add( pushButton );
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.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
pushButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
Stage::GetCurrent().Add( pushButton );
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.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
pushButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
Stage::GetCurrent().Add( pushButton );
ToolkitTestApplication application;
PushButton pushButton = PushButton::New();
- pushButton.SetSize( BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS );
+ pushButton.SetProperty( Actor::Property::SIZE, Vector2( BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS ) );
Stage::GetCurrent().Add( pushButton );
DALI_TEST_EQUALS(GetButtonText( pushButton ), STR, TEST_LOCATION);
END_TEST;
-}
\ No newline at end of file
+}
Stage::GetCurrent().Add( radioButton );
radioButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
radioButton.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
- radioButton.SetPosition( 0.0f, 0.0f );
+ radioButton.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
// Default selected
DALI_TEST_CHECK( radioButton.GetProperty<bool>( Button::Property::SELECTED ) == false );
RadioButton radioButton2 = RadioButton::New( "label" );
radioButton2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
radioButton2.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
- radioButton2.SetPosition( 0.0f, 0.0f );
+ radioButton2.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
RadioButton radioButton3 = RadioButton::New( "label" );
radioButton3.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
radioButton3.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
- radioButton3.SetPosition( 0.0f, 40.0f );
+ radioButton3.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 40.0f ));
Actor radioGroup = Actor::New();
Stage::GetCurrent().Add( radioGroup );
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 );
+ radioGroup.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
+ radioGroup.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0 ) );
radioGroup.Add( radioButton2 );
radioGroup.Add( radioButton3 );
}
END_TEST;
-}
\ No newline at end of file
+}
DALI_TEST_CHECK( scrollBar.GetScrollDirection() == ScrollBar::Vertical );
float scrollBarHeight = 100.0f;
- scrollBar.SetSize(20.0f, scrollBarHeight, 0.0f);
+ scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, scrollBarHeight, 0.0f) );
Stage::GetCurrent().Add( scrollBar );
// Create a source actor that owns the scroll properties required by the scroll bar
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);
+ scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) );
Stage::GetCurrent().Add( scrollBar );
DALI_TEST_CHECK( scrollBar );
float scrollBarHeight = 100.0f;
- scrollBar.SetSize(20.0f, scrollBarHeight, 0.0f);
+ scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, scrollBarHeight, 0.0f) );
Stage::GetCurrent().Add( scrollBar );
// Create a source actor that owns the scroll properties required by the scroll bar
DALI_TEST_CHECK( scrollBar );
float scrollBarHeight = 100.0f;
- scrollBar.SetSize(20.0f, scrollBarHeight, 0.0f);
+ scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, scrollBarHeight, 0.0f) );
Stage::GetCurrent().Add( scrollBar );
Actor indicator = scrollBar.GetScrollIndicator();
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);
+ scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) );
// Set the indicator height to be fixed to 50.0f
scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::Fixed);
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);
+ scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) );
// Set the indicator height to be fixed to 50.0f
scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::Fixed);
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);
+ scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) );
Stage::GetCurrent().Add( scrollBar );
ConnectionTracker connectionTracker;
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);
+ scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) );
Stage::GetCurrent().Add( scrollBar );
// Do not rely on stage size for UTC tests.
Vector2 viewPageSize( 720.0f, 1280.0f );
scrollView.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
- scrollView.SetSize( viewPageSize );
+ scrollView.SetProperty( Actor::Property::SIZE, viewPageSize );
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
scrollView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- scrollView.SetPosition( 0.0f, 0.0f, 0.0f );
+ scrollView.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ));
// Position rulers.
Property::Map rulerMap;
// Do not rely on stage size for UTC tests.
Vector2 viewPageSize( 720.0f, 1280.0f );
scrollView.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
- scrollView.SetSize( viewPageSize );
+ scrollView.SetProperty( Actor::Property::SIZE, viewPageSize );
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
scrollView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- scrollView.SetPosition( 0.0f, 0.0f, 0.0f );
+ scrollView.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ));
// Position rulers.
Property::Map rulerMap;
// Do not rely on stage size for UTC tests.
Vector2 viewPageSize( 720.0f, 1280.0f );
scrollView.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
- scrollView.SetSize( viewPageSize );
+ scrollView.SetProperty( Actor::Property::SIZE, viewPageSize );
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
scrollView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- scrollView.SetPosition( 0.0f, 0.0f, 0.0f );
+ scrollView.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ));
// Position rulers.
Property::Map rulerMap;
// Do not rely on stage size for UTC tests.
Vector2 viewPageSize( 720.0f, 1280.0f );
scrollView.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
- scrollView.SetSize( viewPageSize );
+ scrollView.SetProperty( Actor::Property::SIZE, viewPageSize );
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 );
+ scrollView.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ));
// Position rulers - expect Default rulers to be used which don't snap
Property::Map rulerMap;
Actor actorA = Actor::New();
const Vector3 positionA = Vector3(100.0f, 400.0f, 0.0f);
- actorA.SetPosition(positionA);
+ actorA.SetProperty( Actor::Property::POSITION, positionA );
scrollView.Add(actorA);
Actor actorB = Actor::New();
const Vector3 positionB = Vector3(500.0f, 200.0f, 0.0f);
- actorB.SetPosition(positionB);
+ actorB.SetProperty( Actor::Property::POSITION, positionB );
scrollView.Add(actorB);
Wait(application);
const Vector3 aPosition = Vector3(200.0f, 50.0f, 0.0f);
Actor a = Actor::New();
scrollView.Add(a);
- a.SetPosition(aPosition);
+ a.SetProperty( Actor::Property::POSITION, aPosition );
const Vector3 bPosition = Vector3(600.0f, 600.0f, 0.0f);
Actor b = Actor::New();
scrollView.Add(b);
- b.SetPosition(bPosition);
+ b.SetProperty( Actor::Property::POSITION, bPosition );
// Goto a random position, and execute snap (should not move)
Vector2 targetScroll = Vector2(500.0f, 500.0f);
ScrollView scrollView = ScrollView::New();
Stage::GetCurrent().Add( scrollView );
Vector2 stageSize = Stage::GetCurrent().GetSize();
- scrollView.SetSize(stageSize);
+ scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollView.ScrollCompletedSignal().Connect( &OnScrollComplete );
Actor image = Actor::New();
- image.SetSize(stageSize);
+ image.SetProperty( Actor::Property::SIZE, stageSize);
image.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
image.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollView.Add(image);
ScrollView scrollView = ScrollView::New();
Stage::GetCurrent().Add( scrollView );
Vector2 stageSize = Stage::GetCurrent().GetSize();
- scrollView.SetSize(stageSize);
+ scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
DALI_TEST_CHECK(scrollView.ConnectSignal( &tracker, "scrollCompleted", CallbackFunctor(&scrollCompleted) ));
Actor image = Actor::New();
- image.SetSize(stageSize);
+ image.SetProperty( Actor::Property::SIZE, stageSize);
image.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
image.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollView.Add(image);
scrollView.SetOvershootEnabled(true);
Stage::GetCurrent().Add( scrollView );
Vector2 stageSize = Stage::GetCurrent().GetSize();
- scrollView.SetSize(stageSize);
+ scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
ScrollView scrollView = ScrollView::New();
Stage::GetCurrent().Add( scrollView );
Vector2 stageSize = Stage::GetCurrent().GetSize();
- scrollView.SetSize(stageSize);
+ scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
ScrollView scrollView = ScrollView::New();
Stage::GetCurrent().Add( scrollView );
Vector2 stageSize = Stage::GetCurrent().GetSize();
- scrollView.SetSize(stageSize);
+ scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
gConstraintResult = Vector3::ZERO;
Actor a = Actor::New();
scrollView.Add(a);
- a.SetPosition( TEST_ACTOR_POSITION );
+ a.SetProperty( Actor::Property::POSITION, TEST_ACTOR_POSITION);
Wait(application);
Constraint constraint = Constraint::New<Vector3>( scrollView, Actor::Property::POSITION, TestSumConstraint( TEST_CONSTRAINT_OFFSET ) );
ScrollView scrollView = ScrollView::New();
Stage::GetCurrent().Add( scrollView );
Vector2 stageSize = Stage::GetCurrent().GetSize();
- scrollView.SetSize(stageSize);
+ scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
gConstraintResult = Vector3::ZERO;
Actor a = Actor::New();
scrollView.Add(a);
- a.SetPosition( TEST_ACTOR_POSITION );
+ a.SetProperty( Actor::Property::POSITION, TEST_ACTOR_POSITION);
Wait(application);
// apply this constraint to scrollview
Stage::GetCurrent().Add( scrollView );
Vector2 stageSize = Stage::GetCurrent().GetSize();
- scrollView.SetSize(stageSize);
+ scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
ScrollView scrollView = ScrollView::New();
Stage::GetCurrent().Add( scrollView );
Vector2 stageSize = Stage::GetCurrent().GetSize();
- scrollView.SetSize(stageSize);
+ scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
ScrollView scrollView = ScrollView::New();
Stage::GetCurrent().Add( scrollView );
Vector2 stageSize = Stage::GetCurrent().GetSize();
- scrollView.SetSize(stageSize);
+ scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
ScrollView scrollView = ScrollView::New();
Stage::GetCurrent().Add( scrollView );
Vector2 stageSize = Stage::GetCurrent().GetSize();
- scrollView.SetSize(stageSize);
+ scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
ScrollView scrollView = ScrollView::New();
Stage::GetCurrent().Add( scrollView );
Vector2 stageSize = Stage::GetCurrent().GetSize();
- scrollView.SetSize(stageSize);
+ scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
ScrollView scrollView = ScrollView::New();
Stage::GetCurrent().Add( scrollView );
Vector2 stageSize = Stage::GetCurrent().GetSize();
- scrollView.SetSize(stageSize);
+ scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
// Add an Actor to ScrollView,
Actor a = Actor::New();
scrollView.Add(a);
- a.SetPosition( TEST_ACTOR_POSITION );
+ a.SetProperty( Actor::Property::POSITION, TEST_ACTOR_POSITION);
Wait(application);
const Vector2 target = Vector2(100.0f, 100.0f);
ScrollView scrollView = ScrollView::New();
Stage::GetCurrent().Add( scrollView );
Vector2 stageSize = Stage::GetCurrent().GetSize();
- scrollView.SetSize(stageSize);
+ scrollView.SetProperty( Actor::Property::SIZE, stageSize);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
// Add an Actor to ScrollView,
Actor a = Actor::New();
scrollView.Add(a);
- a.SetPosition( TEST_ACTOR_POSITION );
+ a.SetProperty( Actor::Property::POSITION, TEST_ACTOR_POSITION);
Wait(application);
const Vector2 target = Vector2(100.0f, 100.0f);
// Do not rely on stage size for UTC tests.
Vector2 viewPageSize( 720.0f, 1280.0f );
scrollView.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
- scrollView.SetSize( viewPageSize );
+ scrollView.SetProperty( Actor::Property::SIZE, viewPageSize );
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
scrollView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- scrollView.SetPosition( 0.0f, 0.0f, 0.0f );
+ scrollView.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ));
// Position rulers.
// We set the X ruler to fixed to give us pages to snap to.
Constraint constraint;
ScrollView scrollView = ScrollView::New();
- scrollView.SetSize(size);
+ scrollView.SetProperty( Actor::Property::SIZE, size);
scrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
Actor container = Actor::New();
container.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
container.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
- container.SetSize( size );
+ container.SetProperty( Actor::Property::SIZE, size );
scrollView.Add( container );
constraint = Constraint::New<Vector3>( container, Actor::Property::SIZE, EqualToConstraint() );
constraint.Apply();
page.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
page.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- page.SetPosition( column * size.x, row * size.y );
+ page.SetProperty( Actor::Property::POSITION, Vector2( column * size.x, row * size.y ));
container.Add(page);
gPages.push_back(page);
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- view.SetSize(Stage::GetCurrent().GetSize());
+ view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize());
view.Add(actor);
Stage::GetCurrent().Add(view);
DALI_TEST_CHECK( 1u == taskList.GetTaskCount() );
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- view.SetSize(Stage::GetCurrent().GetSize());
+ view.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize());
view.Add(Actor::New());
Stage::GetCurrent().Add(view);
view.Activate();
Stage::GetCurrent().Add( slider );
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 );
+ slider.SetProperty( Actor::Property::SIZE, Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) );
+ slider.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
const float MIN_BOUND = 0.0f;
const float MAX_BOUND = 1.0f;
Stage::GetCurrent().Add( slider );
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 );
+ slider.SetProperty( Actor::Property::SIZE, Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) );
+ slider.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
const float MIN_BOUND = 0.0f;
const float MAX_BOUND = 1.0f;
Slider slider = Slider::New();
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 );
+ slider.SetProperty( Actor::Property::SIZE, Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) );
+ slider.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
Stage::GetCurrent().Add(slider);
application.SendNotification();
tet_infoline(" UtcDaliSuperBlurViewSetTexture ");
SuperBlurView blurView = SuperBlurView::New( BLUR_LEVELS );
- blurView.SetSize( 100.f, 100.f );
+ blurView.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
Texture inputTexture = CreateSolidColorTexture( application, Color::GREEN, 50, 50 );
blurView.SetTexture( inputTexture );
tet_infoline(" UtcDaliSuperBlurViewSetTexture2 - test setting a second texture ");
SuperBlurView blurView = SuperBlurView::New( BLUR_LEVELS );
- blurView.SetSize( 100.f, 100.f );
+ blurView.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
tet_infoline("Call SetTexture and add blurview to stage");
Texture inputTexture = CreateSolidColorTexture( application, Color::GREEN, 50, 50 );
SuperBlurView blurView = SuperBlurView::New( BLUR_LEVELS );
// create renderers for the original image and each blurred image
Stage::GetCurrent().Add( blurView );
- blurView.SetSize( 100.f, 100.f );
+ blurView.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
// Will create ResourceImage
blurView.SetProperty(SuperBlurView::Property::IMAGE_URL, TEST_IMAGE_FILE_NAME);
tet_infoline(" UtcDaliSuperBlurViewSetProperty ");
SuperBlurView blurView = SuperBlurView::New( BLUR_LEVELS );
- blurView.SetSize( 100.f, 100.f );
+ blurView.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
blurView.SetProperty(SuperBlurView::Property::IMAGE_URL, TEST_IMAGE_FILE_NAME);
Wait(application);
tet_infoline( "UtcDaliSuperBlurViewGetBlurredTexture" );
SuperBlurView blurView = SuperBlurView::New( BLUR_LEVELS );
- blurView.SetSize( 100.f,100.f );
+ blurView.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
Texture inputTexture = CreateSolidColorTexture( application, Color::GREEN, 100, 100 );
blurView.SetTexture( inputTexture );
tet_infoline(" UtcDaliSuperBlurViewSignal ");
SuperBlurView blurView = SuperBlurView::New( BLUR_LEVELS );
- blurView.SetSize( 100.f, 100.f );
+ blurView.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
Texture inputTexture = CreateSolidColorTexture( application, Color::GREEN, 50, 50 );
blurView.SetTexture( inputTexture );
DALI_TEST_CHECK( tableView );
Stage::GetCurrent().Add( tableView );
- tableView.SetSize( Dali::Vector2( 100.0f, 100.0f ) );
+ tableView.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
actor1 = Actor::New();
actor2 = Actor::New();
actor3 = Actor::New();
- actor1.SetSize( CELL_SIZE );
- actor2.SetSize( CELL_SIZE );
- actor3.SetSize( CELL_SIZE );
+ actor1.SetProperty( Actor::Property::SIZE, CELL_SIZE );
+ actor2.SetProperty( Actor::Property::SIZE, CELL_SIZE );
+ actor3.SetProperty( Actor::Property::SIZE, CELL_SIZE );
tableView.AddChild( actor1, TableView::CellPosition( 0, 0 ) );
tableView.AddChild( actor2, TableView::CellPosition( 0, 1 ) );
// Create a 1x1 table-view
TableView tableView = TableView::New(1,1);
- tableView.SetSize( Vector2( 100.0f, 100.0f ) );
+ tableView.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
DALI_TEST_CHECK( tableView );
// Test "rows" property
// Create a 10x10 table-view
TableView tableView = TableView::New(10,10);
Stage::GetCurrent().Add( tableView );
- tableView.SetSize( Dali::Vector2( 100.0f, 100.0f ) );
+ tableView.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f) );
DALI_TEST_CHECK( tableView );
// Create a third child actor with the cell alignment properties
Actor child3 = Actor::New();
- child3.SetSize( 5.f,5.f );
+ child3.SetProperty( Actor::Property::SIZE, Vector2( 5.f, 5.f ) );
child3.SetProperty( TableView::ChildProperty::CELL_HORIZONTAL_ALIGNMENT, "center" );
child3.SetProperty( TableView::ChildProperty::CELL_VERTICAL_ALIGNMENT, "bottom" );
tableView.Add( child3 );
DALI_TEST_CHECK( editor );
- editor.SetSize( 300.f, 50.f );
+ editor.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
DALI_TEST_CHECK( editor );
- editor.SetSize( 300.f, 50.f );
+ editor.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( editor );
- editor.SetSize( 300.f, 50.f );
+ editor.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
editor.SetProperty( Actor::Property::ANCHOR_POINT, 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 );
+ editor2.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
+ editor2.SetProperty( Actor::Property::POSITION, Vector2( 100.f, 100.f ));
Stage::GetCurrent().Add( editor2 );
Stage::GetCurrent().Add( editor );
- editor.SetSize( 300.f, 50.f );
+ editor.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
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.SetProperty( Actor::Property::SIZE, Vector2( 30.f, 50.f ) );
editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
editor.SetProperty( TextEditor::Property::TEXT, "Hello\nworl" );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
- editor.SetSize( 100.f, 50.f );
+ editor.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 50.f ) );
editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
editor.SetProperty( TextEditor::Property::TEXT, "Hello\nworl" );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
- editor.SetSize( 50.f, 50.f );
+ editor.SetProperty( Actor::Property::SIZE, Vector2( 50.f, 50.f ) );
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::TEXT, "Hello\nworld\nHello world" );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
- editor.SetSize( 100.f, 50.f );
+ editor.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 50.f ) );
editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
editor.SetProperty( TextEditor::Property::TEXT, "Hello\nworld\nHello world" );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
- editor.SetSize( 100.f, 50.f );
+ editor.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 50.f ) );
editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
editor.SetProperty( TextEditor::Property::TEXT, "DALi" );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
- editor.SetSize( 100.f, 50.f );
+ editor.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 50.f ) );
editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
editor.SetProperty( TextEditor::Property::SELECTION_HANDLE_PRESSED_IMAGE_LEFT, imagePropertyMap );
editor.SetProperty( TextEditor::Property::SELECTION_HANDLE_PRESSED_IMAGE_RIGHT, imagePropertyMap );
- editor.SetSize( 30.f, 500.f );
+ editor.SetProperty( Actor::Property::SIZE, Vector2( 30.f, 500.f ) );
editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Get the handle's actor.
Actor handle = activeLayer.GetChildAt( 1u );
- handle.SetSize( 100.f, 100.f );
+ handle.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
// Render and notify
application.SendNotification();
Stage::GetCurrent().Add( editor );
- editor.SetSize( 100.0f, 100.0f );
+ editor.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
lineCount = editor.GetProperty<int>( TextEditor::Property::LINE_COUNT );
DALI_TEST_EQUALS( lineCount, 14, TEST_LOCATION );
- editor.SetSize( 50.0f, 100.0f );
+ editor.SetProperty( Actor::Property::SIZE, Vector2( 50.f, 100.f ) );
lineCount = editor.GetProperty<int>( TextEditor::Property::LINE_COUNT );
DALI_TEST_EQUALS( lineCount, 28, TEST_LOCATION );
Stage::GetCurrent().Add( editor );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
- editor.SetSize( 50.f, 50.f );
+ editor.SetProperty( Actor::Property::SIZE, Vector2( 50.f, 50.f ) );
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 );
int lineCount =0 ;
TextEditor editor = TextEditor::New();
- editor.SetSize( 150.0f, 300.f );
+ editor.SetProperty( Actor::Property::SIZE, Vector2( 150.0f, 300.f ) );
editor.SetProperty( TextEditor::Property::TEXT, "Hello world Hello world" );
Stage::GetCurrent().Add( editor );
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
- editor.SetSize( 300.f, 50.f );
+ editor.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( editor );
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
- editor.SetSize( 300.f, 50.f );
+ editor.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( editor );
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
- editor.SetSize( 300.f, 50.f );
+ editor.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( editor );
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
- editor.SetSize( 300.f, 50.f );
+ editor.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( editor );
DALI_TEST_CHECK( field );
- field.SetSize( 300.f, 50.f );
+ field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
TextField field = TextField::New();
DALI_TEST_CHECK( field );
- field.SetSize( 300.f, 50.f );
+ field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( field );
- field.SetSize( 300.f, 50.f );
+ field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, 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 );
+ field2.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
+ field2.SetProperty( Actor::Property::POSITION, Vector2( 100.0f, 100.0f ));
Stage::GetCurrent().Add( field2 );
Stage::GetCurrent().Add( field );
- field.SetSize( 300.0f, 50.0f );
+ field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
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.SetProperty( Actor::Property::SIZE, Vector2( 30.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
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.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
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.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
field.SetProperty( TextField::Property::TEXT, "Thisisalongtextforthesizeofthetextfield." );
field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
- field.SetSize( 300.f, 50.f );
+ field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
field.SetProperty( TextField::Property::TEXT, "Thisisalongtextforthesizeofthetextfield." );
field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
- field.SetSize( 300.f, 50.f );
+ field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Property::Map 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.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
field.SetProperty( TextField::Property::TEXT, "Hello" );
field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
- field.SetSize( 300.f, 50.f );
+ field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
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.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( field );
- field.SetSize( 300.f, 50.f );
+ field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
field.SetProperty( TextField::Property::TEXT, longText );
field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
- field.SetSize( 300.f, 50.f );
+ field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// "ㅁ" is bigger then "ኢ"
- field.SetSize( Vector2( fieldWidth ,10.0f ) );
+ field.SetProperty( Actor::Property::SIZE, Vector2( fieldWidth ,10.0f ) );
field.SetResizePolicy( ResizePolicy::FIXED , Dimension::WIDTH );
field.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY , Dimension::HEIGHT );
TextField field = TextField::New();
field.SetProperty( TextField::Property::TEXT, "Text" );
- field.SetSize( 300.f, 50.f );
+ field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( field );
TextField field = TextField::New();
DALI_TEST_CHECK( field );
- field.SetSize( 300.f, 50.f );
+ field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( field );
TextField field = TextField::New();
DALI_TEST_CHECK( field );
- field.SetSize( 300.0f, 50.0f );
+ field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( field );
TextField field = TextField::New();
DALI_TEST_CHECK( field );
- field.SetSize( 300.0f, 50.0f );
+ field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( field );
TextField field = TextField::New();
DALI_TEST_CHECK( field );
- field.SetSize( 300.0f, 50.0f );
+ field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( field );
Stage::GetCurrent().Add( field );
- field.SetSize( 300.0f, 50.0f );
+ field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( textField );
- textField.SetSize( 300.f, 50.f );
+ textField.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
textField.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
textField.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( textField );
- textField.SetSize( 300.f, 50.f );
+ textField.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 50.f ) );
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 );
- label.SetSize( 360.0f, 20.f );
+ label.SetProperty( Actor::Property::SIZE, Vector2( 360.0f, 20.f ) );
// Turn on all the effects
label.SetProperty( TextLabel::Property::MULTI_LINE, false );
label.SetProperty( TextLabel::Property::AUTO_SCROLL_GAP, 50.0f );
// Turn on all the effects
label.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
label.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- label.SetSize( 360.0f, 10.f );
+ label.SetProperty( Actor::Property::SIZE, Vector2( 360.0f, 10.f ) );
try
{
label.SetProperty( TextLabel::Property::TEXT, "Hello world " );
label.SetProperty( DevelTextLabel::Property::IGNORE_SPACES_AFTER_TEXT, false );
- label.SetSize( 400.0f, 10.f );
+ label.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 10.f ) );
try
{
label.SetProperty( TextLabel::Property::TEXT, "Hello world" );
label.SetProperty( DevelTextLabel::Property::MATCH_SYSTEM_LANGUAGE_DIRECTION, true );
- label.SetSize( 400.0f, 10.f );
+ label.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 10.f ) );
try
{
int lineCount =0 ;
TextLabel label = TextLabel::New();
- label.SetSize( 300.0f, 300.f );
+ label.SetProperty( Actor::Property::SIZE, Vector2( 300.0f, 300.f ) );
label.SetProperty( TextLabel::Property::TEXT, "Hello world Hello world" );
label.SetProperty( TextLabel::Property::MULTI_LINE, true );
tet_infoline(" UtcDaliToolkitTextlabelTextStyle Setting Outline after Shadow");
TextLabel label = TextLabel::New();
- label.SetSize( 300.0f, 300.f );
+ label.SetProperty( Actor::Property::SIZE, Vector2( 300.0f, 300.f ) );
label.SetProperty( TextLabel::Property::TEXT, "Hello world Hello world" );
label.SetProperty( TextLabel::Property::POINT_SIZE, 12 );
Stage::GetCurrent().Add( label );
tet_infoline(" UtcDaliToolkitTextlabelTextFit");
TextLabel label = TextLabel::New();
Vector2 size( 460.0f, 100.0f );
- label.SetSize( size );
+ label.SetProperty( Actor::Property::SIZE, size );
label.SetProperty( TextLabel::Property::TEXT, "Hello world" );
// check point size
toolbar.AddOption( option );
Toolkit::Control divider = Toolkit::Control::New();
- divider.SetSize( 2.0f, 0.0f );
+ divider.SetProperty( Actor::Property::SIZE, Vector2( 2.0f, 0.0f ) );
divider.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::HEIGHT );
toolbar.AddDivider( divider );
Stage::GetCurrent().Add( toggleButton );
toggleButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
toggleButton.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
- toggleButton.SetPosition( 0.0f, 0.0f );
+ toggleButton.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
{// Check empty array
Property::Array toggleIcons;
Stage::GetCurrent().Add( toggleButton );
toggleButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
toggleButton.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
- toggleButton.SetPosition( 0.0f, 0.0f );
+ toggleButton.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
{ // Check empty tip array
Property::Array toggleIcons;
Stage::GetCurrent().Add( toggleButton );
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 );
+ toggleButton.SetProperty( Actor::Property::POSITION, BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS );
+ toggleButton.SetProperty( Actor::Property::SIZE, BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS );
Property::Array toggleIcons;
toggleIcons.PushBack( TEST_IMAGE_ONE ); //Icons path
DALI_TEST_EQUALS( index, 0, TEST_LOCATION );
END_TEST;
-}
\ No newline at end of file
+}
try
{
Actor control1 = CreateColorActor( Color::RED );
- control1.SetSize( Vector2( 100.f, 100.f ) );
+ control1.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
Actor control2 = CreateColorActor( Color::RED );
- control2.SetSize( Vector2( 100.f, 100.f ) );
+ control2.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
Actor control3 = CreateColorActor( Color::RED );
- control3.SetSize( Vector2( 100.f, 100.f ) );
+ control3.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
Actor control4 = CreateColorActor( Color::RED );
- control4.SetSize( Vector2( 100.f, 100.f ) );
+ control4.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
Actor control5 = CreateColorActor( Color::RED );
- control5.SetSize( Vector2( 100.f, 100.f ) );
+ control5.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
ToolBar toolbar = ToolBar::New();
- toolbar.SetSize( Vector2( 600.f, 100.f ) );
+ toolbar.SetProperty( Actor::Property::SIZE, Vector2( 600.f, 100.f ) );
application.Render();
application.SendNotification();
toolbar.AddControl( control5, 0.1f, Alignment::HorizontalRight, Alignment::Padding( 1.f, 1.f, 1.f, 1.f ) );
Actor control6 = CreateColorActor( Color::RED );
- control6.SetSize( Vector2( 100.f, 100.f ) );
+ control6.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
Actor control7 = CreateColorActor( Color::RED );
- control7.SetSize( Vector2( 100.f, 100.f ) );
+ control7.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
Actor control8 = CreateColorActor( Color::RED );
- control8.SetSize( Vector2( 100.f, 100.f ) );
+ control8.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
application.Render();
application.SendNotification();
control.SetProperty( DevelControl::Property::TOOLTIP, "Test" );
control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- control.SetSize( 100.0f, 100.0f );
+ control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
Actor rootActor = Stage::GetCurrent().GetRootLayer();
rootActor.Add( control );
Control control = Control::New();
control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- control.SetSize( 100.0f, 100.0f );
+ control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
control.SetProperty( DevelControl::Property::TOOLTIP,
Property::Map().Add( Tooltip::Property::CONTENT, "Test" )
.Add( Tooltip::Property::TAIL,
Control control = Control::New();
control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- control.SetSize( 100.0f, 100.0f );
+ control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
control.SetProperty( DevelControl::Property::TOOLTIP,
Property::Map().Add( Tooltip::Property::CONTENT,
Property::Array().Add( Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::IMAGE )
Control control = Control::New();
control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- control.SetSize( 100.0f, 100.0f );
+ control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
control.SetProperty( DevelControl::Property::TOOLTIP,
Property::Map().Add( Tooltip::Property::CONTENT, "Test" )
.Add( Tooltip::Property::POSITION, Tooltip::Position::BELOW )
Control control = Control::New();
control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- control.SetSize( 100.0f, 100.0f );
+ control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
control.SetProperty( DevelControl::Property::TOOLTIP,
Property::Map().Add( Tooltip::Property::CONTENT, "Test" )
.Add( Tooltip::Property::POSITION, Tooltip::Position::ABOVE )
Control control = Control::New();
control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- control.SetSize( 100.0f, 100.0f );
+ control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
control.SetProperty( DevelControl::Property::TOOLTIP,
Property::Map().Add( Tooltip::Property::CONTENT, "Test" )
.Add( Tooltip::Property::POSITION, Tooltip::Position::HOVER_POINT )
Control control = Control::New();
control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- control.SetSize( 100.0f, 100.0f );
+ control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
control.SetProperty( DevelControl::Property::TOOLTIP,
Property::Map().Add( Tooltip::Property::CONTENT, "Test" )
.Add( Tooltip::Property::MOVEMENT_THRESHOLD, 5 )
Control control = Control::New();
control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- control.SetSize( 100.0f, 100.0f );
+ control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
control.SetProperty( DevelControl::Property::TOOLTIP, "Test" );
Actor rootActor = Stage::GetCurrent().GetRootLayer();
control.SetProperty( DevelControl::Property::TOOLTIP, "Test" );
control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- control.SetSize( 100.0f, 100.0f );
+ control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
Actor rootActor = Stage::GetCurrent().GetRootLayer();
rootActor.Add( control );
Control control = Control::New();
control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- control.SetSize( 100.0f, 100.0f );
+ control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
control.SetProperty( DevelControl::Property::TOOLTIP,
Property::Map().Add( Tooltip::Property::CONTENT, "Test" )
.Add( Tooltip::Property::DISAPPEAR_ON_MOVEMENT, true )
control.SetProperty( DevelControl::Property::TOOLTIP, "Test" );
control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- control.SetSize( 100.0f, 100.0f );
+ control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
Actor rootActor = Stage::GetCurrent().GetRootLayer();
rootActor.Add( control );
Control control = Control::New();
control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER );
control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER );
- control.SetSize( stageSize );
+ control.SetProperty( Actor::Property::SIZE, stageSize );
control.SetProperty( DevelControl::Property::TOOLTIP,
Property::Map().Add( Tooltip::Property::CONTENT, "Test" )
.Add( Tooltip::Property::TAIL,
Control control = Control::New();
control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER );
- control.SetSize( stageSize );
+ control.SetProperty( Actor::Property::SIZE, stageSize );
control.SetProperty( DevelControl::Property::TOOLTIP,
Property::Map().Add( Tooltip::Property::CONTENT, "Test" )
.Add( Tooltip::Property::TAIL,
Control control = Control::New();
control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER );
control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER );
- control.SetSize( stageSize );
+ control.SetProperty( Actor::Property::SIZE, stageSize );
control.SetProperty( DevelControl::Property::TOOLTIP,
Property::Map().Add( Tooltip::Property::CONTENT, "Test" )
.Add( Tooltip::Property::TAIL,
.Add( Tooltip::Tail::Property::BELOW_VISUAL, "below-visual.png" ) )
.Add( Tooltip::Property::POSITION, Tooltip::Position::BELOW )
);
- control.SetX( -centerPoint.x );
+ control.SetProperty( Actor::Property::POSITION_X, -centerPoint.x );
Actor rootActor = Stage::GetCurrent().GetRootLayer();
rootActor.Add( control );
Control control = Control::New();
control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER );
control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER );
- control.SetSize( stageSize );
+ control.SetProperty( Actor::Property::SIZE, stageSize );
control.SetProperty( DevelControl::Property::TOOLTIP,
Property::Map().Add( Tooltip::Property::CONTENT, "Test" )
.Add( Tooltip::Property::TAIL,
.Add( Tooltip::Tail::Property::BELOW_VISUAL, "below-visual.png" ) )
.Add( Tooltip::Property::POSITION, Tooltip::Position::BELOW )
);
- control.SetX( centerPoint.x );
+ control.SetProperty( Actor::Property::POSITION_X, centerPoint.x );
Actor rootActor = Stage::GetCurrent().GetRootLayer();
rootActor.Add( control );
Vector3 vector(100.0f, 100.0f, 0.0f);
DALI_TEST_CHECK(vector != videoView.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
- videoView.SetSize( vector );
+ videoView.SetProperty( Actor::Property::SIZE, vector );
application.SendNotification();
application.Render();
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummyControl.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- dummyControl.SetSize(200.f, 200.f);
+ dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
Stage::GetCurrent().Add( dummyControl );
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize(200.f, 200.f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
application.SendNotification();
application.Render(0);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize(200.f, 200.f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
application.SendNotification();
application.Render(0);
DummyControl actor = DummyControl::New(true);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, borderVisual );
- actor.SetSize(2000, 2000);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
Stage::GetCurrent().Add(actor);
DummyControl actor = DummyControl::New(true);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, borderVisual );
- actor.SetSize(2000, 2000);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
Stage::GetCurrent().Add(actor);
DummyControl actor = DummyControl::New(true);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, borderVisual );
- actor.SetSize(2000, 2000);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
Stage::GetCurrent().Add(actor);
DummyControl actor = DummyControl::New(true);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize(2000, 2000);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
Stage::GetCurrent().Add(actor);
DummyControl actor = DummyControl::New(true);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize(2000, 2000);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
Stage::GetCurrent().Add(actor);
DummyControl actor = DummyControl::New( true );
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>( actor.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize( 2000, 2000 );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
Stage::GetCurrent().Add(actor);
DummyControl actor = DummyControl::New( true );
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>( actor.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize( 2000, 2000 );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
Stage::GetCurrent().Add(actor);
//Put the visual on the stage
DummyControl actor = DummyControl::New(true);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
- actor.SetSize(2000, 2000);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
Stage::GetCurrent().Add(actor);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
dummyImpl.SetLayout( DummyControl::Property::TEST_VISUAL, transformMap );
- dummy.SetSize(2000, 2000);
+ dummy.SetProperty( Actor::Property::SIZE, Vector2( 2000.f, 2000.f ) );
dummy.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
Stage::GetCurrent().Add(dummy);
application.SendNotification();
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
DALI_TEST_EQUALS( dummyControl.GetRendererCount(), 0, TEST_LOCATION );
- dummyControl.SetSize(200.f, 200.f);
+ dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
tet_infoline( "Add control with visual to stage and check renderer count is 1" );
Stage::GetCurrent().Add( dummyControl );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, textVisual );
DALI_TEST_EQUALS( dummyControl.GetRendererCount(), 0, TEST_LOCATION );
- dummyControl.SetSize(200.f, 200.f);
+ dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummyControl.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage::GetCurrent().Add( dummyControl );
textVisual.SetDepthIndex( 1 );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, textVisual );
- dummyControl.SetSize( 720.f, 640.f );
+ dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 720.f, 640.f ) );
application.SendNotification(); // force process events to ensure text visual
// adds renderer to the dummy control in OnRelayout
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, textVisual );
DALI_TEST_EQUALS( dummyControl.GetRendererCount(), 0, TEST_LOCATION );
- dummyControl.SetSize(200.f, 200.f);
+ dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummyControl.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage::GetCurrent().Add( dummyControl );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL2, anotherTestVisual2Replacement );
DALI_TEST_EQUALS( anotherTestVisual2Replacement.GetDepthIndex(), 2000, TEST_LOCATION );
- dummyControl.SetSize(200.f, 200.f);
+ dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
Stage::GetCurrent().Add( dummyControl );
END_TEST;
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL2, testVisual2 );
DALI_TEST_CHECK( testVisual2.GetDepthIndex() > testVisual1.GetDepthIndex() );
- dummyControl.SetSize(200.f, 200.f);
+ dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
Stage::GetCurrent().Add( dummyControl );
END_TEST;
DALI_TEST_EQUALS( testVisual3.GetDepthIndex(), 300, TEST_LOCATION );
DALI_TEST_EQUALS( DevelControl::IsVisualEnabled( dummyImpl, DummyControl::Property::TEST_VISUAL2 ), true, TEST_LOCATION );
- dummyControl.SetSize(200.f, 200.f);
+ dummyControl.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
Stage::GetCurrent().Add( dummyControl );
END_TEST;
Impl::DummyControl& dummyImpl = static_cast< Impl::DummyControl& >( dummy.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- dummy.SetSize( 200.f, 200.f );
+ dummy.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage::GetCurrent().Add( dummy );
Impl::DummyControl& dummyImpl = static_cast< Impl::DummyControl& >( dummy.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- dummy.SetSize( 200.f, 200.f );
+ dummy.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage::GetCurrent().Add( dummy );
Impl::DummyControl& dummyImpl = static_cast< Impl::DummyControl& >( dummy.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- dummy.SetSize( 200.f, 200.f );
+ dummy.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage::GetCurrent().Add( dummy );
Impl::DummyControl& dummyImpl = static_cast< Impl::DummyControl& >( dummy.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- dummy.SetSize( 200.f, 200.f );
+ dummy.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage::GetCurrent().Add( dummy );
Impl::DummyControl& dummyImpl = static_cast< Impl::DummyControl& >( dummy.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- dummy.SetSize( 200.f, 200.f );
+ dummy.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage::GetCurrent().Add( dummy );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
Stage::GetCurrent().Add( actor );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
Stage::GetCurrent().Add( actor );
DummyControl actor = DummyControl::New(true);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize(200.f, 200.f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
Stage::GetCurrent().Add( actor );
visual.SetTransformAndSize(DefaultTransform(), Vector2(200.f, 200.f));
DummyControl actor = DummyControl::New(true);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize(200.f, 200.f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
Stage::GetCurrent().Add( actor );
visual.SetTransformAndSize(DefaultTransform(), Vector2(200.f, 200.f));
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
Stage::GetCurrent().Add( actor );
DummyControl actor = DummyControl::New(true);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
Stage::GetCurrent().Add( actor );
visual.SetTransformAndSize(DefaultTransform(), Vector2(200.f, 200.f) );
DummyControl actor = DummyControl::New(true);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
Stage::GetCurrent().Add( actor );
visual.SetTransformAndSize(DefaultTransform(), Vector2(200.f, 200.f) );
DummyControl actor = DummyControl::New(true);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
Stage::GetCurrent().Add( actor );
visual.SetTransformAndSize(DefaultTransform(), Vector2( 200.f, 200.f ) );
DummyControl actor = DummyControl::New(true);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
Stage::GetCurrent().Add( actor );
visual.SetTransformAndSize(DefaultTransform(), Vector2( 200.f, 200.f ) );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
Stage::GetCurrent().Add( actor );
visual.SetTransformAndSize(DefaultTransform(), Vector2( 200.f, 200.f ) );
DummyControl actor = DummyControl::New(true);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize( 200.0f, 200.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
Stage::GetCurrent().Add( actor );
application.SendNotification();
DummyControl actor = DummyControl::New(true);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
- actor.SetSize( 200.0f, 200.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
Stage::GetCurrent().Add( actor );
application.SendNotification();
WebView view = WebView::New();
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 );
+ view.SetProperty( Actor::Property::POSITION, Vector2( 0, 0 ));
+ view.SetProperty( Actor::Property::SIZE, Vector2( 800, 600 ) );
Stage::GetCurrent().Add( view );
application.SendNotification();
application.Render();
view.LoadUrl( TEST_URL2 );
view.Suspend();
- view.SetSize( 400, 300 );
+ view.SetProperty( Actor::Property::SIZE, Vector2( 400, 300 ) );
application.SendNotification();
application.Render();
Test::EmitGlobalTimerSignal();
WebView view = WebView::New();
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 );
+ view.SetProperty( Actor::Property::POSITION, Vector2( 0, 0 ));
+ view.SetProperty( Actor::Property::SIZE, Vector2( 800, 600 ) );
Stage::GetCurrent().Add( view );
application.SendNotification();
*
* // set position and format
* effectsView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- * effectsView.SetSize( Vector2( width, height) );
+ * effectsView.SetProperty( Actor::Property::SIZE, Vector2( width, height) );
* effectsView.SetPixelFormat( Pixel::RGBA8888 );
*
* // set effect type and properties
* ImageView shadowPlaneBg = ImageView::New(); //This will be the shadow plane
* 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.
+ * shadowPlaneBg.SetProperty( Actor::Property::SIZE, Vector2(700.0f, 700.0f) );
+ * shadowPlaneBg.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, -30.0f) ); //Just behind the image view.
* shadowView.SetShadowPlaneBackground(ShadowPlane);
*
* Actor pointLight = Actor::New(); // This will be the light source
- * pointLight.SetPosition(300.0f, 250.0f, 600.0f);
+ * pointLight.SetProperty( Actor::Property::POSITION, Vector3(300.0f, 250.0f, 600.0f) );
* Stage::GetCurrent().Add(pointLight);
* shadowView.SetPointLight(pointLight);
*
*
* // initialise\n
* SuperBlurView blurView = SuperBlurView::New( blurLevels );\n
- * blurView.SetSize(); // it is important to set the display size before set the input image!!
+ * blurView.SetProperty( Actor::Property::SIZE, size ); // it is important to set the display size before set the input image!!
* Stage::GetCurrent().Add(blurView);\n
*
* // Set the input image
mFocusIndicatorActor = Toolkit::ImageView::New(focusBorderImagePath);
mFocusIndicatorActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mFocusIndicatorActor.SetZ( 1.0f );
+ mFocusIndicatorActor.SetProperty( Actor::Property::POSITION_Z, 1.0f );
// Apply size constraint to the focus indicator
mFocusIndicatorActor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
}
}
- child.SetPosition( GetPosition( mPadding, mHorizontal, mVertical , newChildSize, currentChildSize ) );
+ child.SetProperty( Actor::Property::POSITION, GetPosition( mPadding, mHorizontal, mVertical , newChildSize, currentChildSize ) );
if( renegotiate )
{
void BloomView::OnSizeSet(const Vector3& targetSize)
{
mTargetSize = Vector2(targetSize);
- mChildrenRoot.SetSize(targetSize);
- mCompositeActor.SetSize(targetSize);
- mTargetActor.SetSize(targetSize);
+ mChildrenRoot.SetProperty( Actor::Property::SIZE, targetSize);
+ mCompositeActor.SetProperty( Actor::Property::SIZE, targetSize);
+ mTargetActor.SetProperty( Actor::Property::SIZE, targetSize);
// Children render camera must move when GaussianBlurView object is
// resized. This is since we cannot change render target size - so we need
// this is the trade off for not being able to modify render target size
// Change camera z position based on GaussianBlurView actor height
float cameraPosConstraintScale = 0.5f / tanf(ARBITRARY_FIELD_OF_VIEW * 0.5f);
- mRenderFullSizeCamera.SetZ( mTargetSize.height * cameraPosConstraintScale);
+ mRenderFullSizeCamera.SetProperty( Actor::Property::POSITION_Z, mTargetSize.height * cameraPosConstraintScale);
// if we have already activated the blur, need to update render target sizes now to reflect the new size of this actor
if(mActivated)
mRenderDownsampledCamera.SetAspectRatio(mDownsampledWidth / mDownsampledHeight);
mRenderDownsampledCamera.SetType(Dali::Camera::FREE_LOOK); // camera orientation based solely on actor
- mRenderDownsampledCamera.SetPosition(0.0f, 0.0f, ((mDownsampledHeight * 0.5f) / tanf(ARBITRARY_FIELD_OF_VIEW * 0.5f)));
+ mRenderDownsampledCamera.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, ( ( mDownsampledHeight * 0.5f ) / tanf( ARBITRARY_FIELD_OF_VIEW * 0.5f ) ) ) );
// Create and place a camera for the children render, corresponding to its render target size
mRenderFullSizeCamera.SetFieldOfView(ARBITRARY_FIELD_OF_VIEW);
mRenderFullSizeCamera.SetType(Dali::Camera::FREE_LOOK); // camera orientation based solely on actor
float cameraPosConstraintScale = 0.5f / tanf(ARBITRARY_FIELD_OF_VIEW * 0.5f);
- mRenderFullSizeCamera.SetPosition(0.0f, 0.0f, mTargetSize.height * cameraPosConstraintScale);
+ mRenderFullSizeCamera.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, mTargetSize.height * cameraPosConstraintScale ) );
//////////////////////////////////////////////////////
// Pass size change onto GaussianBlurView, so it matches
- mGaussianBlurView.SetSize(mTargetSize);
+ mGaussianBlurView.SetProperty( Actor::Property::SIZE, mTargetSize );
GetImpl(mGaussianBlurView).AllocateResources();
mGaussianBlurView.SetProperty( Actor::Property::VISIBLE, true );
Renderer bloomRenderer = CreateRenderer( BASIC_VERTEX_SOURCE, BLOOM_EXTRACT_FRAGMENT_SOURCE );
SetRendererTexture( bloomRenderer, mRenderTargetForRenderingChildren );
mBloomExtractActor.AddRenderer( bloomRenderer );
- mBloomExtractActor.SetSize( mDownsampledWidth, mDownsampledHeight ); // size needs to match render target
+ mBloomExtractActor.SetProperty( Actor::Property::SIZE, Vector2( mDownsampledWidth, mDownsampledHeight ) ); // size needs to match render target
// set GaussianBlurView to blur our extracted bloom
mGaussianBlurView.SetUserImageAndOutputRenderTarget( mBloomExtractTarget.GetColorTexture(), blurExtractTarget );
{
// Create the root actor, all the meshActor should be its children
mBubbleRoot = Actor::New();
- mBubbleRoot.SetSize(mMovementArea);
+ mBubbleRoot.SetProperty( Actor::Property::SIZE, mMovementArea );
// Prepare the frame buffer to store the color adjusted background texture
Vector2 imageSize = Vector2( mMovementArea.width/4.f, mMovementArea.height/4.f );
//Create RenderTask source actor
Actor sourceActor = Actor::New();
- sourceActor.SetSize( mMovementArea );
+ sourceActor.SetProperty( Actor::Property::SIZE, mMovementArea );
sourceActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
sourceActor.RegisterProperty( "uHSVDelta", hsvDelta );
Stage::GetCurrent().Add( sourceActor );
Enable();
}
- mChildrenRoot.SetSize( targetSize );
+ mChildrenRoot.SetProperty( Actor::Property::SIZE, targetSize );
Control::OnSizeSet( targetSize );
}
mCameraForChildren.SetNearClippingPlane(1.0f);
mCameraForChildren.SetAspectRatio(mTargetSize.width / mTargetSize.height);
mCameraForChildren.SetType(Dali::Camera::FREE_LOOK); // camera orientation based solely on actor
- mCameraForChildren.SetPosition(0.0f, 0.0f, mTargetSize.height * cameraPosScale);
- mCameraForChildren.SetZ( mTargetSize.height * cameraPosScale );
+ mCameraForChildren.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, mTargetSize.height * cameraPosScale ) );
+ mCameraForChildren.SetProperty( Actor::Property::POSITION_Z, mTargetSize.height * cameraPosScale );
}
}
Dali::Actor child = mChildrenNodes[i].actor.GetHandle();
if( child )
{
- child.SetX( YGNodeLayoutGetLeft( mChildrenNodes[i].node ) );
- child.SetY( YGNodeLayoutGetTop( mChildrenNodes[i].node ) );
+ child.SetProperty( Actor::Property::POSITION_X, YGNodeLayoutGetLeft( mChildrenNodes[i].node ) );
+ child.SetProperty( Actor::Property::POSITION_Y, YGNodeLayoutGetTop( mChildrenNodes[i].node ) );
}
}
}
{
mTargetSize = Vector2(targetSize);
- mChildrenRoot.SetSize(targetSize);
+ mChildrenRoot.SetProperty( Actor::Property::SIZE, targetSize);
if( !mBlurUserImage )
{
- mCompositingActor.SetSize(targetSize);
- mTargetActor.SetSize(targetSize);
+ mCompositingActor.SetProperty( Actor::Property::SIZE, targetSize);
+ mTargetActor.SetProperty( Actor::Property::SIZE, targetSize);
// Children render camera must move when GaussianBlurView object is resized. This is since we cannot change render target size - so we need to remap the child actors' rendering
// accordingly so they still exactly fill the render target. Note that this means the effective resolution of the child render changes as the GaussianBlurView object changes
// size, this is the trade off for not being able to modify render target size
// Change camera z position based on GaussianBlurView actor height
float cameraPosConstraintScale = 0.5f / tanf(ARBITRARY_FIELD_OF_VIEW * 0.5f);
- mRenderFullSizeCamera.SetZ(mTargetSize.height * cameraPosConstraintScale);
+ mRenderFullSizeCamera.SetProperty( Actor::Property::POSITION_Z, mTargetSize.height * cameraPosConstraintScale);
}
mRenderDownsampledCamera.SetAspectRatio(mDownsampledWidth / mDownsampledHeight);
mRenderDownsampledCamera.SetType(Dali::Camera::FREE_LOOK); // camera orientation based solely on actor
- mRenderDownsampledCamera.SetPosition(0.0f, 0.0f, ((mDownsampledHeight * 0.5f) / tanf(ARBITRARY_FIELD_OF_VIEW * 0.5f)));
+ mRenderDownsampledCamera.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, ((mDownsampledHeight * 0.5f) / tanf(ARBITRARY_FIELD_OF_VIEW * 0.5f))));
// setup for normal operation
if(!mBlurUserImage)
mRenderFullSizeCamera.SetType(Dali::Camera::FREE_LOOK); // camera orientation based solely on actor
float cameraPosConstraintScale = 0.5f / tanf(ARBITRARY_FIELD_OF_VIEW * 0.5f);
- mRenderFullSizeCamera.SetPosition(0.0f, 0.0f, mTargetSize.height * cameraPosConstraintScale);
+ mRenderFullSizeCamera.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, mTargetSize.height * cameraPosConstraintScale));
// create offscreen buffer of new size to render our child actors to
mRenderTargetForRenderingChildren = FrameBuffer::New( mTargetSize.width, mTargetSize.height, FrameBuffer::Attachment::NONE );
mRenderTarget2.AttachColorTexture( texture );
// size needs to match render target
- mHorizBlurActor.SetSize(mDownsampledWidth, mDownsampledHeight);
+ mHorizBlurActor.SetProperty( Actor::Property::SIZE, Vector2(mDownsampledWidth, mDownsampledHeight) );
// size needs to match render target
- mVertBlurActor.SetSize(mDownsampledWidth, mDownsampledHeight);
+ mVertBlurActor.SetProperty( Actor::Property::SIZE, Vector2(mDownsampledWidth, mDownsampledHeight) );
SetRendererTexture( mVertBlurActor.GetRendererAt(0), mRenderTarget2 );
// set gaussian blur up for new sized render targets
mSpineEffectShader.RegisterProperty(PROPERTY_TEXTURE_WIDTH, 2.f );
mControlSize = Vector2( mPageSize.width * 2.f, mPageSize.height );
- Self().SetSize( mControlSize );
+ Self().SetProperty( Actor::Property::SIZE, mControlSize );
mTurningPageLayer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
}
mSpineEffectShader.RegisterProperty(PROPERTY_TEXTURE_WIDTH, 1.f );
mControlSize = mPageSize;
- Self().SetSize( mPageSize );
+ Self().SetProperty( Actor::Property::SIZE, mPageSize );
mTurningPageLayer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT );
}
for( int i = 0; i < NUMBER_OF_CACHED_PAGES; i++ )
{
mPages.push_back( Page() );
- mPages[i].actor.SetSize( mPageSize );
+ mPages[i].actor.SetProperty( Actor::Property::SIZE, mPageSize );
Self().Add( mPages[i].actor );
}
for( int i = 0; i < NUMBER_OF_CACHED_PAGES_EACH_SIDE; i++ )
{
AddPage( i );
- mPages[i].actor.SetZ( -static_cast<float>( i )*STATIC_PAGE_INTERVAL_DISTANCE );
+ mPages[i].actor.SetProperty( Actor::Property::POSITION_Z, -static_cast<float>( i )*STATIC_PAGE_INTERVAL_DISTANCE );
}
mPages[0].actor.SetProperty( Actor::Property::VISIBLE,true);
mShadowPlaneBackground = Actor::New();
mShadowPlaneBackground.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mShadowPlaneBackground.SetSize( mControlSize );
+ mShadowPlaneBackground.SetProperty( Actor::Property::SIZE, mControlSize );
Self().Add( mShadowPlaneBackground );
mShadowView.SetShadowPlaneBackground( mShadowPlaneBackground );
mPointLight = Actor::New();
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 );
+ mPointLight.SetProperty( Actor::Property::POSITION, Vector3( 0.f, 0.f, mPageSize.width*POINT_LIGHT_HEIGHT_RATIO ));
Self().Add( mPointLight );
mShadowView.SetPointLight( mPointLight );
if( mPointLight )
{
- mPointLight.SetPosition( 0.f, 0.f, mPageSize.width*POINT_LIGHT_HEIGHT_RATIO );
+ mPointLight.SetProperty( Actor::Property::POSITION, Vector3( 0.f, 0.f, mPageSize.width*POINT_LIGHT_HEIGHT_RATIO ));
}
for( size_t i=0; i<mPages.size(); i++ )
{
- mPages[i].actor.SetSize( mPageSize );
+ mPages[i].actor.SetProperty( Actor::Property::SIZE, mPageSize );
}
OnPageTurnViewInitialize();
if( mShadowPlaneBackground )
{
- mShadowPlaneBackground.SetSize( mControlSize );
+ mShadowPlaneBackground.SetProperty( Actor::Property::SIZE, mControlSize );
}
}
{
if(mCurrentPageIndex+i < mTotalPageCount)
{
- mPages[( mCurrentPageIndex+i )%NUMBER_OF_CACHED_PAGES].actor.SetZ( -static_cast<float>( i )*STATIC_PAGE_INTERVAL_DISTANCE );
+ mPages[( mCurrentPageIndex+i )%NUMBER_OF_CACHED_PAGES].actor.SetProperty( Actor::Property::POSITION_Z, -static_cast<float>( i )*STATIC_PAGE_INTERVAL_DISTANCE );
}
if( mCurrentPageIndex >= i + 1 )
{
- mPages[( mCurrentPageIndex-i-1 )%NUMBER_OF_CACHED_PAGES].actor.SetZ( -static_cast<float>( i )*STATIC_PAGE_INTERVAL_DISTANCE );
+ mPages[( mCurrentPageIndex-i-1 )%NUMBER_OF_CACHED_PAGES].actor.SetProperty( Actor::Property::POSITION_Z, -static_cast<float>( i )*STATIC_PAGE_INTERVAL_DISTANCE );
}
}
}
mPopupLayout.SetResizePolicy( ResizePolicy::USE_ASSIGNED_SIZE, Dimension::WIDTH );
mPopupLayout.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
- mPopupLayout.SetSize( Stage::GetCurrent().GetSize().x * DEFAULT_RELATIVE_PARENT_WIDTH, 0.0f );
+ mPopupLayout.SetProperty( Actor::Property::SIZE, Vector2( Stage::GetCurrent().GetSize().x * DEFAULT_RELATIVE_PARENT_WIDTH, 0.0f ) );
mPopupLayout.SetFitHeight( 0 ); // Set row to fit.
mPopupLayout.SetFitHeight( 1 ); // Set row to fit.
case Toolkit::Popup::ZOOM:
{
// Zoom animations start fully zoomed out.
- mPopupContainer.SetScale( Vector3::ZERO );
+ mPopupContainer.SetProperty( Actor::Property::SCALE, Vector3::ZERO );
break;
}
}
else
{
- mPopupContainer.SetScale( transitionIn ? Vector3::ONE : Vector3::ZERO );
+ mPopupContainer.SetProperty( Actor::Property::SCALE, transitionIn ? Vector3::ONE : Vector3::ZERO );
}
break;
}
mTailImage.SetProperty( Dali::Actor::Property::NAME, "tailImage" );
mTailImage.SetProperty( Actor::Property::PARENT_ORIGIN, parentOrigin );
mTailImage.SetProperty( Actor::Property::ANCHOR_POINT, anchorPoint );
- mTailImage.SetPosition( position );
+ mTailImage.SetProperty( Actor::Property::POSITION, position );
if( mPopupBackgroundImage )
{
// Always the full size of the stage.
backing.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
- backing.SetSize( Stage::GetCurrent().GetSize() );
+ backing.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize() );
// Catch events.
backing.SetProperty( Actor::Property::SENSITIVE, true );
mPopupBackgroundImage.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( mBackgroundBorder.left + mBackgroundBorder.right, mBackgroundBorder.top + mBackgroundBorder.bottom, 0.0f ) );
// Adjust the position of the background so the transparent areas are set appropriately
- mPopupBackgroundImage.SetPosition( ( mBackgroundBorder.right - mBackgroundBorder.left ) * 0.5f, ( mBackgroundBorder.bottom - mBackgroundBorder.top ) * 0.5f );
+ mPopupBackgroundImage.SetProperty( Actor::Property::POSITION, Vector2( ( mBackgroundBorder.right - mBackgroundBorder.left ) * 0.5f, ( mBackgroundBorder.bottom - mBackgroundBorder.top ) * 0.5f ));
}
}
}
// Set the final position.
- mPopupContainer.SetPosition( newPosition );
+ mPopupContainer.SetProperty( Actor::Property::POSITION, newPosition );
}
void Popup::OnRelayout( const Vector2& size, RelayoutContainer& container )
anchorPoint = meshInfo.pivot;
actor.SetProperty( Actor::Property::ANCHOR_POINT, anchorPoint );
- actor.SetSize( Vector3( meshInfo.size.x, meshInfo.size.y, meshInfo.size.z ) );
+ actor.SetProperty( Actor::Property::SIZE, Vector3( meshInfo.size.x, meshInfo.size.y, meshInfo.size.z ) );
actor.AddRenderer( renderer );
- actor.SetScale( scale );
+ actor.SetProperty( Actor::Property::SCALE, scale );
actor.RotateBy( orientation );
- actor.SetPosition( translation );
+ actor.SetProperty( Actor::Property::POSITION, translation );
shader.RegisterProperty( "uLightType", ( scene3dView.GetLightType() & ~Toolkit::Scene3dView::LightType::IMAGE_BASED_LIGHT ) );
shader.RegisterProperty( "uLightVector", scene3dView.GetLightVector() );
else
{
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- actor.SetPosition( translation );
+ actor.SetProperty( Actor::Property::POSITION, translation );
actor.RotateBy( orientation );
- actor.SetSize( actorSize );
+ actor.SetProperty( Actor::Property::SIZE, actorSize );
}
tempNode = node->GetChild( "camera" );
mDefaultCamera.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mDefaultCamera.SetType( type );
mDefaultCamera.SetNearClippingPlane( nearPlane );
- mDefaultCamera.SetPosition( cameraPosition );
+ mDefaultCamera.SetProperty( Actor::Property::POSITION, cameraPosition );
return true;
}
// Set indicator height according to the indicator's height policy
if(mIndicatorHeightPolicy == Toolkit::ScrollBar::Fixed)
{
- mIndicator.SetSize(Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, mIndicatorFixedHeight);
+ mIndicator.SetProperty( Actor::Property::SIZE, Vector2( Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, mIndicatorFixedHeight) );
}
else
{
{
if(mIndicatorHeightPolicy == Toolkit::ScrollBar::Fixed)
{
- mIndicator.SetSize(size.width, mIndicatorFixedHeight);
+ mIndicator.SetProperty( Actor::Property::SIZE, Vector2( size.width, mIndicatorFixedHeight ) );
}
Control::OnSizeSet( size );
if(mIndicatorHeightPolicy == Toolkit::ScrollBar::Fixed)
{
- mIndicator.SetSize(Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, mIndicatorFixedHeight);
+ mIndicator.SetProperty( Actor::Property::SIZE, Vector2( Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, mIndicatorFixedHeight) );
}
}
* Actor bounceActor = CreateBouncingEffectActor( bouncePropertyIndex );
* // set size and color
- * bounceActor.SetSize(720.f, 42.f );
+ * bounceActor.SetProperty( Actor::Property::SIZE, Vector2(720.f, 42.f );
* bounceActor.SetProperty( Actor::Property::COLOR, Vector4( 0.0,0.64f,0.85f,0.25f ) );
*
* // add to stage
Actor self = Self();
// The ItemView size should match the active layout size
- self.SetSize(targetSize);
+ self.SetProperty( Actor::Property::SIZE, targetSize);
mActiveLayoutTargetSize = targetSize;
// Switch to the new layout
Vector3 size;
mActiveLayout->GetItemSize( itemId, targetSize, size );
- actor.SetSize( size.GetVectorXY() );
+ actor.SetProperty( Actor::Property::SIZE, size.GetVectorXY() );
}
// Refresh the new layout
{
Vector3 size;
mActiveLayout->GetItemSize( item.first, mActiveLayoutTargetSize, size );
- item.second.SetSize( size.GetVectorXY() );
+ item.second.SetProperty( Actor::Property::SIZE, size.GetVectorXY() );
mActiveLayout->ApplyConstraints( item.second, item.first, layoutSize, Self() );
}
// make sure height is set, since we only create a constraint for image width
mOvershootSize = mAttachedScrollView.GetOvershootSize();
- mOvershootOverlay.SetSize( mOvershootSize );
+ mOvershootOverlay.SetProperty( Actor::Property::SIZE, mOvershootSize );
mAttachedScrollView.AddOverlay(mOvershootOverlay);
if(IsVertical())
{
mOvershootOverlay.SetProperty( Actor::Property::ORIENTATION, Quaternion( Quaternion( Radian( 0.0f ), Vector3::ZAXIS ) ) );
- mOvershootOverlay.SetSize(parentSize.width, GetBounceActorHeight(parentSize.width, mOvershootSize.height), size.depth);
+ mOvershootOverlay.SetProperty( Actor::Property::SIZE, Vector3( parentSize.width, GetBounceActorHeight(parentSize.width, mOvershootSize.height), size.depth ) );
}
else
{
mOvershootOverlay.SetProperty( Actor::Property::ORIENTATION, Quaternion( Quaternion( Radian( 1.5f * Math::PI ), Vector3::ZAXIS ) ) );
- mOvershootOverlay.SetSize(parentSize.height, GetBounceActorHeight(parentSize.height, mOvershootSize.height), size.depth);
+ mOvershootOverlay.SetProperty( Actor::Property::SIZE, Vector3( parentSize.height, GetBounceActorHeight(parentSize.height, mOvershootSize.height), size.depth ) );
relativeOffset = Vector3(0.0f, 1.0f, 0.0f);
}
- mOvershootOverlay.SetPosition(relativeOffset * parentSize);
+ mOvershootOverlay.SetProperty( Actor::Property::POSITION, relativeOffset * parentSize );
}
else
{
if(IsVertical())
{
mOvershootOverlay.SetProperty( Actor::Property::ORIENTATION, Quaternion( Quaternion( Radian( Math::PI ), Vector3::ZAXIS ) ) );
- mOvershootOverlay.SetSize(parentSize.width, GetBounceActorHeight(parentSize.width, mOvershootSize.height), size.depth);
+ mOvershootOverlay.SetProperty( Actor::Property::SIZE, Vector3( parentSize.width, GetBounceActorHeight(parentSize.width, mOvershootSize.height), size.depth ) );
relativeOffset = Vector3(1.0f, 1.0f, 0.0f);
}
else
{
mOvershootOverlay.SetProperty( Actor::Property::ORIENTATION, Quaternion( Quaternion( Radian( 0.5f * Math::PI ), Vector3::ZAXIS ) ) );
- mOvershootOverlay.SetSize(parentSize.height, GetBounceActorHeight(parentSize.height, mOvershootSize.height), size.depth);
+ mOvershootOverlay.SetProperty( Actor::Property::SIZE, Vector3( parentSize.height, GetBounceActorHeight(parentSize.height, mOvershootSize.height), size.depth ) );
relativeOffset = Vector3(1.0f, 0.0f, 0.0f);
}
- mOvershootOverlay.SetPosition(relativeOffset * parentSize);
+ mOvershootOverlay.SetProperty( Actor::Property::POSITION, relativeOffset * parentSize );
}
}
}
// position, instead parent the shadow plane drawable on the shadow plane passed in.
mShadowPlaneBg.Add( mShadowPlane );
mShadowPlane.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mShadowPlane.SetZ( 1.0f );
+ mShadowPlane.SetProperty( Actor::Property::POSITION_Z, 1.0f );
ConstrainCamera();
mCameraActor.SetNearClippingPlane( 1.0f );
mCameraActor.SetType( Dali::Camera::FREE_LOOK ); // Camera orientation constrained to point at shadow plane world position
mCameraActor.SetProperty( Actor::Property::ORIENTATION, Quaternion(Radian(Degree(180)), Vector3::YAXIS) );
- mCameraActor.SetPosition(DEFAULT_LIGHT_POSITION);
+ mCameraActor.SetProperty( Actor::Property::POSITION, DEFAULT_LIGHT_POSITION );
// Create render targets needed for rendering from light's point of view
mSceneFromLightRenderTarget = FrameBuffer::New( stageSize.width, stageSize.height, FrameBuffer::Attachment::NONE );
DisplayValue( mValue, false ); // Run this last to display the correct value
// Size the Slider actor to a default
- self.SetSize( DEFAULT_HIT_REGION.x, DEFAULT_HIT_REGION.y );
+ self.SetProperty( Actor::Property::SIZE, Vector2( DEFAULT_HIT_REGION.x, DEFAULT_HIT_REGION.y ) );
// Connect to the touch signal
self.TouchSignal().Connect( this, &Slider::OnTouch );
float x = mDomain.from.x + percent * ( mDomain.to.x - mDomain.from.x );
- mHandle.SetX( x );
+ mHandle.SetProperty( Actor::Property::POSITION_X, x );
// Progress bar
if( mProgress )
{
- mProgress.SetSize( x, GetTrackRegion().y );
+ mProgress.SetProperty( Actor::Property::SIZE, Vector2( x, GetTrackRegion().y ) );
}
// Signals
mTrackRegion = size;
if( mTrack )
{
- mTrack.SetSize( mTrackRegion );
+ mTrack.SetProperty( Actor::Property::SIZE, mTrackRegion );
}
ResizeProgressRegion( Vector2( 0.0f, mTrackRegion.y ) );
{
if( mProgress )
{
- mProgress.SetSize( region );
+ mProgress.SetProperty( Actor::Property::SIZE, region );
}
}
{
if( mHandle )
{
- mHandle.SetSize( size );
+ mHandle.SetProperty( Actor::Property::SIZE, size );
}
}
popup.Add( mPopupArrow );
mPopup = CreatePopup();
- mPopup.SetSize( 0.0f, VALUE_POPUP_HEIGHT );
+ mPopup.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, VALUE_POPUP_HEIGHT ) );
mPopupArrow.Add( mPopup );
return popup;
if( mHitArea )
{
- mHitArea.SetSize( mHitRegion );
+ mHitArea.SetProperty( Actor::Property::SIZE, mHitRegion );
}
}
if( mTrack )
{
- mTrack.SetSize( mTrackRegion );
+ mTrack.SetProperty( Actor::Property::SIZE, mTrackRegion );
}
ResizeProgressRegion( Vector2( 0.0f, mTrackRegion.y ) );
GAUSSIAN_BLUR_RENDER_TARGET_PIXEL_FORMAT,
GAUSSIAN_BLUR_DOWNSAMPLE_WIDTH_SCALE, GAUSSIAN_BLUR_DOWNSAMPLE_HEIGHT_SCALE, true );
mGaussianBlurView[idx].SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER );
- mGaussianBlurView[idx].SetSize(mTargetSize);
+ mGaussianBlurView[idx].SetProperty( Actor::Property::SIZE, mTargetSize );
Stage::GetCurrent().Add( mGaussianBlurView[idx] );
mGaussianBlurView[idx].SetUserImageAndOutputRenderTarget( texture, mBlurredImage[idx] );
if( cellData.horizontalAlignment == HorizontalAlignment::LEFT )
{
- actor.SetX( left + mPadding.width + padding.left );
+ actor.SetProperty( Actor::Property::POSITION_X, left + mPadding.width + padding.left );
}
else if( cellData.horizontalAlignment == HorizontalAlignment::RIGHT )
{
- actor.SetX( right - mPadding.width - padding.right - actor.GetRelayoutSize( Dimension::WIDTH ) );
+ actor.SetProperty( Actor::Property::POSITION_X, right - mPadding.width - padding.right - actor.GetRelayoutSize( Dimension::WIDTH ) );
}
else //if( cellData.horizontalAlignment == HorizontalAlignment::CENTER )
{
- actor.SetX( (left + right + padding.left - padding.right - actor.GetRelayoutSize( Dimension::WIDTH )) * 0.5f );
+ actor.SetProperty( Actor::Property::POSITION_X, (left + right + padding.left - padding.right - actor.GetRelayoutSize( Dimension::WIDTH )) * 0.5f );
}
if( cellData.verticalAlignment == VerticalAlignment::TOP )
{
- actor.SetY( top + mPadding.height + padding.top );
+ actor.SetProperty( Actor::Property::POSITION_Y, top + mPadding.height + padding.top );
}
else if( cellData.verticalAlignment == VerticalAlignment::BOTTOM )
{
- actor.SetY( bottom - mPadding.height - padding.bottom - actor.GetRelayoutSize( Dimension::HEIGHT ) );
+ actor.SetProperty( Actor::Property::POSITION_Y, bottom - mPadding.height - padding.bottom - actor.GetRelayoutSize( Dimension::HEIGHT ) );
}
else //if( cellData.verticalAlignment = VerticalAlignment::CENTER )
{
- actor.SetY( (top + bottom + padding.top - padding.bottom - actor.GetRelayoutSize( Dimension::HEIGHT )) * 0.5f );
+ actor.SetProperty( Actor::Property::POSITION_Y, (top + bottom + padding.top - padding.bottom - actor.GetRelayoutSize( Dimension::HEIGHT )) * 0.5f );
}
}
}
if( mStencil )
{
- mStencil.SetPosition( padding.start, padding.top );
+ mStencil.SetProperty( Actor::Property::POSITION, Vector2( padding.start, padding.top ));
}
if( mActiveLayer )
{
- mActiveLayer.SetPosition( padding.start, padding.top );
+ mActiveLayer.SetProperty( Actor::Property::POSITION, Vector2( padding.start, padding.top ));
}
const Text::Controller::UpdateTextType updateTextType = mController->Relayout( contentSize, layoutDirection );
}
else if ( Equals( scrollAmount, 0.0f, Math::MACHINE_EPSILON_1 ))
{
- mRenderableActor.SetPosition( scrollOffset.x + mAlignmentOffset, scrollOffset.y - scrollAmount );
+ mRenderableActor.SetProperty( Actor::Property::POSITION, Vector2( scrollOffset.x + mAlignmentOffset, scrollOffset.y - scrollAmount ));
}
else
{
if( mStencil )
{
- mStencil.SetPosition( padding.start, padding.top );
+ mStencil.SetProperty( Actor::Property::POSITION, Vector2( padding.start, padding.top ));
}
if( mActiveLayer )
{
- mActiveLayer.SetPosition( padding.start, padding.top );
+ mActiveLayer.SetProperty( Actor::Property::POSITION, Vector2( padding.start, padding.top ));
}
const Text::Controller::UpdateTextType updateTextType = mController->Relayout( contentSize, layoutDirection );
renderableActorPositionY = scrollOffset.y + padding.top;
}
- mRenderableActor.SetPosition( renderableActorPositionX, renderableActorPositionY );
+ mRenderableActor.SetProperty( Actor::Property::POSITION, Vector2( renderableActorPositionX, renderableActorPositionY ));
// Make sure the actors are parented correctly with/without clipping
Actor self = mStencil ? mStencil : Self();
if ( mDecorator && mDecorator->IsHighlightVisible() )
{
self.Add( mBackgroundActor );
- mBackgroundActor.SetPosition( renderableActorPositionX, renderableActorPositionY); // In text field's coords.
+ mBackgroundActor.SetProperty( Actor::Property::POSITION, Vector2( renderableActorPositionX, renderableActorPositionY) ); // In text field's coords.
mBackgroundActor.LowerBelow( highlightActor );
}
else
{
mRenderableActor.Add( mBackgroundActor );
- mBackgroundActor.SetPosition( 0.0f, 0.0f ); // In renderable actor's coords.
+ mBackgroundActor.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ) ); // In renderable actor's coords.
mBackgroundActor.LowerToBottom();
}
}
#ifdef DECORATOR_DEBUG
divider.SetProperty( Dali::Actor::Property::NAME,"Text's popup divider");
#endif
- divider.SetSize( size );
+ divider.SetProperty( Actor::Property::SIZE, size );
divider.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::HEIGHT );
divider.SetBackgroundColor( mDividerColor );
mToolbar.AddDivider( divider );
if( mScrollBar )
{
float barWidth = std::min( mTableOfButtons.GetNaturalSize().width, size.width ) - 2.f * mScrollBarPadding.x;
- mScrollBar.SetSize( Vector2( 0.0f, barWidth ) );
+ mScrollBar.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, barWidth ) );
}
}
mScrollBar.SetStyleName( "TextSelectionScrollBar" );
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.SetProperty( Actor::Property::POSITION, Vector2( mScrollBarPadding.x, -mScrollBarPadding.y ));
mScrollBar.SetResizePolicy( Dali::ResizePolicy::FIT_TO_CHILDREN, Dali::Dimension::WIDTH );
mScrollBar.SetProperty( Actor::Property::ORIENTATION, Quaternion( Quaternion( Radian( 1.5f * Math::PI ), Vector3::ZAXIS ) ) );
mScrollBar.SetScrollIndicator( indicator );
for( unsigned int i = 0; i < mDividerIndexes.Count(); ++i )
{
Actor divider = mTableOfButtons.GetChildAt( Toolkit::TableView::CellPosition( 0, mDividerIndexes[ i ] ) );
- divider.SetSize( size );
+ divider.SetProperty( Actor::Property::SIZE, size );
}
RelayoutRequest();
}
mScrollBarPadding = padding;
if( mScrollBar )
{
- mScrollBar.SetPosition( mScrollBarPadding.x, -mScrollBarPadding.y );
+ mScrollBar.SetProperty( Actor::Property::POSITION, Vector2( mScrollBarPadding.x, -mScrollBarPadding.y ));
}
RelayoutRequest();
tail.SetProperty( Actor::Property::VISIBLE, false );
}
- mPopup.SetPosition( position );
+ mPopup.SetProperty( Actor::Property::POSITION, position );
}
}
Vector3 actorPos = control.GetProperty<Vector3>(Dali::Actor::Property::POSITION);
mShadowControl = Dali::Toolkit::Control::New();
- mShadowControl.SetPosition(actorPos);
- mShadowControl.SetSize(width, height);
+ mShadowControl.SetProperty( Actor::Property::POSITION, actorPos );
+ mShadowControl.SetProperty( Actor::Property::SIZE, Vector2( width, height ) );
mShadowControl.SetBackgroundColor(Vector4(0.3f, 0.3f, 0.3f, 0.7f));
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 ));
{
Vector2 screenPosition = gesture.screenPosition;
control.GetParent().ScreenToLocal(mLocalPosition.x, mLocalPosition.y, screenPosition.x, screenPosition.y);
- mShadowControl.SetPosition(mLocalPosition.x - mDragLocalPosition.x, mLocalPosition.y - mDragLocalPosition.y);
+ mShadowControl.SetProperty( Actor::Property::POSITION, Vector2(mLocalPosition.x - mDragLocalPosition.x, mLocalPosition.y - mDragLocalPosition.y));
}
if(gesture.state == Gesture::Finished)
{
// create actor to render input with applied emboss effect
mActorForInput = Actor::New();
mActorForInput.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mActorForInput.SetSize( mTargetSize );
+ mActorForInput.SetProperty( Actor::Property::SIZE, mTargetSize );
Renderer rendererForInput = CreateRenderer( BASIC_VERTEX_SOURCE, fragmentSource.c_str() );
SetRendererTexture( rendererForInput, mInputTexture );
mActorForInput.AddRenderer( rendererForInput );
// create an actor to render mImageForHorz for vertical blur pass
mActorForHorz = Actor::New();
mActorForHorz.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mActorForHorz.SetSize( mTargetSize );
+ mActorForHorz.SetProperty( Actor::Property::SIZE, mTargetSize );
Renderer rendererForHorz = CreateRenderer( BASIC_VERTEX_SOURCE, fragmentSource.c_str() );
SetRendererTexture( rendererForHorz, textureForHorz );
mActorForHorz.AddRenderer( rendererForHorz );
textureSetForBlending.SetTexture( 1u, mInputTexture );
mActorForBlending.AddRenderer( rendererForBlending );
mActorForBlending.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mActorForBlending.SetSize( mTargetSize );
+ mActorForBlending.SetProperty( Actor::Property::SIZE, mTargetSize );
for( int i = 0; i < kernelSize; ++i )
{
mTargetSize = size;
if( mActorForInput )
{
- mActorForInput.SetSize(mTargetSize);
+ mActorForInput.SetProperty( Actor::Property::SIZE, mTargetSize);
}
if( mActorForHorz )
{
- mActorForHorz.SetSize(mTargetSize);
+ mActorForHorz.SetProperty( Actor::Property::SIZE, mTargetSize);
}
if( mActorForBlending )
{
- mActorForBlending.SetSize(mTargetSize);
+ mActorForBlending.SetProperty( Actor::Property::SIZE, mTargetSize);
}
}
// create actor to render input with applied emboss effect
mActorForInput1 = Actor::New();
mActorForInput1.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mActorForInput1.SetSize(mTargetSize);
+ mActorForInput1.SetProperty( Actor::Property::SIZE, mTargetSize);
Vector2 textureScale( 1.5f/mTargetSize.width, 1.5f/mTargetSize.height);
mActorForInput1.RegisterProperty( TEX_SCALE_UNIFORM_NAME, textureScale );
mActorForInput1.RegisterProperty( COEFFICIENT_UNIFORM_NAME, Vector3( 2.f, -1.f, -1.f ) );
mActorForInput2 = Actor::New();
mActorForInput2.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mActorForInput2.SetSize(mTargetSize);
+ mActorForInput2.SetProperty( Actor::Property::SIZE, mTargetSize);
mActorForInput2.RegisterProperty( TEX_SCALE_UNIFORM_NAME, textureScale );
mActorForInput2.RegisterProperty( COEFFICIENT_UNIFORM_NAME, Vector3( -1.f, -1.f, 2.f ) );
// set EMBOSS custom shader
mActorForComposite = Actor::New();
mActorForComposite.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mActorForComposite.SetSize(mTargetSize);
+ mActorForComposite.SetProperty( Actor::Property::SIZE, mTargetSize);
mActorForComposite.SetProperty( Actor::Property::COLOR, Color::BLACK );
mRootActor.Add( mActorForComposite );
mTargetSize = size;
if( mActorForInput1 )
{
- mActorForInput1.SetSize(mTargetSize);
+ mActorForInput1.SetProperty( Actor::Property::SIZE, mTargetSize);
}
if( mActorForInput2 )
{
- mActorForInput2.SetSize(mTargetSize);
+ mActorForInput2.SetProperty( Actor::Property::SIZE, mTargetSize);
}
if( mActorForComposite )
{
- mActorForComposite.SetSize(mTargetSize);
+ mActorForComposite.SetProperty( Actor::Property::SIZE, mTargetSize);
}
}
mCameraActor.SetNearClippingPlane(1.0f);
mCameraActor.SetAspectRatio(mTargetSize.width / mTargetSize.height);
mCameraActor.SetType(Dali::Camera::FREE_LOOK); // camera orientation based solely on actor
- mCameraActor.SetPosition(0.0f, 0.0f, ((mTargetSize.height * 0.5f) / tanf(ARBITRARY_FIELD_OF_VIEW * 0.5f)));
+ mCameraActor.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, ( (mTargetSize.height * 0.5f) / tanf(ARBITRARY_FIELD_OF_VIEW * 0.5f) ) ) );
}
}
// create actor to render input with applied emboss effect
mActorForInput = Actor::New();
mActorForInput.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mActorForInput.SetSize(mTargetSize);
+ mActorForInput.SetProperty( Actor::Property::SIZE, mTargetSize);
// register properties as shader uniforms
mActorForInput.RegisterProperty( SPREAD_UNIFORM_NAME, mSpread );
mActorForInput.RegisterProperty( TEX_SCALE_UNIFORM_NAME, Vector2( 1.0f / mTargetSize.width, 0.0f ) );
// create an actor to render mImageForHorz for vertical blur pass
mActorForHorz = Actor::New();
mActorForHorz.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mActorForHorz.SetSize(mTargetSize);
+ mActorForHorz.SetProperty( Actor::Property::SIZE, mTargetSize);
// register properties as shader uniforms
mActorForHorz.RegisterProperty( SPREAD_UNIFORM_NAME, mSpread );
mActorForHorz.RegisterProperty( TEX_SCALE_UNIFORM_NAME, Vector2( 0.0f, 1.0f / mTargetSize.height ) );
mTargetSize = size;
if( mActorForInput )
{
- mActorForInput.SetSize(mTargetSize);
+ mActorForInput.SetProperty( Actor::Property::SIZE, mTargetSize);
}
if( mActorForHorz )
{
- mActorForHorz.SetSize(mTargetSize);
+ mActorForHorz.SetProperty( Actor::Property::SIZE, mTargetSize);
}
}
mFocusIndicatorActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mFocusIndicatorActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- mFocusIndicatorActor.SetPosition(0.0f, 0.0f);
+ mFocusIndicatorActor.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 0.0f));
return mFocusIndicatorActor;
}
( cursor.position.y > -Math::MACHINE_EPSILON_1000 ) );
if( mPrimaryCursorVisible )
{
- mPrimaryCursor.SetPosition( cursor.position.x,
- cursor.position.y );
- mPrimaryCursor.SetSize( Size( mCursorWidth, cursor.cursorHeight ) );
+ mPrimaryCursor.SetProperty( Actor::Property::POSITION, Vector2( cursor.position.x,
+ cursor.position.y ) );
+ mPrimaryCursor.SetProperty( Actor::Property::SIZE, Size( mCursorWidth, cursor.cursorHeight ) );
}
mPrimaryCursor.SetProperty( Actor::Property::VISIBLE, mPrimaryCursorVisible && mCursorBlinkStatus );
}
( cursor.position.y > -Math::MACHINE_EPSILON_1000 ) );
if( mSecondaryCursorVisible )
{
- mSecondaryCursor.SetPosition( cursor.position.x,
- cursor.position.y );
- mSecondaryCursor.SetSize( Size( mCursorWidth, cursor.cursorHeight ) );
+ mSecondaryCursor.SetProperty( Actor::Property::POSITION, Vector2( cursor.position.x,
+ cursor.position.y ) );
+ mSecondaryCursor.SetProperty( Actor::Property::SIZE, Size( mCursorWidth, cursor.cursorHeight ) );
}
mSecondaryCursor.SetProperty( Actor::Property::VISIBLE, mSecondaryCursorVisible && mCursorBlinkStatus );
}
mCopyPastePopup.position.x = floorf( mCopyPastePopup.position.x );
mCopyPastePopup.position.y = floorf( mCopyPastePopup.position.y );
- mCopyPastePopup.actor.SetPosition( mCopyPastePopup.position );
+ mCopyPastePopup.actor.SetProperty( Actor::Property::POSITION, mCopyPastePopup.position );
mPopupSetNewPosition = false;
}
{
if( handle.markerActor )
{
- handle.markerActor.SetSize( 0, handle.lineHeight );
+ handle.markerActor.SetProperty( Actor::Property::SIZE, Vector2( 0, handle.lineHeight ) );
}
}
if( grabHandle.actor )
{
- grabHandle.actor.SetPosition( grabHandle.position.x + floor( 0.5f * mCursorWidth ) + ( mSmoothHandlePanEnabled ? grabHandle.grabDisplacementX : 0.f ),
- yLocalPosition + ( mSmoothHandlePanEnabled ? grabHandle.grabDisplacementY : 0.f ) );
+ grabHandle.actor.SetProperty( Actor::Property::POSITION, Vector2( grabHandle.position.x + floor( 0.5f * mCursorWidth ) + ( mSmoothHandlePanEnabled ? grabHandle.grabDisplacementX : 0.f ),
+ yLocalPosition + ( mSmoothHandlePanEnabled ? grabHandle.grabDisplacementY : 0.f ) ) );
}
}
if( handle.actor )
{
- handle.actor.SetPosition( handle.position.x + ( mSmoothHandlePanEnabled ? handle.grabDisplacementX : 0.f ),
- yLocalPosition + ( mSmoothHandlePanEnabled ? handle.grabDisplacementY : 0.f ) );
+ handle.actor.SetProperty( Actor::Property::POSITION, Vector2( handle.position.x + ( mSmoothHandlePanEnabled ? handle.grabDisplacementX : 0.f ),
+ yLocalPosition + ( mSmoothHandlePanEnabled ? handle.grabDisplacementY : 0.f ) ) );
}
}
if ( mHighlightActor )
{
// Sets the position of the highlight actor inside the decorator.
- mHighlightActor.SetPosition( mHighlightPosition.x + mHighlightOutlineOffset,
- mHighlightPosition.y + mHighlightOutlineOffset );
+ mHighlightActor.SetProperty( Actor::Property::POSITION, Vector2( mHighlightPosition.x + mHighlightOutlineOffset,
+ mHighlightPosition.y + mHighlightOutlineOffset ) );
const unsigned int numberOfQuads = mHighlightQuadList.Count();
if( 0u != numberOfQuads )
{
// Set the size of the highlighted text to the actor.
- mHighlightActor.SetSize( mHighlightSize );
+ mHighlightActor.SetProperty( Actor::Property::SIZE, mHighlightSize );
// Used to translate the vertices given in decorator's coords to the mHighlightActor's local coords.
const float offsetX = mHighlightPosition.x + 0.5f * mHighlightSize.width;
const float popupHeight = mCopyPastePopup.actor.GetRelayoutSize( Dimension::HEIGHT );
// Sets the position of the popup below.
- mCopyPastePopup.actor.SetY( floorf( CalculateVerticalPopUpPosition( 0.5f * popupHeight, true ) ) );
+ mCopyPastePopup.actor.SetProperty( Actor::Property::POSITION_Y, floorf( CalculateVerticalPopUpPosition( 0.5f * popupHeight, true ) ) );
}
void PopUpLeavesBottomBoundary( PropertyNotification& source )
const float popupHeight = mCopyPastePopup.actor.GetRelayoutSize( Dimension::HEIGHT );
// Sets the position of the popup above.
- mCopyPastePopup.actor.SetY( floorf( CalculateVerticalPopUpPosition( 0.5f * popupHeight, false ) ) );
+ mCopyPastePopup.actor.SetProperty( Actor::Property::POSITION_Y, floorf( CalculateVerticalPopUpPosition( 0.5f * popupHeight, false ) ) );
}
void SetUpPopupPositionNotifications( const Vector3& popupHalfSize )
mActor = Actor::New();
mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
mActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- mActor.SetSize( textSize );
+ mActor.SetProperty( Actor::Property::SIZE, textSize );
mActor.SetProperty( Actor::Property::COLOR_MODE, USE_OWN_MULTIPLY_PARENT_COLOR );
}
// Keep all of the origins aligned
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- actor.SetSize( actorSize );
+ actor.SetProperty( Actor::Property::SIZE, actorSize );
actor.RegisterProperty("uOffset", Vector2::ZERO );
actor.SetProperty( Actor::Property::COLOR_MODE, USE_OWN_MULTIPLY_PARENT_COLOR );
mImpl->mActor = Actor::New();
mImpl->mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mImpl->mActor.SetSize( view.GetControlSize() );
+ mImpl->mActor.SetProperty( Actor::Property::SIZE, Vector2( view.GetControlSize() );
mImpl->mActor.SetProperty( Actor::Property::COLOR, Color::WHITE );
#if defined(DEBUG_ENABLED)
mImpl->mActor.SetProperty( Dali::Actor::Property::NAME, "Text renderable actor" );
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.SetProperty( Actor::Property::SIZE, textSize );
actor.SetProperty( Actor::Property::COLOR_MODE, USE_OWN_MULTIPLY_PARENT_COLOR );
actor.AddRenderer( renderer );
}
{
mScrollAnimation.Clear();
}
- sourceActor.SetPosition( x, y );
+ sourceActor.SetProperty( Actor::Property::POSITION, Vector2( x, y ));
return;
}
float toY = y + scrollAmount;
mScrollTo = toY;
// Set animation attribute
- sourceActor.SetPosition( x, y );
+ sourceActor.SetProperty( Actor::Property::POSITION, Vector2( x, y ));
mScrollAnimation.AnimateTo( Property(sourceActor, Actor::Property::POSITION_Y), mScrollTo, AlphaFunction::EASE_OUT_SINE );
mScrollAnimation.Play();
}
* CheckBoxButton button = CheckBoxButton::New();
* button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
* button.SetProperty( Button::Property::LABEL, "Check" );
- * button.SetSize( 200, 40 );
+ * button.SetProperty( Actor::Property::SIZE, Vector2( 200, 40 );
* button.SetBackgroundColor( Color::WHITE );
* Stage::GetCurrent().Add( button );
*
* RadioButton button1 = RadioButton::New();
* button1.SetProperty( Button::Property::LABEL, "button1" );
* button1.SetBackgroundColor( Color::WHITE );
- * button1.SetPosition( 0, -40 );
+ * button1.SetProperty( Actor::Property::POSITION, Vector2( 0, -40 ) );
* radioGroup.Add( button1 );
*
* // Make more RadioButtons and add them to their parent
* RadioButton button2 = RadioButton::New();
* button2.SetProperty( Toolkit::Button::Property::LABEL, "button2" );
* button2.SetBackgroundColor( Color::WHITE );
- * button2.SetPosition( 0, 40 );
+ * button2.SetProperty( Actor::Property::POSITION, Vector2( 0, 40 ) );
* radioGroup.Add( button2 );
*
* @endcode
*( mImpl->mStartingPinchScale ) = Self().GetCurrentProperty< Vector3 >( Actor::Property::SCALE );
}
- Self().SetScale( *( mImpl->mStartingPinchScale ) * pinch.scale );
+ Self().SetProperty( Actor::Property::SCALE, *( mImpl->mStartingPinchScale ) * pinch.scale );
}
void Control::OnPan( const PanGesture& pan )
childOffset.x += ( mImpl->mMargin.start + padding.start );
childOffset.y += ( mImpl->mMargin.top + padding.top );
- child.SetPosition( childOffset.x, childOffset.y );
+ child.SetProperty( Actor::Property::POSITION, Vector2( childOffset.x, childOffset.y ) );
}
container.Add( child, newChildSize );
}
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::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.
+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::Property::POSITION "Dali::Actor::Property::POSITION" is asynchronous, a call to GetProperty( \ref Dali::Actor::Property::POSITION "Dali::Actor::Property::POSITION" ) won't immediately return the same value.
@code
// Whilst handling an event...
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor); // initial position is 0,0,0
-actor.SetPosition(Vector3(10,10,10));
+actor.SetProperty( Actor::Property::POSITION, Vector3(10.0f, 10.0f, 10.0f) );
Vector3 current;
current = actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
<h2 class="pg">Setting a property during an animation</h2>
-When a property is being animated, the Animation will override any values set e.g. with Actor::SetPosition()
+When a property is being animated, the Animation will override any values set e.g. with Actor::Property::Position.
\image html multi-threaded-animation-2.png
{
// Scale your actor according to the pinch scale
Vector3 newSize = actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) * pinch.scale;
- actor.SetSize(newSize);
+ actor.SetProperty( Actor::Property::SIZE, newSize );
}
// Elsewhere
ImageView footer = ImageView::New( DEFAULT_CONTROL_AREA_IMAGE_PATH );
footer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
footer.SetResizePolicy( ResizePolicy::FIXED, Dimension::HEIGHT );
-footer.SetSize( 0.0f, 80.0f );
+footer.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 80.0f ) );
footer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
footer.SetParentOrigin( ParentOrigin::CENTER );
@code
Stage stage = Dali::Stage::GetCurrent();
Size size = stage.GetSize();
- myScrollView.SetSize( size );
+ myScrollView.SetProperty( Actor::Property::SIZE, size );
@endcode
Add Actors to this ScrollView
Toolkit::CheckBoxButton checkBox = Toolkit::CheckBoxButton::New();
checkBox.SetBackgroundImage( unchecked );
checkBox.SetSelectedImage( checked );
-checkBox.SetSize( Vector2( 48, 48 ) );
+checkBox.SetProperty( Actor::Property::SIZE, Vector2( 48, 48 ) );
root.AddChild( checkBox, Toolkit::TableView::CellPosition( 0, 0 ) );
map[ Visual::Property::TYPE ] = Dali::Toolkit::Visual::IMAGE;
map[ Dali::Toolkit::ImageVisual::Property::URL ] = "path-to-image.svg";
-control.SetSize( 200.f, 200.f );
+control.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
control.SetProperty( Control::Property::BACKGROUND, map );
~~~
___________________________________________________________________________________________________