/*
- * 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.
int UtcDaliToggleButtonConstructorP(void)
{
- TestApplication application;
+ ToolkitTestApplication application;
tet_infoline(" UtcDaliToggleButtonConstructorP");
ToggleButton button;
int UtcDaliToggleButtonCopyConstructorP(void)
{
- TestApplication application;
+ ToolkitTestApplication application;
tet_infoline(" UtcDaliToggleButtonCopyConstructorP");
// Initialize an object, ref count == 1
int UtcDaliToggleButtonAssignmentOperatorP(void)
{
- TestApplication application;
+ ToolkitTestApplication application;
tet_infoline(" UtcDaliToggleButtonAssignmentOperatorP");
ToggleButton button = ToggleButton::New();
DALI_TEST_CHECK( toggleButton2 == toggleButton );
//Additional check to ensure object is created by checking if it's registered
- ObjectRegistry registry = Stage::GetCurrent().GetObjectRegistry();
+ ObjectRegistry registry = application.GetCore().GetObjectRegistry();
DALI_TEST_CHECK( registry );
gObjectCreatedCallBackCalled = false;
// Create the ToggleButton actor
ToggleButton toggleButton = ToggleButton::New();
- Stage::GetCurrent().Add( toggleButton );
- toggleButton.SetParentOrigin(ParentOrigin::TOP_LEFT);
- toggleButton.SetAnchorPoint(ParentOrigin::TOP_LEFT);
- toggleButton.SetPosition( 0.0f, 0.0f );
+ application.GetScene().Add( toggleButton );
+ toggleButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ toggleButton.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
+ toggleButton.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
{// Check empty array
Property::Array toggleIcons;
// Create the ToggleButton actor
ToggleButton toggleButton = ToggleButton::New();
- Stage::GetCurrent().Add( toggleButton );
- toggleButton.SetParentOrigin(ParentOrigin::TOP_LEFT);
- toggleButton.SetAnchorPoint(ParentOrigin::TOP_LEFT);
- toggleButton.SetPosition( 0.0f, 0.0f );
+ application.GetScene().Add( toggleButton );
+ toggleButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ toggleButton.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
+ toggleButton.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
{ // Check empty tip array
Property::Array toggleIcons;
// Create the ToggleButton actor
ToggleButton toggleButton = ToggleButton::New();
- Stage::GetCurrent().Add( toggleButton );
- toggleButton.SetParentOrigin(ParentOrigin::TOP_LEFT);
- toggleButton.SetAnchorPoint(ParentOrigin::TOP_LEFT);
- toggleButton.SetPosition( BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS );
- toggleButton.SetSize( BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS );
+ application.GetScene().Add( toggleButton );
+ toggleButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
+ toggleButton.SetProperty( Actor::Property::ANCHOR_POINT,ParentOrigin::TOP_LEFT);
+ toggleButton.SetProperty( Actor::Property::POSITION, BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS );
+ toggleButton.SetProperty( Actor::Property::SIZE, BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS );
Property::Array toggleIcons;
toggleIcons.PushBack( TEST_IMAGE_ONE ); //Icons path
DALI_TEST_EQUALS( index, 0, TEST_LOCATION );
END_TEST;
-}
\ No newline at end of file
+}