Change-Id: I2a0c6ac05533722b59e6bc76924f2f15f106d3a2
34 files changed:
// For coverage
Toolkit::TextEditor editor = Toolkit::TextEditor::New();
// For coverage
Toolkit::TextEditor editor = Toolkit::TextEditor::New();
- editor.SetKeyboardFocusable( true );
+ editor.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
Stage::GetCurrent().Add( editor );
Toolkit::KeyboardFocusManager::Get().SetCurrentFocusActor( editor );
Stage::GetCurrent().Add( editor );
Toolkit::KeyboardFocusManager::Get().SetCurrentFocusActor( editor );
DALI_TEST_CHECK( view );
Actor actor = Actor::New();
DALI_TEST_CHECK( view );
Actor actor = Actor::New();
- DALI_TEST_CHECK( !actor.OnStage() );
+ DALI_TEST_CHECK( !actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
view.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
view.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
view.Add(actor);
Stage::GetCurrent().Add(view);
view.Add(actor);
Stage::GetCurrent().Add(view);
- DALI_TEST_CHECK( actor.OnStage() );
+ DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
- DALI_TEST_CHECK( !actor.OnStage() );
+ DALI_TEST_CHECK( !actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
DALI_TEST_CHECK( dummyImpl.IsVisualEnabled( TEST_PROPERTY ) == false );
DALI_TEST_CHECK( dummyImpl.IsVisualEnabled( TEST_PROPERTY ) == false );
- DALI_TEST_CHECK( dummy.OnStage() == true );
+ DALI_TEST_CHECK( dummy.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) == true );
dummyImpl.EnableVisual( TEST_PROPERTY, true );
dummyImpl.EnableVisual( TEST_PROPERTY, true );
DALI_TEST_CHECK( dummyImpl.IsVisualEnabled( TEST_PROPERTY ) == true);
DALI_TEST_CHECK( dummyImpl.IsVisualEnabled( TEST_PROPERTY ) == true);
- DALI_TEST_CHECK( dummy.OnStage() == true );
+ DALI_TEST_CHECK( dummy.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) == true );
dummyImpl.EnableVisual( TEST_PROPERTY, false );
dummyImpl.EnableVisual( TEST_PROPERTY, false );
application.Render();
DALI_TEST_CHECK( dummyImpl.IsVisualEnabled( TEST_PROPERTY ) == false );
application.Render();
DALI_TEST_CHECK( dummyImpl.IsVisualEnabled( TEST_PROPERTY ) == false );
- DALI_TEST_CHECK( dummy.OnStage() == true );
+ DALI_TEST_CHECK( dummy.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) == true );
dummyImpl.EnableVisual( TEST_PROPERTY, true );
// Render and notify
dummyImpl.EnableVisual( TEST_PROPERTY, true );
// Render and notify
DALI_TEST_CHECK( dummy.GetRendererCount() == 2u );
DALI_TEST_CHECK( dummyImpl.IsVisualEnabled( TEST_PROPERTY1 ) == true );
DALI_TEST_CHECK( dummyImpl.IsVisualEnabled( TEST_PROPERTY1 ) == true);
DALI_TEST_CHECK( dummy.GetRendererCount() == 2u );
DALI_TEST_CHECK( dummyImpl.IsVisualEnabled( TEST_PROPERTY1 ) == true );
DALI_TEST_CHECK( dummyImpl.IsVisualEnabled( TEST_PROPERTY1 ) == true);
- DALI_TEST_CHECK( dummy.OnStage() == true );
+ DALI_TEST_CHECK( dummy.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) == true );
dummyImpl.EnableVisual( TEST_PROPERTY2, false );
// Render and notify
dummyImpl.EnableVisual( TEST_PROPERTY2, false );
// Render and notify
DALI_TEST_EQUALS( controlWrapperImpl->IsVisualEnabled( TEST_PROPERTY ), false, TEST_LOCATION );
DALI_TEST_EQUALS( controlWrapperImpl->IsVisualEnabled( TEST_PROPERTY ), false, TEST_LOCATION );
- DALI_TEST_EQUALS( controlWrapper.OnStage(), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( controlWrapper.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ), true, TEST_LOCATION );
controlWrapperImpl->EnableVisual( TEST_PROPERTY, true );
controlWrapperImpl->EnableVisual( TEST_PROPERTY, true );
DALI_TEST_EQUALS( controlWrapperImpl->IsVisualEnabled( TEST_PROPERTY ), false, TEST_LOCATION );
DALI_TEST_EQUALS( controlWrapperImpl->IsVisualEnabled( TEST_PROPERTY ), false, TEST_LOCATION );
- DALI_TEST_EQUALS( controlWrapper.OnStage(), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( controlWrapper.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ), true, TEST_LOCATION );
controlWrapperImpl->EnableVisual( TEST_PROPERTY, true );
controlWrapperImpl->EnableVisual( TEST_PROPERTY, true );
DALI_TEST_CHECK( view );
Actor actor = Actor::New();
DALI_TEST_CHECK( view );
Actor actor = Actor::New();
- DALI_TEST_CHECK( !actor.OnStage() );
+ DALI_TEST_CHECK( !actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
view.Add(actor);
Stage::GetCurrent().Add(view);
view.Add(actor);
Stage::GetCurrent().Add(view);
- DALI_TEST_CHECK( actor.OnStage() );
+ DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
DALI_TEST_CHECK( actor.GetParent() );
DALI_TEST_CHECK( actor.GetParent() != view );
view.Remove(actor);
DALI_TEST_CHECK( actor.GetParent() );
DALI_TEST_CHECK( actor.GetParent() != view );
view.Remove(actor);
- DALI_TEST_CHECK( !actor.OnStage() );
+ DALI_TEST_CHECK( !actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
Actor actor = Actor::New();
actor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
Actor actor = Actor::New();
actor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
- DALI_TEST_CHECK( !actor.OnStage() );
+ DALI_TEST_CHECK( !actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- DALI_TEST_CHECK( actor.OnStage() );
+ DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
// Create two actors and add them to the container
Actor actor1 = Actor::New();
Actor actor2 = Actor::New();
// Create two actors and add them to the container
Actor actor1 = Actor::New();
Actor actor2 = Actor::New();
- actor1.SetKeyboardFocusable(true);
- actor2.SetKeyboardFocusable(true);
+ actor1.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
+ actor2.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
DALI_TEST_CHECK( actor1 );
DALI_TEST_CHECK( actor2 );
DALI_TEST_CHECK( actor1 );
DALI_TEST_CHECK( actor2 );
// Check content direction property.
DALI_TEST_EQUALS( (FlexContainer::ContentDirection)flexContainer.GetProperty<int>( FlexContainer::Property::CONTENT_DIRECTION ), FlexContainer::INHERIT, TEST_LOCATION );
// Check content direction property.
DALI_TEST_EQUALS( (FlexContainer::ContentDirection)flexContainer.GetProperty<int>( FlexContainer::Property::CONTENT_DIRECTION ), FlexContainer::INHERIT, TEST_LOCATION );
- actor0.SetProperty( Dali::DevelActor::Property::LAYOUT_DIRECTION, Dali::LayoutDirection::RIGHT_TO_LEFT );
+ actor0.SetProperty( Dali::Actor::Property::LAYOUT_DIRECTION, Dali::LayoutDirection::RIGHT_TO_LEFT );
DALI_TEST_EQUALS( (FlexContainer::ContentDirection)flexContainer.GetProperty<int>( FlexContainer::Property::CONTENT_DIRECTION ), FlexContainer::RTL, TEST_LOCATION );
DALI_TEST_EQUALS( (FlexContainer::ContentDirection)flexContainer.GetProperty<int>( FlexContainer::Property::CONTENT_DIRECTION ), FlexContainer::RTL, TEST_LOCATION );
- actor0.SetProperty( Dali::DevelActor::Property::LAYOUT_DIRECTION, Dali::LayoutDirection::LEFT_TO_RIGHT );
+ actor0.SetProperty( Dali::Actor::Property::LAYOUT_DIRECTION, Dali::LayoutDirection::LEFT_TO_RIGHT );
DALI_TEST_EQUALS( (FlexContainer::ContentDirection)flexContainer.GetProperty<int>( FlexContainer::Property::CONTENT_DIRECTION ), FlexContainer::LTR, TEST_LOCATION );
flexContainer.SetProperty( FlexContainer::Property::CONTENT_DIRECTION, "RTL" );
DALI_TEST_EQUALS( (FlexContainer::ContentDirection)flexContainer.GetProperty<int>( FlexContainer::Property::CONTENT_DIRECTION ), FlexContainer::LTR, TEST_LOCATION );
flexContainer.SetProperty( FlexContainer::Property::CONTENT_DIRECTION, "RTL" );
flexContainer.SetProperty( FlexContainer::Property::CONTENT_DIRECTION, "LTR" );
DALI_TEST_EQUALS( (FlexContainer::ContentDirection)flexContainer.GetProperty<int>( FlexContainer::Property::CONTENT_DIRECTION ), FlexContainer::LTR, TEST_LOCATION );
flexContainer.SetProperty( FlexContainer::Property::CONTENT_DIRECTION, "LTR" );
DALI_TEST_EQUALS( (FlexContainer::ContentDirection)flexContainer.GetProperty<int>( FlexContainer::Property::CONTENT_DIRECTION ), FlexContainer::LTR, TEST_LOCATION );
- actor0.SetProperty( Dali::DevelActor::Property::LAYOUT_DIRECTION, Dali::LayoutDirection::RIGHT_TO_LEFT );
+ actor0.SetProperty( Dali::Actor::Property::LAYOUT_DIRECTION, Dali::LayoutDirection::RIGHT_TO_LEFT );
DALI_TEST_EQUALS( (FlexContainer::ContentDirection)flexContainer.GetProperty<int>( FlexContainer::Property::CONTENT_DIRECTION ), FlexContainer::LTR, TEST_LOCATION );
flexContainer.SetProperty( FlexContainer::Property::CONTENT_DIRECTION, "inherit" );
DALI_TEST_EQUALS( (FlexContainer::ContentDirection)flexContainer.GetProperty<int>( FlexContainer::Property::CONTENT_DIRECTION ), FlexContainer::LTR, TEST_LOCATION );
flexContainer.SetProperty( FlexContainer::Property::CONTENT_DIRECTION, "inherit" );
DALI_TEST_CHECK( view );
Actor actor = Actor::New();
DALI_TEST_CHECK( view );
Actor actor = Actor::New();
- DALI_TEST_CHECK( !actor.OnStage() );
+ DALI_TEST_CHECK( !actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
view.Add(actor);
Stage::GetCurrent().Add(view);
view.Add(actor);
Stage::GetCurrent().Add(view);
- DALI_TEST_CHECK( actor.OnStage() );
+ DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
- DALI_TEST_CHECK( !actor.OnStage() );
+ DALI_TEST_CHECK( !actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
void ResourceReadySignal( Control control )
{
gResourceReadySignalFired = true;
void ResourceReadySignal( Control control )
{
gResourceReadySignalFired = true;
- gReadyIds.push_back(control.GetId());
+ gReadyIds.push_back(control.GetProperty< int >( Actor::Property::ID ));
static int callNumber = 0;
gResourceReadySignalFired = true;
static int callNumber = 0;
gResourceReadySignalFired = true;
- gReadyIds.push_back(control.GetId());
+ gReadyIds.push_back(control.GetProperty< int >( Actor::Property::ID ));
tet_infoline( "Create a control and connect to resource ready signal" );
DummyControl actor = DummyControl::New(true);
tet_infoline( "Create a control and connect to resource ready signal" );
DummyControl actor = DummyControl::New(true);
- int actor1Id = actor.GetId();
+ int actor1Id = actor.GetProperty< int >( Actor::Property::ID );
actor.ResourceReadySignal().Connect( &ResourceReadySignal);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
actor.ResourceReadySignal().Connect( &ResourceReadySignal);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
Visual::Base imageVisual2 = CreateVisualWithPolicy( TEST_BROKEN_IMAGE_FILE_NAME, ImageVisual::Property::LOAD_POLICY, ImageVisual::LoadPolicy::IMMEDIATE );
DummyControl actor2 = DummyControl::New(true);
Visual::Base imageVisual2 = CreateVisualWithPolicy( TEST_BROKEN_IMAGE_FILE_NAME, ImageVisual::Property::LOAD_POLICY, ImageVisual::LoadPolicy::IMMEDIATE );
DummyControl actor2 = DummyControl::New(true);
- int actor2Id = actor2.GetId();
+ int actor2Id = actor2.GetProperty< int >( Actor::Property::ID );
Impl::DummyControl& dummyImpl2 = static_cast<Impl::DummyControl&>(actor2.GetImplementation());
actor2.ResourceReadySignal().Connect( &ResourceReadyLoadNext);
Impl::DummyControl& dummyImpl2 = static_cast<Impl::DummyControl&>(actor2.GetImplementation());
actor2.ResourceReadySignal().Connect( &ResourceReadyLoadNext);
// Create the first actor and add it to the stage
Actor first = Actor::New();
// Create the first actor and add it to the stage
Actor first = Actor::New();
- first.SetKeyboardFocusable(true);
+ first.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
Stage::GetCurrent().Add(first);
// Create the second actor and add it to the stage
Actor second = Actor::New();
Stage::GetCurrent().Add(first);
// Create the second actor and add it to the stage
Actor second = Actor::New();
- second.SetKeyboardFocusable(true);
+ second.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
Stage::GetCurrent().Add(second);
// Create the third actor but don't add it to the stage
Stage::GetCurrent().Add(second);
// Create the third actor but don't add it to the stage
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == second);
// Make the third actor focusable
DALI_TEST_CHECK(manager.GetCurrentFocusActor() == second);
// Make the third actor focusable
- third.SetKeyboardFocusable(true);
+ third.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
// Check that the focus is successfully moved to the third actor
DALI_TEST_CHECK(manager.SetCurrentFocusActor(third) == true);
// Check that the focus is successfully moved to the third actor
DALI_TEST_CHECK(manager.SetCurrentFocusActor(third) == true);
// Create the first actor and add it to the stage
Actor first = Actor::New();
// Create the first actor and add it to the stage
Actor first = Actor::New();
- first.SetKeyboardFocusable(true);
+ first.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
Stage::GetCurrent().Add(first);
// Create the second actor and add it to the stage
Actor second = Actor::New();
Stage::GetCurrent().Add(first);
// Create the second actor and add it to the stage
Actor second = Actor::New();
- second.SetKeyboardFocusable(true);
+ second.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
Stage::GetCurrent().Add(second);
// Move the focus to the right
Stage::GetCurrent().Add(second);
// Move the focus to the right
// Create the third actor
Actor third = Actor::New();
// Create the third actor
Actor third = Actor::New();
- third.SetKeyboardFocusable(true);
+ third.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
// Create the fourth actor
Actor fourth = Actor::New();
// Create the fourth actor
Actor fourth = Actor::New();
- fourth.SetKeyboardFocusable(true);
+ fourth.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
// Add the four children to table view
tableView.AddChild(first, TableView::CellPosition(0, 0));
// Add the four children to table view
tableView.AddChild(first, TableView::CellPosition(0, 0));
// Create the first actor and add it to the stage
Actor first = Actor::New();
// Create the first actor and add it to the stage
Actor first = Actor::New();
- first.SetKeyboardFocusable(true);
+ first.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
Stage::GetCurrent().Add(first);
// Create the second actor and add it to the stage
Actor second = Actor::New();
Stage::GetCurrent().Add(first);
// Create the second actor and add it to the stage
Actor second = Actor::New();
- second.SetKeyboardFocusable(true);
+ second.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
Stage::GetCurrent().Add(second);
// Move the focus to the right
Stage::GetCurrent().Add(second);
// Move the focus to the right
PushButton button1 = PushButton::New();
PushButton button2 = PushButton::New();
PushButton button1 = PushButton::New();
PushButton button2 = PushButton::New();
- button1.SetKeyboardFocusable(true);
- button2.SetKeyboardFocusable(true);
+ button1.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
+ button2.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
Stage::GetCurrent().Add(button1);
Stage::GetCurrent().Add(button2);
Stage::GetCurrent().Add(button1);
Stage::GetCurrent().Add(button2);
focusChangedCallback.Reset();
// set the navigation properties of button1
focusChangedCallback.Reset();
// set the navigation properties of button1
- button1.SetProperty(Toolkit::DevelControl::Property::LEFT_FOCUSABLE_ACTOR_ID, Property::Value((int)button2.GetId()));
- button1.SetProperty(Toolkit::DevelControl::Property::RIGHT_FOCUSABLE_ACTOR_ID, Property::Value((int)button2.GetId()));
- button1.SetProperty(Toolkit::DevelControl::Property::UP_FOCUSABLE_ACTOR_ID, Property::Value((int)button2.GetId()));
- button1.SetProperty(Toolkit::DevelControl::Property::DOWN_FOCUSABLE_ACTOR_ID, Property::Value((int)button2.GetId()));
+ button1.SetProperty(Toolkit::DevelControl::Property::LEFT_FOCUSABLE_ACTOR_ID, Property::Value((int)button2.GetProperty< int >( Actor::Property::ID )));
+ button1.SetProperty(Toolkit::DevelControl::Property::RIGHT_FOCUSABLE_ACTOR_ID, Property::Value((int)button2.GetProperty< int >( Actor::Property::ID )));
+ button1.SetProperty(Toolkit::DevelControl::Property::UP_FOCUSABLE_ACTOR_ID, Property::Value((int)button2.GetProperty< int >( Actor::Property::ID )));
+ button1.SetProperty(Toolkit::DevelControl::Property::DOWN_FOCUSABLE_ACTOR_ID, Property::Value((int)button2.GetProperty< int >( Actor::Property::ID )));
// set the navigation properties of button2
// set the navigation properties of button2
- button2.SetProperty(Toolkit::DevelControl::Property::LEFT_FOCUSABLE_ACTOR_ID, Property::Value((int)button1.GetId()));
- button2.SetProperty(Toolkit::DevelControl::Property::RIGHT_FOCUSABLE_ACTOR_ID, Property::Value((int)button1.GetId()));
- button2.SetProperty(Toolkit::DevelControl::Property::UP_FOCUSABLE_ACTOR_ID, Property::Value((int)button1.GetId()));
- button2.SetProperty(Toolkit::DevelControl::Property::DOWN_FOCUSABLE_ACTOR_ID, Property::Value((int)button1.GetId()));
+ button2.SetProperty(Toolkit::DevelControl::Property::LEFT_FOCUSABLE_ACTOR_ID, Property::Value((int)button1.GetProperty< int >( Actor::Property::ID )));
+ button2.SetProperty(Toolkit::DevelControl::Property::RIGHT_FOCUSABLE_ACTOR_ID, Property::Value((int)button1.GetProperty< int >( Actor::Property::ID )));
+ button2.SetProperty(Toolkit::DevelControl::Property::UP_FOCUSABLE_ACTOR_ID, Property::Value((int)button1.GetProperty< int >( Actor::Property::ID )));
+ button2.SetProperty(Toolkit::DevelControl::Property::DOWN_FOCUSABLE_ACTOR_ID, Property::Value((int)button1.GetProperty< int >( Actor::Property::ID )));
// Move the focus towards left
DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::LEFT) == true);
// Move the focus towards left
DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::LEFT) == true);
Stage::GetCurrent().Add(tableView);
PushButton button = PushButton::New();
Stage::GetCurrent().Add(tableView);
PushButton button = PushButton::New();
- button.SetKeyboardFocusable(true);
+ button.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
tableView.AddChild(button, TableView::CellPosition(0, 0));
// set the navigation properties of button3
tableView.AddChild(button, TableView::CellPosition(0, 0));
// set the navigation properties of button3
- button.SetProperty(Toolkit::DevelControl::Property::LEFT_FOCUSABLE_ACTOR_ID, Property::Value((int)button1.GetId()));
+ button.SetProperty(Toolkit::DevelControl::Property::LEFT_FOCUSABLE_ACTOR_ID, Property::Value((int)button1.GetProperty< int >( Actor::Property::ID )));
// Set the focus to the button
DALI_TEST_CHECK(manager.SetCurrentFocusActor(button) == true);
// Set the focus to the button
DALI_TEST_CHECK(manager.SetCurrentFocusActor(button) == true);
// Create the first actor and add it to the stage
Actor first = Actor::New();
// Create the first actor and add it to the stage
Actor first = Actor::New();
- first.SetKeyboardFocusable(true);
+ first.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
Stage::GetCurrent().Add(first);
// Create the second actor and add it to the stage
Actor second = Actor::New();
Stage::GetCurrent().Add(first);
// Create the second actor and add it to the stage
Actor second = Actor::New();
- second.SetKeyboardFocusable(true);
+ second.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
Stage::GetCurrent().Add(second);
// Check that the focus is set on the first actor
Stage::GetCurrent().Add(second);
// Check that the focus is set on the first actor
// Create the first button and add it to the stage
PushButton firstPushButton = PushButton::New();
// Create the first button and add it to the stage
PushButton firstPushButton = PushButton::New();
- firstPushButton.SetKeyboardFocusable(true);
+ firstPushButton.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
Stage::GetCurrent().Add(firstPushButton);
// Create the second button and add it to the stage
PushButton secondPushButton = PushButton::New();
Stage::GetCurrent().Add(firstPushButton);
// Create the second button and add it to the stage
PushButton secondPushButton = PushButton::New();
- secondPushButton.SetKeyboardFocusable(true);
+ secondPushButton.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
Stage::GetCurrent().Add(secondPushButton);
// Check that the focus is set on the first button
Stage::GetCurrent().Add(secondPushButton);
// Check that the focus is set on the first button
// Create the first actor and add it to the stage
Actor first = Actor::New();
// Create the first actor and add it to the stage
Actor first = Actor::New();
- first.SetKeyboardFocusable(true);
+ first.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
Stage::GetCurrent().Add(first);
// Create the second actor and add it to the stage
Actor second = Actor::New();
Stage::GetCurrent().Add(first);
// Create the second actor and add it to the stage
Actor second = Actor::New();
- second.SetKeyboardFocusable(true);
+ second.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
Stage::GetCurrent().Add(second);
// Create the third actor and add it to the stage
Actor third = Actor::New();
Stage::GetCurrent().Add(second);
// Create the third actor and add it to the stage
Actor third = Actor::New();
- third.SetKeyboardFocusable(true);
+ third.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
Stage::GetCurrent().Add(third);
// Create the fourth actor and add it to the stage
Actor fourth = Actor::New();
Stage::GetCurrent().Add(third);
// Create the fourth actor and add it to the stage
Actor fourth = Actor::New();
- fourth.SetKeyboardFocusable(true);
+ fourth.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
Stage::GetCurrent().Add(fourth);
// Check that the focus is set on the second actor
Stage::GetCurrent().Add(fourth);
// Check that the focus is set on the second actor
for(int i = 0 ; i < 31 ; i ++)
{
Actor actor = Actor::New();
for(int i = 0 ; i < 31 ; i ++)
{
Actor actor = Actor::New();
- actor.SetKeyboardFocusable(true);
+ actor.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
Stage::GetCurrent().Add(actor);
manager.SetCurrentFocusActor(actor);
}
Stage::GetCurrent().Add(actor);
manager.SetCurrentFocusActor(actor);
}
// Create the first actor
Actor first = Actor::New();
// Create the first actor
Actor first = Actor::New();
- first.SetKeyboardFocusable(true);
+ first.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
// Create the second actor
Actor second = Actor::New();
// Create the second actor
Actor second = Actor::New();
- second.SetKeyboardFocusable(true);
+ second.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
// Create the third actor
Actor third = Actor::New();
// Create the third actor
Actor third = Actor::New();
- third.SetKeyboardFocusable(true);
+ third.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
// Create the fourth actor
Actor fourth = Actor::New();
// Create the fourth actor
Actor fourth = Actor::New();
- fourth.SetKeyboardFocusable(true);
+ fourth.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
// Add the four children to table view
tableView.AddChild(first, TableView::CellPosition(0, 0));
// Add the four children to table view
tableView.AddChild(first, TableView::CellPosition(0, 0));
// Create the first actor and add it to the stage
Control first = Control::New();
// Create the first actor and add it to the stage
Control first = Control::New();
- first.SetKeyboardFocusable(true);
+ first.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
Stage::GetCurrent().Add(first);
// Create the second actor and add it to the stage
Control second = Control::New();
Stage::GetCurrent().Add(first);
// Create the second actor and add it to the stage
Control second = Control::New();
- second.SetKeyboardFocusable(true);
+ second.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
Stage::GetCurrent().Add(second);
// Move the focus to the right
Stage::GetCurrent().Add(second);
// Move the focus to the right
// Create the third actor
Control third = Control::New();
// Create the third actor
Control third = Control::New();
- third.SetKeyboardFocusable(true);
+ third.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
// Create the fourth actor
Control fourth = Control::New();
// Create the fourth actor
Control fourth = Control::New();
- fourth.SetKeyboardFocusable(true);
+ fourth.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
// Add the four children to table view
tableView.AddChild(first, TableView::CellPosition(0, 0));
// Add the four children to table view
tableView.AddChild(first, TableView::CellPosition(0, 0));
DALI_TEST_CHECK( ! manager.GetCurrentFocusActor() );
Actor actor = Actor::New();
DALI_TEST_CHECK( ! manager.GetCurrentFocusActor() );
Actor actor = Actor::New();
- actor.SetKeyboardFocusable( true );
+ actor.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
tet_infoline( "Attempt to set unstaged actor, no actor should be returned from KeyboardFocusManager" );
manager.SetCurrentFocusActor( actor );
tet_infoline( "Attempt to set unstaged actor, no actor should be returned from KeyboardFocusManager" );
manager.SetCurrentFocusActor( actor );
DALI_TEST_CHECK( ! manager.GetCurrentFocusActor() );
Actor actor = Actor::New();
DALI_TEST_CHECK( ! manager.GetCurrentFocusActor() );
Actor actor = Actor::New();
- actor.SetKeyboardFocusable( true );
+ actor.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
Stage::GetCurrent().Add( actor );
manager.SetCurrentFocusActor( actor );
Stage::GetCurrent().Add( actor );
manager.SetCurrentFocusActor( actor );
// Create the first actor and add it to the stage
Control control = Control::New();
// Create the first actor and add it to the stage
Control control = Control::New();
- control.SetKeyboardFocusable(true);
+ control.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
scene.Add(control);
KeyEventCallback controlCallback( true );
scene.Add(control);
KeyEventCallback controlCallback( true );
Window firstWindow = Window::New(PositionSize(0,0,300,500) ,"", false);
DALI_TEST_CHECK( firstWindow );
Control first = Control::New();
Window firstWindow = Window::New(PositionSize(0,0,300,500) ,"", false);
DALI_TEST_CHECK( firstWindow );
Control first = Control::New();
- first.SetKeyboardFocusable(true);
+ first.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
firstWindow.Add(first);
Window secondWindow = Window::New(PositionSize(0,0,400,600) ,"", false);
DALI_TEST_CHECK( secondWindow );
Control second = Control::New();
firstWindow.Add(first);
Window secondWindow = Window::New(PositionSize(0,0,400,600) ,"", false);
DALI_TEST_CHECK( secondWindow );
Control second = Control::New();
- second.SetKeyboardFocusable(true);
+ second.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
secondWindow.Add( second );
DALI_TEST_CHECK(manager.SetCurrentFocusActor(first) == true);
secondWindow.Add( second );
DALI_TEST_CHECK(manager.SetCurrentFocusActor(first) == true);
DALI_TEST_CHECK( view );
Actor actor = Actor::New();
DALI_TEST_CHECK( view );
Actor actor = Actor::New();
- DALI_TEST_CHECK( !actor.OnStage() );
+ DALI_TEST_CHECK( !actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
view.Add(actor);
Stage::GetCurrent().Add(view);
view.Add(actor);
Stage::GetCurrent().Add(view);
- DALI_TEST_CHECK( actor.OnStage() );
+ DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
- DALI_TEST_CHECK( !actor.OnStage() );
+ DALI_TEST_CHECK( !actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
Actor backing = popup.FindChildByName( "popupBacking" );
DALI_TEST_CHECK( backing );
Actor backing = popup.FindChildByName( "popupBacking" );
DALI_TEST_CHECK( backing );
- DALI_TEST_EQUALS( backing.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, Math::MACHINE_EPSILON_0, TEST_LOCATION );
+ DALI_TEST_EQUALS( backing.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, Math::MACHINE_EPSILON_0, TEST_LOCATION );
// Check enabled property.
popup.SetDisplayState( Popup::SHOWN );
application.SendNotification();
application.Render();
// Check enabled property.
popup.SetDisplayState( Popup::SHOWN );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( backing.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.5f, Math::MACHINE_EPSILON_0, TEST_LOCATION );
+ DALI_TEST_EQUALS( backing.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.5f, Math::MACHINE_EPSILON_0, TEST_LOCATION );
popup.SetDisplayState( Popup::HIDDEN );
application.SendNotification();
application.Render();
popup.SetDisplayState( Popup::HIDDEN );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( backing.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, Math::MACHINE_EPSILON_0, TEST_LOCATION );
+ DALI_TEST_EQUALS( backing.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, Math::MACHINE_EPSILON_0, TEST_LOCATION );
popup.SetProperty( Popup::Property::BACKING_ENABLED, false );
bool propertyResult;
popup.SetProperty( Popup::Property::BACKING_ENABLED, false );
bool propertyResult;
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( backing.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, Math::MACHINE_EPSILON_0, TEST_LOCATION );
+ DALI_TEST_EQUALS( backing.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, Math::MACHINE_EPSILON_0, TEST_LOCATION );
popup.SetDisplayState( Popup::HIDDEN );
application.SendNotification();
application.Render();
popup.SetDisplayState( Popup::HIDDEN );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( backing.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, Math::MACHINE_EPSILON_0, TEST_LOCATION );
+ DALI_TEST_EQUALS( backing.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, Math::MACHINE_EPSILON_0, TEST_LOCATION );
// Check color property.
popup.SetProperty( Popup::Property::BACKING_ENABLED, true );
// Check color property.
popup.SetProperty( Popup::Property::BACKING_ENABLED, true );
DALI_TEST_EQUALS( scrollBar.GetIndicatorShowDuration(), 0.35f, TEST_LOCATION );
// Make the indicator invisible
DALI_TEST_EQUALS( scrollBar.GetIndicatorShowDuration(), 0.35f, TEST_LOCATION );
// Make the indicator invisible
- indicator.SetProperty( DevelActor::Property::OPACITY,0.0f);
+ indicator.SetProperty( Actor::Property::OPACITY,0.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is invisible
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is invisible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
// Show the indicator
scrollBar.ShowIndicator();
// Show the indicator
scrollBar.ShowIndicator();
application.Render();
// Check that the indicator is now visible
application.Render();
// Check that the indicator is now visible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
// Set the duration to show the indicator to be 0.75 second
scrollBar.SetIndicatorShowDuration(0.75);
DALI_TEST_EQUALS( scrollBar.GetIndicatorShowDuration(), 0.75f, TEST_LOCATION );
// Make the indicator invisible
// Set the duration to show the indicator to be 0.75 second
scrollBar.SetIndicatorShowDuration(0.75);
DALI_TEST_EQUALS( scrollBar.GetIndicatorShowDuration(), 0.75f, TEST_LOCATION );
// Make the indicator invisible
- indicator.SetProperty( DevelActor::Property::OPACITY,0.0f);
+ indicator.SetProperty( Actor::Property::OPACITY,0.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is invisible
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is invisible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
// Show the indicator
scrollBar.ShowIndicator();
// Show the indicator
scrollBar.ShowIndicator();
application.Render();
// Check that the indicator is not fully visible yet
application.Render();
// Check that the indicator is not fully visible yet
- DALI_TEST_CHECK( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ) != 1.0f );
+ DALI_TEST_CHECK( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ) != 1.0f );
// Wait for another 0.4 second
Wait(application, 400);
// Wait for another 0.4 second
Wait(application, 400);
application.Render();
// Check that the indicator is now fully visible
application.Render();
// Check that the indicator is now fully visible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
DALI_TEST_CHECK( duration > 0.0f );
// Make the indicator invisible
DALI_TEST_CHECK( duration > 0.0f );
// Make the indicator invisible
- indicator.SetProperty( DevelActor::Property::OPACITY,0.0f);
+ indicator.SetProperty( Actor::Property::OPACITY,0.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is invisible
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is invisible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
// Show the indicator
scrollBar.ShowIndicator();
// Show the indicator
scrollBar.ShowIndicator();
application.Render();
// Check that the indicator is now visible
application.Render();
// Check that the indicator is now visible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
// Now set the duration to show the indicator to be a negative value (which should be ignored and therefore means instant)
scrollBar.SetIndicatorShowDuration(-0.25f);
DALI_TEST_EQUALS( scrollBar.GetIndicatorShowDuration(), -0.25f, TEST_LOCATION );
// Make the indicator invisible
// Now set the duration to show the indicator to be a negative value (which should be ignored and therefore means instant)
scrollBar.SetIndicatorShowDuration(-0.25f);
DALI_TEST_EQUALS( scrollBar.GetIndicatorShowDuration(), -0.25f, TEST_LOCATION );
// Make the indicator invisible
- indicator.SetProperty( DevelActor::Property::OPACITY,0.0f);
+ indicator.SetProperty( Actor::Property::OPACITY,0.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is invisible
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is invisible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
// Show the indicator
scrollBar.ShowIndicator();
// Show the indicator
scrollBar.ShowIndicator();
application.Render();
// Check that the indicator becomes instantly visible in the next frame
application.Render();
// Check that the indicator becomes instantly visible in the next frame
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
DALI_TEST_EQUALS( scrollBar.GetIndicatorHideDuration(), 0.15f, TEST_LOCATION );
// Make the indicator visible
DALI_TEST_EQUALS( scrollBar.GetIndicatorHideDuration(), 0.15f, TEST_LOCATION );
// Make the indicator visible
- indicator.SetProperty( DevelActor::Property::OPACITY,1.0f);
+ indicator.SetProperty( Actor::Property::OPACITY,1.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is visible
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is visible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
// Hide the indicator
scrollBar.HideIndicator();
// Hide the indicator
scrollBar.HideIndicator();
application.Render();
// Check that the indicator is now invisible
application.Render();
// Check that the indicator is now invisible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
// Set the duration to hide the indicator to be 0.65 second
scrollBar.SetIndicatorHideDuration(0.65f);
DALI_TEST_EQUALS( scrollBar.GetIndicatorHideDuration(), 0.65f, TEST_LOCATION );
// Make the indicator visible
// Set the duration to hide the indicator to be 0.65 second
scrollBar.SetIndicatorHideDuration(0.65f);
DALI_TEST_EQUALS( scrollBar.GetIndicatorHideDuration(), 0.65f, TEST_LOCATION );
// Make the indicator visible
- indicator.SetProperty( DevelActor::Property::OPACITY,1.0f);
+ indicator.SetProperty( Actor::Property::OPACITY,1.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is visible
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is visible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
// Hide the indicator
scrollBar.HideIndicator();
// Hide the indicator
scrollBar.HideIndicator();
application.Render();
// Check that the indicator is not fully invisible yet
application.Render();
// Check that the indicator is not fully invisible yet
- DALI_TEST_CHECK( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ) != 0.0f );
+ DALI_TEST_CHECK( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ) != 0.0f );
// Wait for another 0.5 second
Wait(application, 500);
// Wait for another 0.5 second
Wait(application, 500);
application.Render();
// Check that the indicator is now fully invisible
application.Render();
// Check that the indicator is now fully invisible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
DALI_TEST_CHECK( duration > 0.0f );
// Make the indicator visible
DALI_TEST_CHECK( duration > 0.0f );
// Make the indicator visible
- indicator.SetProperty( DevelActor::Property::OPACITY,1.0f);
+ indicator.SetProperty( Actor::Property::OPACITY,1.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is visible
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is visible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
// Hide the indicator
scrollBar.HideIndicator();
// Hide the indicator
scrollBar.HideIndicator();
application.Render();
// Check that the indicator is now invisible
application.Render();
// Check that the indicator is now invisible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
// Now set the duration to hide the indicator to be a negative value (which should be ignored and therefore means instant)
scrollBar.SetIndicatorHideDuration(-0.25f);
DALI_TEST_EQUALS( scrollBar.GetIndicatorHideDuration(), -0.25f, TEST_LOCATION );
// Make the indicator visible
// Now set the duration to hide the indicator to be a negative value (which should be ignored and therefore means instant)
scrollBar.SetIndicatorHideDuration(-0.25f);
DALI_TEST_EQUALS( scrollBar.GetIndicatorHideDuration(), -0.25f, TEST_LOCATION );
// Make the indicator visible
- indicator.SetProperty( DevelActor::Property::OPACITY,1.0f);
+ indicator.SetProperty( Actor::Property::OPACITY,1.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is visible
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is visible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
// Hide the indicator
scrollBar.HideIndicator();
// Hide the indicator
scrollBar.HideIndicator();
application.Render();
// Check that the indicator becomes instantly invisible in the next frame
application.Render();
// Check that the indicator becomes instantly invisible in the next frame
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
DALI_TEST_CHECK( duration > 0.0f );
// Make the indicator invisible
DALI_TEST_CHECK( duration > 0.0f );
// Make the indicator invisible
- indicator.SetProperty( DevelActor::Property::OPACITY,0.0f);
+ indicator.SetProperty( Actor::Property::OPACITY,0.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is invisible
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is invisible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
// Show the indicator
scrollBar.ShowIndicator();
// Show the indicator
scrollBar.ShowIndicator();
application.Render();
// Check that the indicator is now visible
application.Render();
// Check that the indicator is now visible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
DALI_TEST_CHECK( indicator );
// Make the indicator initially visible
DALI_TEST_CHECK( indicator );
// Make the indicator initially visible
- indicator.SetProperty( DevelActor::Property::OPACITY,1.0f);
+ indicator.SetProperty( Actor::Property::OPACITY,1.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is initially visible
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is initially visible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
// Get the default duration to show the indicator
float duration = scrollBar.GetIndicatorShowDuration();
// Get the default duration to show the indicator
float duration = scrollBar.GetIndicatorShowDuration();
application.Render();
// Check that the indicator is still visible in the very next frame
application.Render();
// Check that the indicator is still visible in the very next frame
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
DALI_TEST_CHECK( duration > 0.0f );
// Make the indicator visible
DALI_TEST_CHECK( duration > 0.0f );
// Make the indicator visible
- indicator.SetProperty( DevelActor::Property::OPACITY,1.0f);
+ indicator.SetProperty( Actor::Property::OPACITY,1.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is visible
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is visible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
// Hide the indicator
scrollBar.HideIndicator();
// Hide the indicator
scrollBar.HideIndicator();
application.Render();
// Check that the indicator is now invisible
application.Render();
// Check that the indicator is now invisible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
DALI_TEST_CHECK( indicator );
// Make the indicator initially invisible
DALI_TEST_CHECK( indicator );
// Make the indicator initially invisible
- indicator.SetProperty( DevelActor::Property::OPACITY,0.0f);
+ indicator.SetProperty( Actor::Property::OPACITY,0.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is initially invisible
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is initially invisible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
// Get the default duration to hide the indicator
float duration = scrollBar.GetIndicatorHideDuration();
// Get the default duration to hide the indicator
float duration = scrollBar.GetIndicatorHideDuration();
application.Render();
// Check that the indicator is still invisible in the very next frame
application.Render();
// Check that the indicator is still invisible in the very next frame
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
DALI_TEST_CHECK( duration > 0.0f );
// Make the indicator invisible
DALI_TEST_CHECK( duration > 0.0f );
// Make the indicator invisible
- indicator.SetProperty( DevelActor::Property::OPACITY,0.0f);
+ indicator.SetProperty( Actor::Property::OPACITY,0.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is invisible
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is invisible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
// Do the "ShowIndicator" action
Property::Map emptyMap;
// Do the "ShowIndicator" action
Property::Map emptyMap;
application.Render();
// Check that the indicator is now visible
application.Render();
// Check that the indicator is now visible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
DALI_TEST_CHECK( duration > 0.0f );
// Make the indicator visible
DALI_TEST_CHECK( duration > 0.0f );
// Make the indicator visible
- indicator.SetProperty( DevelActor::Property::OPACITY,1.0f);
+ indicator.SetProperty( Actor::Property::OPACITY,1.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is visible
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is visible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
// Do the "HideIndicator" action
Property::Map emptyMap;
// Do the "HideIndicator" action
Property::Map emptyMap;
application.Render();
// Check that the indicator is now invisible
application.Render();
// Check that the indicator is now invisible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
DALI_TEST_CHECK( duration > 0.0f );
// Make the indicator invisible
DALI_TEST_CHECK( duration > 0.0f );
// Make the indicator invisible
- indicator.SetProperty( DevelActor::Property::OPACITY,0.0f);
+ indicator.SetProperty( Actor::Property::OPACITY,0.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is invisible
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is invisible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
// Do the "ShowIndicator" action
Property::Map emptyMap;
// Do the "ShowIndicator" action
Property::Map emptyMap;
application.Render();
// Check that the indicator is now visible
application.Render();
// Check that the indicator is now visible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
// Get the default duration to hide the indicator
float hideDuration = scrollBar.GetProperty<float>( ScrollBar::Property::INDICATOR_HIDE_DURATION );
// Get the default duration to hide the indicator
float hideDuration = scrollBar.GetProperty<float>( ScrollBar::Property::INDICATOR_HIDE_DURATION );
application.Render();
// Check that the indicator is now invisible
application.Render();
// Check that the indicator is now invisible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
DALI_TEST_CHECK( indicator );
// Make the indicator invisible
DALI_TEST_CHECK( indicator );
// Make the indicator invisible
- indicator.SetProperty( DevelActor::Property::OPACITY,0.0f);
+ indicator.SetProperty( Actor::Property::OPACITY,0.0f);
// Don't use a show animation; the indicator should appear immediately
scrollBar.SetProperty( ScrollBar::Property::INDICATOR_SHOW_DURATION, 0.0f );
// Don't use a show animation; the indicator should appear immediately
scrollBar.SetProperty( ScrollBar::Property::INDICATOR_SHOW_DURATION, 0.0f );
application.Render();
// Check that the indicator is now visible
application.Render();
// Check that the indicator is now visible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
// Get the default duration to hide the indicator
float hideDuration = scrollBar.GetProperty<float>( ScrollBar::Property::INDICATOR_HIDE_DURATION );
// Get the default duration to hide the indicator
float hideDuration = scrollBar.GetProperty<float>( ScrollBar::Property::INDICATOR_HIDE_DURATION );
application.Render();
// Check that the indicator is now invisible
application.Render();
// Check that the indicator is now invisible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
DALI_TEST_CHECK( duration > 0.0f );
// Make the indicator visible
DALI_TEST_CHECK( duration > 0.0f );
// Make the indicator visible
- indicator.SetProperty( DevelActor::Property::OPACITY,1.0f);
+ indicator.SetProperty( Actor::Property::OPACITY,1.0f);
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is visible
// Render and notify
application.SendNotification();
application.Render();
// Check that the indicator is visible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
// Hide the indicator
scrollBar.HideIndicator();
// Hide the indicator
scrollBar.HideIndicator();
application.Render();
// Check that the indicator is now partially hidden
application.Render();
// Check that the indicator is now partially hidden
- DALI_TEST_CHECK( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ) < 1.0f );
+ DALI_TEST_CHECK( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ) < 1.0f );
// Now interrupt the Hide with a DoAction( "ShowTransientIndicator" )
// Now interrupt the Hide with a DoAction( "ShowTransientIndicator" )
application.Render();
// Check that the indicator is now visible
application.Render();
// Check that the indicator is now visible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 1.0f, TEST_LOCATION );
// Get the default duration to hide the indicator
float hideDuration = scrollBar.GetProperty<float>( ScrollBar::Property::INDICATOR_HIDE_DURATION );
// Get the default duration to hide the indicator
float hideDuration = scrollBar.GetProperty<float>( ScrollBar::Property::INDICATOR_HIDE_DURATION );
application.Render();
// Check that the indicator is now invisible
application.Render();
// Check that the indicator is now invisible
- DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( indicator.GetCurrentProperty< float >( Actor::Property::OPACITY ), 0.0f, TEST_LOCATION );
DALI_TEST_CHECK( view );
Actor actor = Actor::New();
DALI_TEST_CHECK( view );
Actor actor = Actor::New();
- DALI_TEST_CHECK( !actor.OnStage() );
+ DALI_TEST_CHECK( !actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
view.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
view.Add(actor);
Stage::GetCurrent().Add(view);
view.Add(actor);
Stage::GetCurrent().Add(view);
- DALI_TEST_CHECK( actor.OnStage() );
+ DALI_TEST_CHECK( actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
- DALI_TEST_CHECK( !actor.OnStage() );
+ DALI_TEST_CHECK( !actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) );
ToolkitTestApplication application;
TableView tableView = TableView::New(4,4);
ToolkitTestApplication application;
TableView tableView = TableView::New(4,4);
- tableView.SetKeyboardFocusable( true );
+ tableView.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
tableView.SetProperty( Dali::Actor::Property::NAME, "TableView");
for ( int row = 0; row < 4; ++row )
tableView.SetProperty( Dali::Actor::Property::NAME, "TableView");
for ( int row = 0; row < 4; ++row )
std::ostringstream str;
str << row << "-" << col;
control.SetProperty( Dali::Actor::Property::NAME, str.str() );
std::ostringstream str;
str << row << "-" << col;
control.SetProperty( Dali::Actor::Property::NAME, str.str() );
- control.SetKeyboardFocusable( true );
+ control.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
tableView.AddChild( control, TableView::CellPosition( row, col ) );
}
}
tableView.AddChild( control, TableView::CellPosition( row, col ) );
}
}
ToolkitTestApplication application;
TableView tableView = TableView::New(3, 3);
ToolkitTestApplication application;
TableView tableView = TableView::New(3, 3);
- tableView.SetKeyboardFocusable( true );
+ tableView.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
tableView.SetProperty( Dali::Actor::Property::NAME, "TableView");
for ( int row = 0; row < 3; ++row )
tableView.SetProperty( Dali::Actor::Property::NAME, "TableView");
for ( int row = 0; row < 3; ++row )
std::ostringstream nameStr;
nameStr << row << "-" << col << "-" << childRow << "-" << childCol;
control.SetProperty( Dali::Actor::Property::NAME, nameStr.str() );
std::ostringstream nameStr;
nameStr << row << "-" << col << "-" << childRow << "-" << childCol;
control.SetProperty( Dali::Actor::Property::NAME, nameStr.str() );
- control.SetKeyboardFocusable( true );
+ control.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
childTableView.AddChild( control, TableView::CellPosition( childRow, childCol ) );
}
}
childTableView.AddChild( control, TableView::CellPosition( childRow, childCol ) );
}
}
{
Control control = Control::New();
control.SetProperty( Dali::Actor::Property::NAME, str.str() );
{
Control control = Control::New();
control.SetProperty( Dali::Actor::Property::NAME, str.str() );
- control.SetKeyboardFocusable( true );
+ control.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
tableView.AddChild( control, TableView::CellPosition( row, col ) );
}
}
tableView.AddChild( control, TableView::CellPosition( row, col ) );
}
}
application.Render();
Actor layer = editor.GetChildAt( 1u );
application.Render();
Actor layer = editor.GetChildAt( 1u );
- DALI_TEST_CHECK( layer.IsLayer() );
+ DALI_TEST_CHECK( layer.GetProperty< bool >( Actor::Property::IS_LAYER ) );
DALI_TEST_EQUALS( layer.GetChildCount(), 1u, TEST_LOCATION ); // The cursor.
DALI_TEST_EQUALS( stencil.GetChildCount(), 0u, TEST_LOCATION );
DALI_TEST_EQUALS( layer.GetChildCount(), 1u, TEST_LOCATION ); // The cursor.
DALI_TEST_EQUALS( stencil.GetChildCount(), 0u, TEST_LOCATION );
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.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);
+ editor.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
bool startedCalled = false;
bool finishedCalled = false;
bool startedCalled = false;
bool finishedCalled = false;
application.Render();
Actor layer = field.GetChildAt( 1u );
application.Render();
Actor layer = field.GetChildAt( 1u );
- DALI_TEST_CHECK( layer.IsLayer() );
+ DALI_TEST_CHECK( layer.GetProperty< bool >( Actor::Property::IS_LAYER ) );
DALI_TEST_EQUALS( layer.GetChildCount(), 1u, TEST_LOCATION ); // The cursor.
DALI_TEST_EQUALS( stencil.GetChildCount(), 0u, TEST_LOCATION );
DALI_TEST_EQUALS( layer.GetChildCount(), 1u, TEST_LOCATION ); // The cursor.
DALI_TEST_EQUALS( stencil.GetChildCount(), 0u, TEST_LOCATION );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
field.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- field.SetKeyboardFocusable(true);
+ field.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
KeyboardFocusManager::Get().SetCurrentFocusActor( field );
application.SendNotification();
KeyboardFocusManager::Get().SetCurrentFocusActor( field );
application.SendNotification();
- unsigned int actorID = actor.GetId();
+ unsigned int actorID = actor.GetProperty< int >( Actor::Property::ID );
ActorAdditionalInfo info = GetActorAdditionalInfo(actorID);
info.mAccessibilityAttributes[type] = text;
ActorAdditionalInfo info = GetActorAdditionalInfo(actorID);
info.mAccessibilityAttributes[type] = text;
- ActorAdditionalInfo data = GetActorAdditionalInfo(actor.GetId());
+ ActorAdditionalInfo data = GetActorAdditionalInfo(actor.GetProperty< int >( Actor::Property::ID ));
text = data.mAccessibilityAttributes[type];
}
text = data.mAccessibilityAttributes[type];
}
actor.SetProperty(propertyActorFocusable, true);
// Now we insert the actor into the focus chain with the specified focus order
actor.SetProperty(propertyActorFocusable, true);
// Now we insert the actor into the focus chain with the specified focus order
- mFocusIDContainer.insert(FocusIDPair(order, actor.GetId()));
+ mFocusIDContainer.insert(FocusIDPair(order, actor.GetProperty< int >( Actor::Property::ID )));
}
// Update the actor's focus order in its additional data
}
// Update the actor's focus order in its additional data
- SynchronizeActorAdditionalInfo(actor.GetId(), order);
+ SynchronizeActorAdditionalInfo(actor.GetProperty< int >( Actor::Property::ID ), order);
- ActorAdditionalInfo data = GetActorAdditionalInfo(actor.GetId());
+ ActorAdditionalInfo data = GetActorAdditionalInfo(actor.GetProperty< int >( Actor::Property::ID ));
focusOrder = data.mFocusOrder;
}
focusOrder = data.mFocusOrder;
}
- return DoSetCurrentFocusActor(actor.GetId());
+ return DoSetCurrentFocusActor(actor.GetProperty< int >( Actor::Property::ID ));
- DALI_SCRIPT_VERBOSE(" Is Actor id=%d\n", actor.GetId());
+ DALI_SCRIPT_VERBOSE(" Is Actor id=%d\n", actor.GetProperty< int >( Actor::Property::ID ));
}
Toolkit::Control control = Toolkit::Control::DownCast(handle);
if(control)
{
}
Toolkit::Control control = Toolkit::Control::DownCast(handle);
if(control)
{
- DALI_SCRIPT_VERBOSE(" Is Control id=%d\n", actor.GetId());
+ DALI_SCRIPT_VERBOSE(" Is Control id=%d\n", actor.GetProperty< int >( Actor::Property::ID ));
}
#endif // DEBUG_ENABLED
}
#endif // DEBUG_ENABLED
mPreviousButtonState = mButtonState; // Store previous state for visual removal (used when animations ended)
mButtonState = requestedState; // Update current state
mPreviousButtonState = mButtonState; // Store previous state for visual removal (used when animations ended)
mButtonState = requestedState; // Update current state
- if ( Self().OnStage() )
+ if ( Self().GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
{
OnStateChange( mButtonState ); // Notify derived buttons
SelectRequiredVisual( VISUAL_INDEX_FOR_STATE[ mButtonState ][ BACKGROUND ] );
{
OnStateChange( mButtonState ); // Notify derived buttons
SelectRequiredVisual( VISUAL_INDEX_FOR_STATE[ mButtonState ][ BACKGROUND ] );
mTapDetector.Attach( self );
mTapDetector.DetectedSignal().Connect(this, &Button::OnTap);
mTapDetector.Attach( self );
mTapDetector.DetectedSignal().Connect(this, &Button::OnTap);
- self.SetKeyboardFocusable( true );
+ self.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
self.TouchSignal().Connect( this, &Button::OnTouch );
}
self.TouchSignal().Connect( this, &Button::OnTouch );
}
StopObservingVisual( currentRegisteredVisual );
// If control staged and visual enabled then visuals will be swapped once ready
StopObservingVisual( currentRegisteredVisual );
// If control staged and visual enabled then visuals will be swapped once ready
- if( self.OnStage() && enabled )
+ if( self.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) && enabled )
{
// Check if visual is currently in the process of being replaced ( is in removal container )
RegisteredVisualContainer::Iterator visualQueuedForRemoval;
{
// Check if visual is currently in the process of being replaced ( is in removal container )
RegisteredVisualContainer::Iterator visualQueuedForRemoval;
Internal::Visual::Base& visualImpl = Toolkit::GetImplementation( visual );
// Put on stage if enabled and the control is already on the stage
Internal::Visual::Base& visualImpl = Toolkit::GetImplementation( visual );
// Put on stage if enabled and the control is already on the stage
- if( ( enabled == VisualState::ENABLED ) && self.OnStage() )
+ if( ( enabled == VisualState::ENABLED ) && self.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
{
visualImpl.SetOnStage( self );
}
{
visualImpl.SetOnStage( self );
}
(*iter)->enabled = enable;
Actor parentActor = mControlImpl.Self();
(*iter)->enabled = enable;
Actor parentActor = mControlImpl.Self();
- if ( mControlImpl.Self().OnStage() ) // If control not on Stage then Visual will be added when StageConnection is called.
+ if ( mControlImpl.Self().GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) ) // If control not on Stage then Visual will be added when StageConnection is called.
}
// A visual is ready so control may need relayouting if staged
}
// A visual is ready so control may need relayouting if staged
+ if ( self.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
{
mControlImpl.RelayoutRequest();
}
{
mControlImpl.RelayoutRequest();
}
{
oss << "\"name\":\"" << name << "\",\n";
}
{
oss << "\"name\":\"" << name << "\",\n";
}
- oss << "\"id\":\"" << control.Self().GetId() << "\",\n";
+ oss << "\"id\":\"" << control.Self().GetProperty< int >( Actor::Property::ID ) << "\",\n";
oss << "\"registeredVisuals\":\n" << controlData.mVisuals << ",\n";
oss << "\"removeVisuals\":\n" << controlData.mRemoveVisuals << ",\n";
oss << "\"rendererCount\":" << control.Self().GetRendererCount() << ",\n";
oss << "\"registeredVisuals\":\n" << controlData.mVisuals << ",\n";
oss << "\"removeVisuals\":\n" << controlData.mRemoveVisuals << ",\n";
oss << "\"rendererCount\":" << control.Self().GetRendererCount() << ",\n";
{
oss << "\"name\":\"" << name << "\",\n";
}
{
oss << "\"name\":\"" << name << "\",\n";
}
- oss << "\"id\":\"" << actor.GetId() << "\",\n";
+ oss << "\"id\":\"" << actor.GetProperty< int >( Actor::Property::ID ) << "\",\n";
oss << "\"rendererCount\":" << actor.GetRendererCount() << ",\n";
oss << "\"properties\":\n{\n";
Toolkit::Internal::DumpProperties( oss, actor ) << "}\n";
oss << "\"rendererCount\":" << actor.GetRendererCount() << ",\n";
oss << "\"properties\":\n{\n";
Toolkit::Internal::DumpProperties( oss, actor ) << "}\n";
if( child )
{
// Anchor actor to top left of the container
if( child )
{
// Anchor actor to top left of the container
- if( child.GetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT ).Get< bool >() )
+ if( child.GetProperty( Actor::Property::POSITION_USES_ANCHOR_POINT ).Get< bool >() )
{
child.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
}
{
child.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
}
- } while ( !mChildrenNodes[nextFocusedActorIndex].actor.GetHandle().IsKeyboardFocusable() );
+ } while ( !mChildrenNodes[nextFocusedActorIndex].actor.GetHandle().GetProperty< bool >( Actor::Property::KEYBOARD_FOCUSABLE ) );
break;
}
case Toolkit::Control::KeyboardFocus::RIGHT:
break;
}
case Toolkit::Control::KeyboardFocus::RIGHT:
- } while ( !mChildrenNodes[nextFocusedActorIndex].actor.GetHandle().IsKeyboardFocusable() );
+ } while ( !mChildrenNodes[nextFocusedActorIndex].actor.GetHandle().GetProperty< bool >( Actor::Property::KEYBOARD_FOCUSABLE ) );
YGNodeStyleSetAlignContent( mRootNode.node, static_cast<YGAlign>( mAlignContent ) );
// Make self as keyboard focusable and focus group
YGNodeStyleSetAlignContent( mRootNode.node, static_cast<YGAlign>( mAlignContent ) );
// Make self as keyboard focusable and focus group
- self.SetKeyboardFocusable( true );
+ self.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
SetAsKeyboardFocusGroup( true );
}
SetAsKeyboardFocusGroup( true );
}
{
mCompositingActor = Actor::New();
mCompositingActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER );
{
mCompositingActor = Actor::New();
mCompositingActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER );
- mCompositingActor.SetProperty( DevelActor::Property::OPACITY,GAUSSIAN_BLUR_VIEW_DEFAULT_BLUR_STRENGTH); // ensure alpha is enabled for this object and set default value
+ mCompositingActor.SetProperty( Actor::Property::OPACITY,GAUSSIAN_BLUR_VIEW_DEFAULT_BLUR_STRENGTH); // ensure alpha is enabled for this object and set default value
renderer = CreateRenderer( BASIC_VERTEX_SOURCE, BASIC_FRAGMENT_SOURCE );
mCompositingActor.AddRenderer( renderer );
renderer = CreateRenderer( BASIC_VERTEX_SOURCE, BASIC_FRAGMENT_SOURCE );
mCompositingActor.AddRenderer( renderer );
case Toolkit::Popup::FADE:
{
// Fade animations start transparent.
case Toolkit::Popup::FADE:
{
// Fade animations start transparent.
- mPopupContainer.SetProperty( DevelActor::Property::OPACITY, 0.0f );
+ mPopupContainer.SetProperty( Actor::Property::OPACITY, 0.0f );
- mPopupContainer.SetProperty( DevelActor::Property::OPACITY, transitionIn ? 1.0f : 0.0f );
+ mPopupContainer.SetProperty( Actor::Property::OPACITY, transitionIn ? 1.0f : 0.0f );
{
mPreviousFocusedActor = keyboardFocusManager.GetCurrentFocusActor();
{
mPreviousFocusedActor = keyboardFocusManager.GetCurrentFocusActor();
- if( Self().IsKeyboardFocusable() )
+ if( Self().GetProperty< bool >( Actor::Property::KEYBOARD_FOCUSABLE ) )
{
// Setup the actgor to start focus from.
Actor focusActor;
{
// Setup the actgor to start focus from.
Actor focusActor;
- if( mContent && mContent.IsKeyboardFocusable() )
+ if( mContent && mContent.GetProperty< bool >( Actor::Property::KEYBOARD_FOCUSABLE ) )
{
// If the content is focusable, move the focus to the content.
focusActor = mContent;
}
{
// If the content is focusable, move the focus to the content.
focusActor = mContent;
}
- else if( mFooter && mFooter.IsKeyboardFocusable() )
+ else if( mFooter && mFooter.GetProperty< bool >( Actor::Property::KEYBOARD_FOCUSABLE ) )
{
// If the footer is focusable, move the focus to the footer.
focusActor = mFooter;
{
// If the footer is focusable, move the focus to the footer.
focusActor = mFooter;
ClearKeyInputFocus();
// Restore the keyboard focus when popup is hidden.
ClearKeyInputFocus();
// Restore the keyboard focus when popup is hidden.
- if( mPreviousFocusedActor && mPreviousFocusedActor.IsKeyboardFocusable() )
+ if( mPreviousFocusedActor && mPreviousFocusedActor.GetProperty< bool >( Actor::Property::KEYBOARD_FOCUSABLE ) )
{
Dali::Toolkit::KeyboardFocusManager keyboardFocusManager = Dali::Toolkit::KeyboardFocusManager::Get();
if( keyboardFocusManager )
{
Dali::Toolkit::KeyboardFocusManager keyboardFocusManager = Dali::Toolkit::KeyboardFocusManager::Get();
if( keyboardFocusManager )
Toolkit::Control control = Toolkit::Control::DownCast( parent );
bool layoutControl = control && GetImplementation( control ).IsKeyboardNavigationSupported();
Toolkit::Control control = Toolkit::Control::DownCast( parent );
bool layoutControl = control && GetImplementation( control ).IsKeyboardNavigationSupported();
- if( parent.IsKeyboardFocusable() || layoutControl )
+ if( parent.GetProperty< bool >( Actor::Property::KEYBOARD_FOCUSABLE ) || layoutControl )
{
focusableActors.push_back( parent );
{
focusableActors.push_back( parent );
( currentFocusedActor && ( ( !mContent || ( currentFocusGroup != mContent ) ) && ( !mFooter || ( currentFocusGroup != mFooter ) ) ) ) )
{
// The current focused actor is not within popup.
( currentFocusedActor && ( ( !mContent || ( currentFocusGroup != mContent ) ) && ( !mFooter || ( currentFocusGroup != mFooter ) ) ) ) )
{
// The current focused actor is not within popup.
- if( mContent && mContent.IsKeyboardFocusable() )
+ if( mContent && mContent.GetProperty< bool >( Actor::Property::KEYBOARD_FOCUSABLE ) )
{
// If the content is focusable, move the focus to the content.
nextFocusableActor = mContent;
}
{
// If the content is focusable, move the focus to the content.
nextFocusableActor = mContent;
}
- else if( mFooter && mFooter.IsKeyboardFocusable() )
+ else if( mFooter && mFooter.GetProperty< bool >( Actor::Property::KEYBOARD_FOCUSABLE ) )
{
// If the footer is focusable, move the focus to the footer.
nextFocusableActor = mFooter;
{
// If the footer is focusable, move the focus to the footer.
nextFocusableActor = mFooter;
- mIndicator.SetProperty( DevelActor::Property::OPACITY,mIndicatorShowAlpha);
+ mIndicator.SetProperty( Actor::Property::OPACITY,mIndicatorShowAlpha);
- mIndicator.SetProperty( DevelActor::Property::OPACITY,0.0f);
+ mIndicator.SetProperty( Actor::Property::OPACITY,0.0f);
- mIndicator.SetProperty( DevelActor::Property::OPACITY,mIndicatorShowAlpha);
+ mIndicator.SetProperty( Actor::Property::OPACITY,mIndicatorShowAlpha);
}
mAnimation.AnimateTo( Property( mIndicator, Actor::Property::COLOR_ALPHA ),
0.0f, AlphaFunction::EASE_IN, TimePeriod((mIndicatorShowDuration + mTransientIndicatorDuration), mIndicatorHideDuration) );
}
mAnimation.AnimateTo( Property( mIndicator, Actor::Property::COLOR_ALPHA ),
0.0f, AlphaFunction::EASE_IN, TimePeriod((mIndicatorShowDuration + mTransientIndicatorDuration), mIndicatorHideDuration) );
void ShadowView::Activate()
{
void ShadowView::Activate()
{
- DALI_ASSERT_ALWAYS( Self().OnStage() && "ShadowView should be on stage before calling Activate()\n" );
+ DALI_ASSERT_ALWAYS( Self().GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) && "ShadowView should be on stage before calling Activate()\n" );
// make sure resources are allocated and start the render tasks processing
CreateRenderTasks();
// make sure resources are allocated and start the render tasks processing
CreateRenderTasks();
void ShadowView::Deactivate()
{
void ShadowView::Deactivate()
{
- DALI_ASSERT_ALWAYS( Self().OnStage() && "ShadowView should be on stage before calling Deactivate()\n" )
+ DALI_ASSERT_ALWAYS( Self().GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) && "ShadowView should be on stage before calling Deactivate()\n" )
// stop render tasks processing
// Note: render target resources are automatically freed since we set the Image::Unused flag
// stop render tasks processing
// Note: render target resources are automatically freed since we set the Image::Unused flag
if( actor && position.rowIndex == row && position.columnIndex == column )
{
// Anchor actor to top left of the cell
if( actor && position.rowIndex == row && position.columnIndex == column )
{
// Anchor actor to top left of the cell
- if( actor.GetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT ).Get< bool >() )
+ if( actor.GetProperty( Actor::Property::POSITION_USES_ANCHOR_POINT ).Get< bool >() )
{
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
}
{
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
}
{
// Make self as keyboard focusable and focus group
Actor self = Self();
{
// Make self as keyboard focusable and focus group
Actor self = Self();
- self.SetKeyboardFocusable(true);
+ self.SetProperty( Actor::Property::KEYBOARD_FOCUSABLE,true);
SetAsKeyboardFocusGroup(true);
}
SetAsKeyboardFocusGroup(true);
}
{
mAnimation = Animation::New( mAnimationPeriod.durationSeconds );
}
{
mAnimation = Animation::New( mAnimationPeriod.durationSeconds );
}
- indicator.SetProperty( DevelActor::Property::OPACITY,1.0f);
+ indicator.SetProperty( Actor::Property::OPACITY,1.0f);
mAnimation.AnimateTo( Property( indicator, Actor::Property::COLOR_ALPHA ), 0.0f, AlphaFunction::EASE_IN, mAnimationPeriod );
mAnimation.Play();
mAnimation.FinishedSignal().Connect( this, &TextEditor::OnScrollIndicatorAnimationFinished );
mAnimation.AnimateTo( Property( indicator, Actor::Property::COLOR_ALPHA ), 0.0f, AlphaFunction::EASE_IN, mAnimationPeriod );
mAnimation.Play();
mAnimation.FinishedSignal().Connect( this, &TextEditor::OnScrollIndicatorAnimationFinished );
+ if( !self.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
{
// When the control is off the stage, it does not have Window.
return;
{
// When the control is off the stage, it does not have Window.
return;
- bool positionUsesAnchorPoint = self.GetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT ).Get< bool >();
+ bool positionUsesAnchorPoint = self.GetProperty( Actor::Property::POSITION_USES_ANCHOR_POINT ).Get< bool >();
Vector3 actorSize = self.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) * self.GetCurrentProperty< Vector3 >( Actor::Property::SCALE );
Vector3 anchorPointOffSet = actorSize * ( positionUsesAnchorPoint ? self.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ) : AnchorPoint::TOP_LEFT );
Vector3 actorSize = self.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) * self.GetCurrentProperty< Vector3 >( Actor::Property::SCALE );
Vector3 anchorPointOffSet = actorSize * ( positionUsesAnchorPoint ? self.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ) : AnchorPoint::TOP_LEFT );
- Vector2 screenPosition = self.GetProperty( DevelActor::Property::SCREEN_POSITION ).Get< Vector2 >();
+ Vector2 screenPosition = self.GetProperty( Actor::Property::SCREEN_POSITION ).Get< Vector2 >();
mDisplayArea.x = screenPosition.x - anchorPointOffSet.x;
mDisplayArea.y = screenPosition.y - anchorPointOffSet.y;
mDisplayArea.x = screenPosition.x - anchorPointOffSet.x;
mDisplayArea.y = screenPosition.y - anchorPointOffSet.y;
void WebView::OnInitialize()
{
void WebView::OnInitialize()
{
- Self().SetKeyboardFocusable( true );
+ Self().SetProperty( Actor::Property::KEYBOARD_FOCUSABLE, true );
Self().TouchSignal().Connect( this, &WebView::OnTouchEvent );
if( mWebEngine )
Self().TouchSignal().Connect( this, &WebView::OnTouchEvent );
if( mWebEngine )
}
mControls.push_back(control);
control.TouchSignal().Connect(this, &DragAndDropDetector::OnDrag);
}
mControls.push_back(control);
control.TouchSignal().Connect(this, &DragAndDropDetector::OnDrag);
- mFirstEnter.push_back(control.GetId());
+ mFirstEnter.push_back(control.GetProperty< int >( Actor::Property::ID ));
mPanGestureDetector.Attach(control);
mPanGestureDetector.DetectedSignal().Connect(this, &DragAndDropDetector::OnPan);
}
mPanGestureDetector.Attach(control);
mPanGestureDetector.DetectedSignal().Connect(this, &DragAndDropDetector::OnPan);
}
{
match->TouchSignal().Disconnect(this, &DragAndDropDetector::OnDrag);
mPanGestureDetector.Detach(*match);
{
match->TouchSignal().Disconnect(this, &DragAndDropDetector::OnDrag);
mPanGestureDetector.Detach(*match);
- mFirstEnter.erase(std::find(mFirstEnter.begin(), mFirstEnter.end(), control.GetId()));
+ mFirstEnter.erase(std::find(mFirstEnter.begin(), mFirstEnter.end(), control.GetProperty< int >( Actor::Property::ID )));
mControls.erase(match);
}
}
mControls.erase(match);
}
}
mFirstEnter.clear();
for( auto&& control : mControls)
{
mFirstEnter.clear();
for( auto&& control : mControls)
{
- mFirstEnter.push_back(control.GetId());
+ mFirstEnter.push_back(control.GetProperty< int >( Actor::Property::ID ));
}
float width = control.GetProperty<float>(Dali::Actor::Property::SIZE_WIDTH);
float height = control.GetProperty<float>(Dali::Actor::Property::SIZE_HEIGHT);
}
float width = control.GetProperty<float>(Dali::Actor::Property::SIZE_WIDTH);
float height = control.GetProperty<float>(Dali::Actor::Property::SIZE_HEIGHT);
{
if(mDragControl != control && mPointDown)
{
{
if(mDragControl != control && mPointDown)
{
- auto found = std::find(mFirstEnter.begin(), mFirstEnter.end(), control.GetId());
+ auto found = std::find(mFirstEnter.begin(), mFirstEnter.end(), control.GetProperty< int >( Actor::Property::ID ));
if(mFirstEnter.end() != found)
{
SetPosition(data.GetScreenPosition(0));
if(mFirstEnter.end() != found)
{
SetPosition(data.GetScreenPosition(0));
{
if(mDragControl != control && mPointDown)
{
{
if(mDragControl != control && mPointDown)
{
- mFirstEnter.push_back(control.GetId());
+ mFirstEnter.push_back(control.GetProperty< int >( Actor::Property::ID ));
EmitExitedSignal(control);
}
}
EmitExitedSignal(control);
}
}
bool KeyboardFocusManager::DoSetCurrentFocusActor( Actor actor )
{
bool success = false;
bool KeyboardFocusManager::DoSetCurrentFocusActor( Actor actor )
{
bool success = false;
- if( actor && actor.IsKeyboardFocusable() && actor.OnStage() )
+ if( actor && actor.GetProperty< bool >( Actor::Property::KEYBOARD_FOCUSABLE ) && actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
{
Integration::SceneHolder currentWindow = Integration::SceneHolder::Get( actor );
{
Integration::SceneHolder currentWindow = Integration::SceneHolder::Get( actor );
}
// Check whether the actor is in the stage and is keyboard focusable.
}
// Check whether the actor is in the stage and is keyboard focusable.
- if( actor && actor.IsKeyboardFocusable() && actor.OnStage() )
+ if( actor && actor.GetProperty< bool >( Actor::Property::KEYBOARD_FOCUSABLE ) && actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
{
if( ( mIsFocusIndicatorShown == SHOW ) && ( mEnableFocusIndicator == ENABLE ) )
{
{
if( ( mIsFocusIndicatorShown == SHOW ) && ( mEnableFocusIndicator == ENABLE ) )
{
{
Actor actor = mCurrentFocusActor.GetHandle();
{
Actor actor = mCurrentFocusActor.GetHandle();
- if( actor && ! actor.OnStage() )
+ if( actor && ! actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
{
// If the actor has been removed from the stage, then it should not be focused
actor.Reset();
{
// If the actor has been removed from the stage, then it should not be focused
actor.Reset();
- if( actor && ! actor.OnStage() )
+ if( actor && ! actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
{
// If the actor has been removed from the window, then the window doesn't have any focused actor
actor.Reset();
{
// If the actor has been removed from the window, then the window doesn't have any focused actor
actor.Reset();
Actor target = mFocusHistory[ mFocusHistory.size() -1 ].GetHandle();
// Impl of Actor is not null
Actor target = mFocusHistory[ mFocusHistory.size() -1 ].GetHandle();
// Impl of Actor is not null
- if( target && target.OnStage() )
+ if( target && target.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
{
// Delete pre focused actor in history because it will pushed again by SetCurrentFocusActor()
mFocusHistory.pop_back();
{
// Delete pre focused actor in history because it will pushed again by SetCurrentFocusActor()
mFocusHistory.pop_back();
- if( nextFocusableActor && nextFocusableActor.IsKeyboardFocusable() )
+ if( nextFocusableActor && nextFocusableActor.GetProperty< bool >( Actor::Property::KEYBOARD_FOCUSABLE ) )
{
// Whether the next focusable actor is a layout control
if( IsLayoutControl( nextFocusableActor ) )
{
// Whether the next focusable actor is a layout control
if( IsLayoutControl( nextFocusableActor ) )
Actor nextFocusableActor = GetImplementation( control ).GetNextKeyboardFocusableActor(actor, direction, mFocusGroupLoopEnabled);
if(nextFocusableActor)
{
Actor nextFocusableActor = GetImplementation( control ).GetNextKeyboardFocusableActor(actor, direction, mFocusGroupLoopEnabled);
if(nextFocusableActor)
{
- if(!nextFocusableActor.IsKeyboardFocusable())
+ if(!nextFocusableActor.GetProperty< bool >( Actor::Property::KEYBOARD_FOCUSABLE ))
{
// If the actor is not focusable, ask the same layout control for the next actor to focus
return DoMoveFocusWithinLayoutControl(control, nextFocusableActor, direction);
{
// If the actor is not focusable, ask the same layout control for the next actor to focus
return DoMoveFocusWithinLayoutControl(control, nextFocusableActor, direction);
mIsWaitingKeyboardFocusChangeCommit = false;
}
mIsWaitingKeyboardFocusChangeCommit = false;
}
- if (committedFocusActor && committedFocusActor.IsKeyboardFocusable())
+ if (committedFocusActor && committedFocusActor.GetProperty< bool >( Actor::Property::KEYBOARD_FOCUSABLE ))
{
// Whether the commited focusable actor is a layout control
if(IsLayoutControl(committedFocusActor))
{
// Whether the commited focusable actor is a layout control
if(IsLayoutControl(committedFocusActor))
Toolkit::GetImplementation(visual).SetOffStage( actor );
}
visual = Toolkit::VisualFactory::Get().CreateVisual( param0, param1 );
Toolkit::GetImplementation(visual).SetOffStage( actor );
}
visual = Toolkit::VisualFactory::Get().CreateVisual( param0, param1 );
- if( visual && actor && actor.OnStage() )
+ if( visual && actor && actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
{
Toolkit::GetImplementation(visual).SetOnStage(actor);
}
{
Toolkit::GetImplementation(visual).SetOnStage(actor);
}
Toolkit::GetImplementation(visual).SetOffStage( actor );
}
visual = Toolkit::VisualFactory::Get().CreateVisual( param );
Toolkit::GetImplementation(visual).SetOffStage( actor );
}
visual = Toolkit::VisualFactory::Get().CreateVisual( param );
- if( visual && actor && actor.OnStage() )
+ if( visual && actor && actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
{
Toolkit::GetImplementation(visual).SetOnStage(actor);
}
{
Toolkit::GetImplementation(visual).SetOnStage(actor);
}
void Control::SetKeyInputFocus()
{
void Control::SetKeyInputFocus()
{
+ if( Self().GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
{
Toolkit::KeyInputFocusManager::Get().SetFocus(Toolkit::Control::DownCast(Self()));
}
{
Toolkit::KeyInputFocusManager::Get().SetFocus(Toolkit::Control::DownCast(Self()));
}
bool Control::HasKeyInputFocus()
{
bool result = false;
bool Control::HasKeyInputFocus()
{
bool result = false;
+ if( Self().GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
{
Toolkit::Control control = Toolkit::KeyInputFocusManager::Get().GetCurrentFocusControl();
if( Self() == control )
{
Toolkit::Control control = Toolkit::KeyInputFocusManager::Get().GetCurrentFocusControl();
if( Self() == control )
void Control::ClearKeyInputFocus()
{
void Control::ClearKeyInputFocus()
{
+ if( Self().GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
{
Toolkit::KeyInputFocusManager::Get().RemoveFocus(Toolkit::Control::DownCast(Self()));
}
{
Toolkit::KeyInputFocusManager::Get().RemoveFocus(Toolkit::Control::DownCast(Self()));
}
{
// If the clipping mode has been set, we may need to create a renderer.
// Only do this if we are already on-stage as the OnStageConnection will handle the off-stage clipping controls.
{
// If the clipping mode has been set, we may need to create a renderer.
// Only do this if we are already on-stage as the OnStageConnection will handle the off-stage clipping controls.
- if( ( index == Actor::Property::CLIPPING_MODE ) && Self().OnStage() )
+ if( ( index == Actor::Property::CLIPPING_MODE ) && Self().GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
{
// Note: This method will handle whether creation of the renderer is required.
CreateClippingRenderer( *this );
{
// Note: This method will handle whether creation of the renderer is required.
CreateClippingRenderer( *this );