DALI_TEST_CHECK( popup2 == popup );
// 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 Popup actor
Popup popup = Popup::New();
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
popup.SetProperty( Toolkit::Popup::Property::ANIMATION_DURATION, 0.0f );
// Put in show state so it's layer is connected to popup (for ancestor check).
// Create the Popup actor
Popup popup = Popup::New();
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
popup.SetProperty( Toolkit::Popup::Property::ANIMATION_DURATION, 0.0f );
// Put in show state so it's layer is connected to popup (for ancestor check).
popup.SetDisplayState( Popup::SHOWN );
// Create the Popup actor
Popup popup = Popup::New();
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
popup.SetProperty( Toolkit::Popup::Property::ANIMATION_DURATION, 0.0f );
// Put in show state so it's layer is connected to popup (for ancestor check).
popup.SetDisplayState( Popup::SHOWN );
// Create the Popup actor
Popup popup = Popup::New();
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
popup.SetProperty( Popup::Property::TAIL_VISIBILITY, false );
popup.SetDisplayState( Popup::SHOWN );
popup.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
popup.SetProperty( Actor::Property::SIZE, Vector2( 50.0f, 50.0f ) );
popup.SetProperty( Popup::Property::ANIMATION_DURATION, 0.0f );
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
popup.OutsideTouchedSignal().Connect( &OnPopupTouchedOutside );
popup.SetDisplayState( Popup::SHOWN );
DALI_TEST_CHECK( popup.GetProperty( Popup::Property::AUTO_HIDE_DELAY ).Get( getAutoHideDelay ) );
DALI_TEST_EQUALS( getAutoHideDelay, 200, TEST_LOCATION );
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
DALI_TEST_EQUALS( gPopupState, Popup::HIDDEN, TEST_LOCATION );
Popup popup = Popup::New();
ConnectStateSignals( popup );
popup.SetTitle( TextLabel::New( "Title" ) );
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
std::string animationModes[] = { "NONE", "ZOOM", "FADE", "CUSTOM" };
placement.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
placement.SetProperty( Actor::Property::SIZE, Vector2( 1.0f, 1.0f ) );
placement.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
- Stage::GetCurrent().Add( placement );
+ application.GetScene().Add( placement );
placement.Add( popup );
// Create the Popup actor
Popup popup = Popup::New();
popup.SetProperty( Popup::Property::ANIMATION_DURATION, 0.0f );
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
Actor backing = popup.FindChildByName( "popupBacking" );
DALI_TEST_CHECK( backing );
// Create the Popup actor
Popup popup = Popup::New();
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
// Check setting an image
popup.SetProperty( Toolkit::Popup::Property::POPUP_BACKGROUND_IMAGE, "invalid-image.png" );
DALI_TEST_CHECK( popup.GetProperty( Toolkit::Popup::Property::EXIT_ANIMATION ).Get( resultMap ) );
DALI_TEST_EQUALS( resultMap.Count(), 0u, TEST_LOCATION );
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
popup.SetDisplayState( Popup::SHOWN );
for( int i = 0; i < RENDER_ANIMATION_TEST_DURATION_FRAMES; i++ )
button.ClickedSignal().Connect( &PushButtonClicked );
- Stage::GetCurrent().Add( button );
+ application.GetScene().Add( button );
button.Add( popup );
DALI_TEST_CHECK( popup.GetProperty( Popup::Property::TAIL_POSITION ).Get( vectorResult ) );
DALI_TEST_EQUALS( vectorResult, tailPosition, TEST_LOCATION );
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
popup.SetDisplayState( Popup::SHOWN );
application.SendNotification();
popup.SetProperty( Popup::Property::ANIMATION_DURATION, 1.0f );
popup.SetTitle( Toolkit::TextLabel::New( "This is a Toast Popup.\nIt will auto-hide itself" ) );
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
popup.SetDisplayState( Toolkit::Popup::SHOWN );
for( int i = 0; i < RENDER_ANIMATION_TEST_DURATION_FRAMES; i++ )
ConnectStateSignals( popup );
popup.SetProperty( Popup::Property::ANIMATION_DURATION, 0.0f );
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
popup.SetDisplayState( Toolkit::Popup::SHOWN );
application.SendNotification();
// Create the Popup actor
Popup popup = Popup::New();
popup.SetProperty( Popup::Property::ANIMATION_DURATION, 0.0f );
- Stage::GetCurrent().Add( popup );
+ application.GetScene().Add( popup );
popup.SetDisplayState( Popup::SHOWN );
application.SendNotification();
popup.SetKeyInputFocus();
- application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::Down, "", "", Device::Class::TOUCH, Device::Subclass::NONE ) );
+ application.ProcessEvent( GenerateKey( "", "", "", DALI_KEY_ESCAPE, 0, 0, Integration::KeyEvent::DOWN, "", "", Device::Class::TOUCH, Device::Subclass::NONE ) );
application.SendNotification();
application.Render();