editor.SetSize( 300.f, 50.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
editor.SetProperty( TextEditor::Property::ENABLE_MARKUP, true );
editor.SetProperty( TextEditor::Property::TEXT, "<font family='DejaVuSerif' size='18'>He<color value='green'>llo</color> <font weight='bold'>world</font> demo</font>" );
editor.SetSize( 300.f, 50.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
editor.SetProperty( TextEditor::Property::ENABLE_MARKUP, true );
editor.SetProperty( TextEditor::Property::TEXT, "<font family='DejaVuSerif' size='18'>He<color value='blue'> l</color><color value='green'>lo</color> <font weight='bold'>world</font> demo</font>" );
Stage::GetCurrent().Add( editor );
editor.SetSize( 300.f, 50.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
// Create a second text editor and send key events to it.
TextEditor editor2 = TextEditor::New();
- editor2.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor2.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor2.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor2.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
editor2.SetSize( 100.f, 100.f );
editor2.SetPosition( 100.f, 100.f );
Stage::GetCurrent().Add( editor );
editor.SetSize( 300.f, 50.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
}
// Move the cursor and check the position changes.
- Vector3 position1 = cursor.GetCurrentPosition();
+ Vector3 position1 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE ) );
application.SendNotification();
application.Render();
- Vector3 position2 = cursor.GetCurrentPosition();
+ Vector3 position2 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
DALI_TEST_CHECK( position2.x < position1.x );
application.SendNotification();
application.Render();
- Vector3 position3 = cursor.GetCurrentPosition();
+ Vector3 position3 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
DALI_TEST_EQUALS( position1, position3, TEST_LOCATION ); // Should be in the same position1.
application.Render();
// Cursor position should be the same than position1.
- Vector3 position4 = cursor.GetCurrentPosition();
+ Vector3 position4 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
DALI_TEST_EQUALS( position2, position4, TEST_LOCATION ); // Should be in the same position2.
application.SendNotification();
application.Render();
- Vector3 position5 = cursor.GetCurrentPosition();
+ Vector3 position5 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
DALI_TEST_CHECK( position5.x > position4.x );
application.Render();
// Cursor position should be the same than position2.
- Vector3 position6 = cursor.GetCurrentPosition();
+ Vector3 position6 = cursor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
DALI_TEST_EQUALS( position2, position6, TEST_LOCATION );// Should be in the same position2.
editor.SetProperty( TextEditor::Property::TEXT, "This is a long text for the size of the text-editor." );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
editor.SetSize( 30.f, 50.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
editor.SetProperty( TextEditor::Property::TEXT, "Hello\nworl" );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
editor.SetSize( 100.f, 50.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
editor.SetProperty( TextEditor::Property::TEXT, "Hello\nworl" );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
editor.SetSize( 50.f, 50.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
editor.SetProperty( TextEditor::Property::SMOOTH_SCROLL, true );
editor.SetProperty( TextEditor::Property::SMOOTH_SCROLL_DURATION, 0.2f );
editor.SetProperty( TextEditor::Property::ENABLE_SCROLL_BAR, true );
editor.SetProperty( TextEditor::Property::TEXT, "Hello\nworld\nHello world" );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
editor.SetSize( 100.f, 50.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
editor.SetProperty( TextEditor::Property::TEXT, "Hello\nworld\nHello world" );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
editor.SetSize( 100.f, 50.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
editor.SetProperty( TextEditor::Property::TEXT, "DALi" );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
editor.SetSize( 100.f, 50.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
editor.SetProperty( TextEditor::Property::SELECTION_HANDLE_PRESSED_IMAGE_RIGHT, imagePropertyMap );
editor.SetSize( 30.f, 500.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
editor.SetSize( 50.f, 50.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
editor.SetProperty( TextEditor::Property::ENABLE_SCROLL_BAR, true );
editor.SetKeyboardFocusable(true);
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
editor.SetSize( 300.f, 50.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( editor );
application.SendNotification();
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
editor.SetSize( 300.f, 50.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( editor );
application.SendNotification();
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
editor.SetSize( 300.f, 50.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( editor );
application.SendNotification();
TextEditor editor = TextEditor::New();
DALI_TEST_CHECK( editor );
editor.SetSize( 300.f, 50.f );
- editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ editor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ editor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( editor );
application.SendNotification();