field.SetSize( 300.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
field.SetProperty( TextField::Property::ENABLE_MARKUP, true );
field.SetProperty( TextField::Property::TEXT, "<font family='DejaVuSerif' size='18'>He<color value='green'>llo</color> <font weight='bold'>world</font> demo</font>" );
DALI_TEST_CHECK( field );
field.SetSize( 300.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
field.SetProperty( TextField::Property::ENABLE_MARKUP, true );
field.SetProperty( TextField::Property::TEXT, "<font family='DejaVuSerif' size='18'>He<color value='blue'> l</color><color value='green'>lo</color> <font weight='bold'>world</font> demo</font>" );
Stage::GetCurrent().Add( field );
field.SetSize( 300.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Render and notify
application.SendNotification();
// Create a second text field and send key events to it.
TextField field2 = TextField::New();
- field2.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field2.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field2.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field2.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
field2.SetSize( 100.f, 100.0f );
field2.SetPosition( 100.0f, 100.0f );
Stage::GetCurrent().Add( field );
field.SetSize( 300.0f, 50.0f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
}
// Move the cursor and check the position changes.
- Vector3 position1 = cursor.GetCurrentPosition();
+ Vector3 position1 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
// Render and notify
application.SendNotification();
application.Render();
- Vector3 position2 = cursor.GetCurrentPosition();
+ Vector3 position2 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
DALI_TEST_CHECK( position2.x < position1.x );
application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_RIGHT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
application.SendNotification();
application.Render();
- Vector3 position3 = cursor.GetCurrentPosition();
+ Vector3 position3 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
DALI_TEST_EQUALS( position1, position3, TEST_LOCATION ); // Should be in the same position1.
application.SendNotification();
application.Render();
- Vector3 position4 = cursor.GetCurrentPosition();
+ Vector3 position4 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
// Send some taps and check the cursor positions.
application.Render();
// Cursor position should be the same than position1.
- Vector3 position5 = cursor.GetCurrentPosition();
+ Vector3 position5 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
DALI_TEST_EQUALS( position4, position5, TEST_LOCATION ); // Should be in the same position2.
application.SendNotification();
application.Render();
- Vector3 position6 = cursor.GetCurrentPosition();
+ Vector3 position6 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
DALI_TEST_CHECK( position6.x > position5.x );
application.Render();
// Cursor position should be the same than position2.
- Vector3 position7 = cursor.GetCurrentPosition();
+ Vector3 position7 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
DALI_TEST_EQUALS( position4, position7, TEST_LOCATION );// Should be in the same position2.
field.SetProperty( TextField::Property::TEXT, "This is a long text for the size of the text-field." );
field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
field.SetSize( 30.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
field.SetProperty( TextField::Property::TEXT, "This is a long text for the size of the text-field." );
field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
field.SetSize( 300.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
field.SetProperty( TextField::Property::TEXT, "This is a long text for the size of the text-field." );
field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
field.SetSize( 300.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
field.SetProperty( TextField::Property::TEXT, "Thisisalongtextforthesizeofthetextfield." );
field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
field.SetSize( 300.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
field.SetProperty( TextField::Property::TEXT, "Thisisalongtextforthesizeofthetextfield." );
field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
field.SetSize( 300.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Property::Map propertyMap;
propertyMap["PANEL_LAYOUT"] = InputMethod::PanelLayout::PASSWORD;
field.SetProperty( TextField::Property::INPUT_METHOD_SETTINGS, propertyMap );
field.SetProperty( TextField::Property::PLACEHOLDER_TEXT, "Setting Placeholder Text" );
field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
field.SetSize( 300.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
if (actor)
{
- Vector3 worldPosition = actor.GetCurrentWorldPosition();
+ Vector3 worldPosition = actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION );
Vector2 halfStageSize = stage.GetSize() / 2.0f;
Vector2 position(worldPosition.x + halfStageSize.width, worldPosition.y + halfStageSize.height);
field.SetProperty( TextField::Property::TEXT, "Hello" );
field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
field.SetSize( 300.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
field.SetProperty( TextField::Property::TEXT, "This is a long text for the size of the text-field." );
field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
field.SetSize( 300.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
Stage::GetCurrent().Add( field );
field.SetSize( 300.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
field.SetProperty( TextField::Property::TEXT, longText );
field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
field.SetSize( 300.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
field.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY , Dimension::HEIGHT );
field.SetProperty( TextField::Property::TEXT, "ኢ");
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
field.SetKeyboardFocusable(true);
KeyboardFocusManager::Get().SetCurrentFocusActor( field );
field.SetProperty( TextField::Property::TEXT, "Text" );
field.SetSize( 300.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( field );
try
TextField field = TextField::New();
DALI_TEST_CHECK( field );
field.SetSize( 300.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( field );
application.SendNotification();
TextField field = TextField::New();
DALI_TEST_CHECK( field );
field.SetSize( 300.0f, 50.0f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( field );
application.SendNotification();
TextField field = TextField::New();
DALI_TEST_CHECK( field );
field.SetSize( 300.0f, 50.0f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( field );
application.SendNotification();
TextField field = TextField::New();
DALI_TEST_CHECK( field );
field.SetSize( 300.0f, 50.0f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( field );
application.SendNotification();
Stage::GetCurrent().Add( field );
field.SetSize( 300.0f, 50.0f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
Stage::GetCurrent().Add( textField );
textField.SetSize( 300.f, 50.f );
- textField.SetParentOrigin( ParentOrigin::TOP_LEFT );
- textField.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ textField.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ textField.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
Stage::GetCurrent().Add( textField );
textField.SetSize( 300.f, 50.f );
- textField.SetParentOrigin( ParentOrigin::TOP_LEFT );
- textField.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ textField.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ textField.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );