-
-int utcDaliTextFieldEvent04(void)
-{
- ToolkitTestApplication application;
- tet_infoline(" utcDaliTextFieldEvent04");
-
- // Checks if the highlight actor is created.
-
- TextField field = TextField::New();
- DALI_TEST_CHECK( field );
- Stage::GetCurrent().Add( field );
- LoadMarkerImages(application, field);
- // Render and notify
- application.SendNotification();
- application.Render();
-
- field.SetProperty( TextField::Property::TEXT, "This is a long text for the size of the text-field." );
- field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
- field.SetSize( 300.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
-
- // Avoid a crash when core load gl resources.
- application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
- // Render and notify
- application.SendNotification();
- application.Render();
-
- // Create a tap event to touch the text field.
- application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
- application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
- // Render and notify
- application.SendNotification();
- application.Render();
-
-
- // Tap first to get the focus.
- application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 1.f, 25.0f ) ) );
- application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 1.f, 25.0f ) ) );
-
- // Render and notify
- application.SendNotification();
- application.Render();
-
- // Double tap to select a word.
- application.ProcessEvent( GenerateTap( Gesture::Possible, 2u, 1u, Vector2( 1.f, 25.0f ) ) );
- application.ProcessEvent( GenerateTap( Gesture::Started, 2u, 1u, Vector2( 1.f, 25.0f ) ) );
-
- // Render and notify
- application.SendNotification();
- application.Render();
-
- // Tap grab handle
- application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 0.f, 40.0f ) ) );
- application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 0.f, 40.0f ) ) );
- END_TEST;
-}
-
-int utcDaliTextFieldEvent05(void)
-{
- ToolkitTestApplication application;
- tet_infoline(" utcDaliTextFieldEvent05");
-
- // Checks if the highlight actor is created.
-
- TextField field = TextField::New();
- DALI_TEST_CHECK( field );
- Stage::GetCurrent().Add( field );
- LoadMarkerImages(application, field);
- // Render and notify
- application.SendNotification();
- application.Render();
-
- field.SetProperty( TextField::Property::TEXT, "This is a long text for the size of the text-field." );
- field.SetProperty( TextField::Property::POINT_SIZE, 10.f );
- field.SetSize( 300.f, 50.f );
- field.SetParentOrigin( ParentOrigin::TOP_LEFT );
- field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
-
- // Avoid a crash when core load gl resources.
- application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
- // Render and notify
- application.SendNotification();
- application.Render();
-
- // Create a tap event to touch the text field.
- application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
- application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 150.0f, 25.0f ) ) );
- // Render and notify
- application.SendNotification();
- application.Render();
-
-
- // Tap first to get the focus.
- application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 1.f, 25.0f ) ) );
- application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 1.f, 25.0f ) ) );
-
- // Render and notify
- application.SendNotification();
- application.Render();
-
- // Double tap to select a word.
- application.ProcessEvent( GenerateTap( Gesture::Possible, 2u, 1u, Vector2( 1.f, 25.0f ) ) );
- application.ProcessEvent( GenerateTap( Gesture::Started, 2u, 1u, Vector2( 1.f, 25.0f ) ) );
-
- // Render and notify
- application.SendNotification();
- application.Render();
-
- // drag grab handle right
- Vector2 pos(0.0f, 40.0f);
- SendPan(application, Gesture::Possible, pos);
- SendPan(application, Gesture::Started, pos);
- pos.x += 5.0f;
- Wait(application, 100);
-
- for(int i = 0;i<20;i++)
- {
- SendPan(application, Gesture::Continuing, pos);
- pos.x += 5.0f;
- Wait(application);
- }
-
- SendPan(application, Gesture::Finished, pos);
- Wait(application, RENDER_FRAME_INTERVAL);
-
- Actor offscreenRoot = field.GetChildAt( 1u );
- END_TEST;
-}