/*
- * Copyright (c) 2019 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.
#include <stdlib.h>
#include <string>
#include <dali-toolkit-test-suite-utils.h>
+#include "dali-toolkit-test-utils/toolkit-timer.h"
#include <dali-toolkit/dali-toolkit.h>
#include <dali/devel-api/actors/actor-devel.h>
#include <dali-toolkit/devel-api/controls/scroll-bar/scroll-bar.h>
for(int i = 0; i < frames; i++)
{
+ Test::EmitGlobalTimerSignal();
+
pos += direction; // Move in this direction
time += RENDER_FRAME_INTERVAL;
TestMovePan( application, pos, time);
float scrollBarHeight = 100.0f;
scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, scrollBarHeight, 0.0f) );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
// Create a source actor that owns the scroll properties required by the scroll bar
Actor sourceActor = Actor::New();
- Stage::GetCurrent().Add( sourceActor );
+ application.GetScene().Add( sourceActor );
// Register the scroll properties
Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f );
// Create another source actor
Actor newSourceActor = Actor::New();
- Stage::GetCurrent().Add( newSourceActor );
+ application.GetScene().Add( newSourceActor );
// Register the scroll properties
Property::Index newPropertyScrollPosition = newSourceActor.RegisterProperty( "sourcePosition", 0.0f );
scrollBar.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
// Connect to the ScrollPositionIntervalReached signal
scrollBar.ScrollPositionIntervalReachedSignal().Connect( &OnScrollPositionIntervalReached );
// Create a source actor that owns the scroll properties required by the scroll bar
Actor sourceActor = Actor::New();
- Stage::GetCurrent().Add( sourceActor );
+ application.GetScene().Add( sourceActor );
// Register the scroll properties
Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f );
float scrollBarHeight = 100.0f;
scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, scrollBarHeight, 0.0f) );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
// Create a source actor that owns the scroll properties required by the scroll bar
Actor sourceActor = Actor::New();
- Stage::GetCurrent().Add( sourceActor );
+ application.GetScene().Add( sourceActor );
// Register the scroll properties
Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f );
float scrollBarHeight = 100.0f;
scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, scrollBarHeight, 0.0f) );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
ScrollBar scrollBar = ScrollBar::New();
DALI_TEST_CHECK( scrollBar );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
Actor indicator = scrollBar.GetScrollIndicator();
DALI_TEST_CHECK( indicator );
scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::Fixed);
scrollBar.SetIndicatorFixedHeight(50.0f);
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
// Connect the pan finished signal
ConnectionTracker connectionTracker;
// Create a source actor that owns the scroll properties required by the scroll bar
Actor sourceActor = Actor::New();
- Stage::GetCurrent().Add( sourceActor );
+ application.GetScene().Add( sourceActor );
// Register the scroll properties
Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f );
scrollBar.SetIndicatorHeightPolicy(Toolkit::ScrollBar::Fixed);
scrollBar.SetIndicatorFixedHeight(50.0f);
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
// Connect the pan finished signal
ConnectionTracker connectionTracker;
// Create a source actor that owns the scroll properties required by the scroll bar
Actor sourceActor = Actor::New();
- Stage::GetCurrent().Add( sourceActor );
+ application.GetScene().Add( sourceActor );
// Register the scroll properties
Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f );
scrollBar.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
ConnectionTracker connectionTracker;
// Connect to the ScrollPositionIntervalReached signal
// Create a source actor that owns the scroll properties required by the scroll bar
Actor sourceActor = Actor::New();
- Stage::GetCurrent().Add( sourceActor );
+ application.GetScene().Add( sourceActor );
// Register the scroll properties
Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f );
scrollBar.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
scrollBar.SetProperty( Actor::Property::SIZE, Vector3(20.0f, 800.0f, 0.0f) );
- Stage::GetCurrent().Add( scrollBar );
+ application.GetScene().Add( scrollBar );
// Connect to the ScrollPositionIntervalReached signal
scrollBar.ScrollPositionIntervalReachedSignal().Connect( &OnScrollPositionIntervalReached );
// Create a source actor that owns the scroll properties required by the scroll bar
Actor sourceActor = Actor::New();
- Stage::GetCurrent().Add( sourceActor );
+ application.GetScene().Add( sourceActor );
// Register the scroll properties
Property::Index propertyScrollPosition = sourceActor.RegisterProperty( "sourcePosition", 0.0f );