/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
- Actor rootActor = Stage::GetCurrent().GetRootLayer();
+ Actor rootActor = application.GetScene().GetRootLayer();
rootActor.Add( control );
application.SendNotification();
int rootChildCount = rootActor.GetChildCount();
- Vector2 centerPoint = Stage::GetCurrent().GetSize() * 0.5f;
+ Vector2 centerPoint = application.GetScene().GetSize() * 0.5f;
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, centerPoint ) );
Dali::Timer timer = Timer::New( 1u );
.Add( Tooltip::Tail::Property::BELOW_VISUAL, "below-visual.png" ))
);
- Actor rootActor = Stage::GetCurrent().GetRootLayer();
+ Actor rootActor = application.GetScene().GetRootLayer();
rootActor.Add( control );
application.SendNotification();
int rootChildCount = rootActor.GetChildCount();
- Vector2 centerPoint = Stage::GetCurrent().GetSize() * 0.5f;
+ Vector2 centerPoint = application.GetScene().GetSize() * 0.5f;
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, centerPoint ) );
Dali::Timer timer = Timer::New( 1u );
.Add( Tooltip::Tail::Property::BELOW_VISUAL, "below-visual.png" ))
);
- Actor rootActor = Stage::GetCurrent().GetRootLayer();
+ Actor rootActor = application.GetScene().GetRootLayer();
rootActor.Add( control );
application.SendNotification();
int rootChildCount = rootActor.GetChildCount();
- Vector2 centerPoint = Stage::GetCurrent().GetSize() * 0.5f;
+ Vector2 centerPoint = application.GetScene().GetSize() * 0.5f;
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, centerPoint ) );
Dali::Timer timer = Timer::New( 1u );
.Add( Tooltip::Property::POSITION, Tooltip::Position::BELOW )
);
- Actor rootActor = Stage::GetCurrent().GetRootLayer();
+ Actor rootActor = application.GetScene().GetRootLayer();
rootActor.Add( control );
application.SendNotification();
application.Render();
- Vector2 centerPoint = Stage::GetCurrent().GetSize() * 0.5f;
+ Vector2 centerPoint = application.GetScene().GetSize() * 0.5f;
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, centerPoint ) );
Dali::Timer timer = Timer::New( 1u );
.Add( Tooltip::Property::POSITION, Tooltip::Position::ABOVE )
);
- Actor rootActor = Stage::GetCurrent().GetRootLayer();
+ Actor rootActor = application.GetScene().GetRootLayer();
rootActor.Add( control );
application.SendNotification();
application.Render();
- Vector2 centerPoint = Stage::GetCurrent().GetSize() * 0.5f;
+ Vector2 centerPoint = application.GetScene().GetSize() * 0.5f;
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, centerPoint ) );
Dali::Timer timer = Timer::New( 1u );
.Add( Tooltip::Property::POSITION, Tooltip::Position::HOVER_POINT )
);
- Actor rootActor = Stage::GetCurrent().GetRootLayer();
+ Actor rootActor = application.GetScene().GetRootLayer();
rootActor.Add( control );
application.SendNotification();
application.Render();
- const Vector2 stageSize = Stage::GetCurrent().GetSize();
+ const Vector2 stageSize = application.GetScene().GetSize();
Vector2 hoverPoint = stageSize * 0.5f;
hoverPoint.x -= 10.0f;
hoverPoint.y -= 10.0f;
.Add( Tooltip::Property::MOVEMENT_THRESHOLD, 5 )
);
- Actor rootActor = Stage::GetCurrent().GetRootLayer();
+ Actor rootActor = application.GetScene().GetRootLayer();
rootActor.Add( control );
application.SendNotification();
int rootChildCount = rootActor.GetChildCount();
tet_infoline( "Start hover" );
- Vector2 hoverPoint = Stage::GetCurrent().GetSize() * 0.5f;
+ Vector2 hoverPoint = application.GetScene().GetSize() * 0.5f;
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, hoverPoint ) );
application.SendNotification();
control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
control.SetProperty( DevelControl::Property::TOOLTIP, "Test" );
- Actor rootActor = Stage::GetCurrent().GetRootLayer();
+ Actor rootActor = application.GetScene().GetRootLayer();
rootActor.Add( control );
application.SendNotification();
int rootChildCount = rootActor.GetChildCount();
tet_infoline( "Start hover" );
- Vector2 hoverPoint = Stage::GetCurrent().GetSize() * 0.5f;
+ Vector2 hoverPoint = application.GetScene().GetSize() * 0.5f;
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, hoverPoint ) );
application.SendNotification();
control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
- Actor rootActor = Stage::GetCurrent().GetRootLayer();
+ Actor rootActor = application.GetScene().GetRootLayer();
rootActor.Add( control );
application.SendNotification();
int rootChildCount = rootActor.GetChildCount();
- Vector2 hoverPoint = Stage::GetCurrent().GetSize() * 0.5f;
+ Vector2 hoverPoint = application.GetScene().GetSize() * 0.5f;
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, hoverPoint ) );
Dali::Timer timer = Timer::New( 1u );
.Add( Tooltip::Property::MOVEMENT_THRESHOLD, 5 )
);
- Actor rootActor = Stage::GetCurrent().GetRootLayer();
+ Actor rootActor = application.GetScene().GetRootLayer();
rootActor.Add( control );
application.SendNotification();
int rootChildCount = rootActor.GetChildCount();
- Vector2 hoverPoint = Stage::GetCurrent().GetSize() * 0.5f;
+ Vector2 hoverPoint = application.GetScene().GetSize() * 0.5f;
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, hoverPoint ) );
Dali::Timer timer = Timer::New( 1u );
control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
control.SetProperty( Actor::Property::SIZE, Vector2( 100.f, 100.f ) );
- Actor rootActor = Stage::GetCurrent().GetRootLayer();
+ Actor rootActor = application.GetScene().GetRootLayer();
rootActor.Add( control );
application.SendNotification();
int rootChildCount = rootActor.GetChildCount();
- Vector2 centerPoint = Stage::GetCurrent().GetSize() * 0.5f;
+ Vector2 centerPoint = application.GetScene().GetSize() * 0.5f;
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, centerPoint ) );
tet_infoline( "Change content while timer is running and ensure it matches the new value" );
{
ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
- Vector2 stageSize = Stage::GetCurrent().GetSize();
+ Vector2 stageSize = application.GetScene().GetSize();
tet_infoline( "Create a control and place it at the bottom of the screen, setting the tooltip to appear below" );
Control control = Control::New();
.Add( Tooltip::Property::POSITION, Tooltip::Position::BELOW )
);
- Actor rootActor = Stage::GetCurrent().GetRootLayer();
+ Actor rootActor = application.GetScene().GetRootLayer();
rootActor.Add( control );
application.SendNotification();
{
ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
- Vector2 stageSize = Stage::GetCurrent().GetSize();
+ Vector2 stageSize = application.GetScene().GetSize();
tet_infoline( "Create a control and place it at the top of the screen, setting the tooltip to appear above" );
Control control = Control::New();
.Add( Tooltip::Property::POSITION, Tooltip::Position::ABOVE )
);
- Actor rootActor = Stage::GetCurrent().GetRootLayer();
+ Actor rootActor = application.GetScene().GetRootLayer();
rootActor.Add( control );
application.SendNotification();
{
ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
- Vector2 stageSize = Stage::GetCurrent().GetSize();
+ Vector2 stageSize = application.GetScene().GetSize();
Vector2 centerPoint = stageSize * 0.5f;
tet_infoline( "Create a control and adjust it's position so that the tooltip will attempt to appear to the left of the screen" );
);
control.SetProperty( Actor::Property::POSITION_X, -centerPoint.x );
- Actor rootActor = Stage::GetCurrent().GetRootLayer();
+ Actor rootActor = application.GetScene().GetRootLayer();
rootActor.Add( control );
application.SendNotification();
{
ToolkitTestApplication application; // Exceptions require ToolkitTestApplication
- Vector2 stageSize = Stage::GetCurrent().GetSize();
+ Vector2 stageSize = application.GetScene().GetSize();
Vector2 centerPoint = stageSize * 0.5f;
tet_infoline( "Create a control and adjust it's position so that the tooltip will attempt to appear to the right of the screen" );
);
control.SetProperty( Actor::Property::POSITION_X, centerPoint.x );
- Actor rootActor = Stage::GetCurrent().GetRootLayer();
+ Actor rootActor = application.GetScene().GetRootLayer();
rootActor.Add( control );
application.SendNotification();