TextLabel label = TextLabel::New();
DALI_TEST_CHECK( label );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
// Note - we can't check the defaults since the stylesheets are platform-specific
label.SetProperty( DevelTextLabel::Property::RENDERING_BACKEND, DevelText::RENDERING_SHARED_ATLAS );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
// Turn on all the effects
label.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
TextLabel label = TextLabel::New();
DALI_TEST_CHECK( label );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
const std::string scripts( " привет мир, γειά σου Κόσμε, Hello world, مرحبا بالعالم, שלום עולם, "
"բարեւ աշխարհը, მსოფლიოში, 안녕하세요, 你好世界, ひらがな, カタカナ, "
TextLabel label = TextLabel::New();
DALI_TEST_CHECK( label );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
TextAbstraction::FontClient fontClient = TextAbstraction::FontClient::Get();
DALI_TEST_CHECK( labelFinished );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
- Stage::GetCurrent().Add( labelImmediate );
+ application.GetScene().Add( labelImmediate );
// Turn on all the effects
labelImmediate.SetProperty( TextLabel::Property::MULTI_LINE, false );
labelImmediate.SetProperty( TextLabel::Property::AUTO_SCROLL_GAP, 50.0f );
labelImmediate.SetProperty( TextLabel::Property::AUTO_SCROLL_SPEED, 80.0f );
labelImmediate.SetProperty( TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::IMMEDIATE );
- Stage::GetCurrent().Add( labelFinished );
+ application.GetScene().Add( labelFinished );
// Turn on all the effects
labelFinished.SetProperty( TextLabel::Property::MULTI_LINE, false );
labelFinished.SetProperty( TextLabel::Property::AUTO_SCROLL_GAP, 50.0f );
DALI_TEST_CHECK( labelLong );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
- Stage::GetCurrent().Add( labelShort );
+ application.GetScene().Add( labelShort );
// Turn on all the effects
labelShort.SetProperty( TextLabel::Property::MULTI_LINE, false );
labelShort.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_SPEED, 80.0f );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::IMMEDIATE );
- Stage::GetCurrent().Add( labelLong );
+ application.GetScene().Add( labelLong );
// Turn on all the effects
labelLong.SetProperty( TextLabel::Property::MULTI_LINE, false );
labelLong.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
DALI_TEST_CHECK( labelLong );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
- Stage::GetCurrent().Add( labelShort );
+ application.GetScene().Add( labelShort );
// Turn on all the effects
labelShort.SetProperty( TextLabel::Property::MULTI_LINE, false );
labelShort.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_SPEED, 80.0f );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::IMMEDIATE );
- Stage::GetCurrent().Add( labelLong );
+ application.GetScene().Add( labelLong );
// Turn on all the effects
labelLong.SetProperty( TextLabel::Property::MULTI_LINE, false );
labelLong.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
DALI_TEST_CHECK( labelLong );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
- Stage::GetCurrent().Add( labelShort );
+ application.GetScene().Add( labelShort );
// Turn on all the effects
labelShort.SetProperty( TextLabel::Property::MULTI_LINE, false );
labelShort.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "END" );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_SPEED, 80.0f );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::IMMEDIATE );
- Stage::GetCurrent().Add( labelLong );
+ application.GetScene().Add( labelLong );
// Turn on all the effects
labelLong.SetProperty( TextLabel::Property::MULTI_LINE, false );
labelLong.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "END" );
DALI_TEST_CHECK( labelLong );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
- Stage::GetCurrent().Add( labelShort );
+ application.GetScene().Add( labelShort );
// Turn on all the effects
labelShort.SetProperty( TextLabel::Property::MULTI_LINE, false );
labelShort.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "END" );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_SPEED, 80.0f );
labelShort.SetProperty( TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::IMMEDIATE );
- Stage::GetCurrent().Add( labelLong );
+ application.GetScene().Add( labelLong );
// Turn on all the effects
labelLong.SetProperty( TextLabel::Property::MULTI_LINE, false );
labelLong.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "END" );
DALI_TEST_CHECK( label );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
label.SetProperty( Actor::Property::SIZE, Vector2( 360.0f, 20.f ) );
// Turn on all the effects
label.SetProperty( TextLabel::Property::MULTI_LINE, false );
TextLabel label = TextLabel::New("Some text to scroll");
DALI_TEST_CHECK( label );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
TextLabel label = TextLabel::New("Some text to scroll");
DALI_TEST_CHECK( label );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
// Avoid a crash when core load gl resources.
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
// Turn on all the effects
label.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
//label.SetProperty( TextLabel::Property::POINT_SIZE, 18 );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
label.SetProperty( TextLabel::Property::LINE_WRAP_MODE, "WORD" );
DALI_TEST_EQUALS( label.GetProperty< int >( TextLabel::Property::LINE_WRAP_MODE ), static_cast< int >( Text::LineWrap::WORD ), TEST_LOCATION );
label.SetProperty( TextLabel::Property::TEXT, "Hello world Hello world" );
label.SetProperty( TextLabel::Property::TEXT_COLOR, Color::BLUE );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
TraceCallStack& drawTrace = application.GetGlAbstraction().GetDrawTrace();
drawTrace.Enable( true );
label.SetProperty( Actor::Property::SIZE, Vector2( 300.0f, 300.f ) );
label.SetProperty( TextLabel::Property::TEXT, "Hello world Hello world" );
label.SetProperty( TextLabel::Property::POINT_SIZE, 12 );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
Property::Map outlineMapSet;
Property::Map outlineMapGet;
label.SetProperty( TextLabel::Property::TEXT, "Hello world Hello world Hello world Hello world Hello world Hello world" );
label.SetProperty( TextLabel::Property::POINT_SIZE, 20 );
label.SetProperty( TextLabel::Property::MULTI_LINE, false );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
application.SendNotification();
application.Render();
label.SetProperty( TextLabel::Property::TEXT, "Hello world" );
label.SetProperty( TextLabel::Property::POINT_SIZE, 20 );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
// Test LTR text
DALI_TEST_EQUALS( label.GetProperty< int >( DevelTextLabel::Property::TEXT_DIRECTION ), static_cast< int >( Toolkit::DevelText::TextDirection::LEFT_TO_RIGHT ), TEST_LOCATION );
label.SetProperty( TextLabel::Property::TEXT, "Hello world" );
label.SetProperty( TextLabel::Property::POINT_SIZE, 15 );
label.SetProperty( TextLabel::Property::LINE_SPACING, 12 );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
DALI_TEST_EQUALS( label.GetProperty< int >( DevelTextLabel::Property::VERTICAL_LINE_ALIGNMENT ), static_cast< int >( Toolkit::DevelText::VerticalLineAlignment::TOP ), TEST_LOCATION );
label.SetProperty( DevelTextLabel::Property::VERTICAL_LINE_ALIGNMENT, DevelText::VerticalLineAlignment::MIDDLE );
// The text has been laid out with the bitmap font if the natural size is the sum of all the width (322) and 34 height.
DALI_TEST_EQUALS( label.GetNaturalSize(), Vector3(322.f, 34.f, 0.f), Math::MACHINE_EPSILON_1000, TEST_LOCATION );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
application.SendNotification();
application.Render();
label.SetProperty( Toolkit::DevelTextLabel::Property::TEXT_FIT, textFitMapSet );
label.SetProperty( TextLabel::Property::POINT_SIZE, 120.f);
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
application.SendNotification();
application.Render();
label.SetProperty( TextLabel::Property::UNDERLINE, underlineMapSet );
label.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::BLUE );
- Stage::GetCurrent().Add( label );
+ application.GetScene().Add( label );
application.SendNotification();
application.Render();