const char* const PROPERTY_NAME_LINE_COUNT = "lineCount";
const char* const PROPERTY_NAME_PLACEHOLDER_TEXT = "placeholderText";
const char* const PROPERTY_NAME_PLACEHOLDER_TEXT_COLOR = "placeholderTextColor";
+const char* const PROPERTY_NAME_ENABLE_SELECTION = "enableSelection";
const int DEFAULT_RENDERING_BACKEND = Dali::Toolkit::Text::DEFAULT_RENDERING_BACKEND;
DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_LINE_COUNT) == DevelTextEditor::Property::LINE_COUNT );
DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_PLACEHOLDER_TEXT ) == DevelTextEditor::Property::PLACEHOLDER_TEXT );
DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_PLACEHOLDER_TEXT_COLOR ) == DevelTextEditor::Property::PLACEHOLDER_TEXT_COLOR );
+ DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_ENABLE_SELECTION ) == DevelTextEditor::Property::ENABLE_SELECTION );
END_TEST;
}
editor.SetProperty( DevelTextEditor::Property::PLACEHOLDER_TEXT_COLOR, Color::RED );
DALI_TEST_EQUALS( editor.GetProperty<Vector4>( DevelTextEditor::Property::PLACEHOLDER_TEXT_COLOR ), Color::RED, TEST_LOCATION );
+ editor.SetProperty( DevelTextEditor::Property::ENABLE_SELECTION, false );
+ DALI_TEST_EQUALS( editor.GetProperty<bool>( DevelTextEditor::Property::ENABLE_SELECTION ), false, TEST_LOCATION );
+
END_TEST;
}
// The stencil actor should have two actors: the renderer and the highlight actor.
Actor stencil = editor.GetChildAt( 0u );
+ // Highlight needs to be drawn before text, so should come first in child order
+ Renderer highlight = stencil.GetChildAt( 0u ).GetRendererAt( 0u );
+ DALI_TEST_CHECK( highlight );
+
// The stencil actor has a container with all the actors which contain the text renderers.
- Actor container = stencil.GetChildAt( 0u );
+ Actor container = stencil.GetChildAt( 1u );
for( unsigned int index = 0; index < container.GetChildCount(); ++index )
{
Renderer renderer = container.GetChildAt( index ).GetRendererAt( 0u );
DALI_TEST_CHECK( renderer );
}
- Renderer highlight = stencil.GetChildAt( 1u ).GetRendererAt( 0u );
- DALI_TEST_CHECK( highlight );
-
// Double tap out of bounds
application.ProcessEvent( GenerateTap( Gesture::Possible, 2u, 1u, Vector2( 29.f, 25.0f ) ) );
application.ProcessEvent( GenerateTap( Gesture::Started, 2u, 1u, Vector2( 29.f, 25.0f ) ) );