#include <dali/devel-api/rendering/renderer.h>
// INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/default-controls/solid-color-actor.h>
#include <dali-toolkit/public-api/controls/image-view/image-view.h>
#include <dali-toolkit/devel-api/controls/control-depth-index-ranges.h>
#include <dali-toolkit/internal/controls/image-view/image-view-impl.h>
mNotifyEndOfScroll( false )
{
mQuadVertexFormat[ "aPosition" ] = Property::VECTOR2;
- mQuadIndexFormat[ "indices" ] = Property::INTEGER;
- mHighlightMaterial = Material::New( Shader::New( VERTEX_SHADER, FRAGMENT_SHADER ) );
-
+ mHighlightShader = Shader::New( VERTEX_SHADER, FRAGMENT_SHADER );
SetupTouchEvents();
}
{
cursor = Control::New();
cursor.SetBackgroundColor( color );
- cursor.SetParentOrigin( ParentOrigin::TOP_LEFT ); // Need to set the default parent origin as CreateSolidColorActor() sets a different one.
+ cursor.SetParentOrigin( ParentOrigin::TOP_LEFT );
cursor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
}
if( !mHighlightQuadList.empty() )
{
Vector< Vector2 > vertices;
- Vector< unsigned int> indices;
+ Vector< unsigned short> indices;
Vector2 vertex;
std::vector<QuadCoordinates>::iterator iter = mHighlightQuadList.begin();
mQuadVertices = PropertyBuffer::New( mQuadVertexFormat );
}
- if( ! mQuadIndices )
- {
- mQuadIndices = PropertyBuffer::New( mQuadIndexFormat );
- }
-
mQuadVertices.SetData( &vertices[ 0 ], vertices.Size() );
- mQuadIndices.SetData( &indices[ 0 ], indices.Size() );
if( !mQuadGeometry )
{
mQuadGeometry = Geometry::New();
mQuadGeometry.AddVertexBuffer( mQuadVertices );
}
- mQuadGeometry.SetIndexBuffer( mQuadIndices );
+ mQuadGeometry.SetIndexBuffer( &indices[ 0 ], indices.Size() );
if( !mHighlightRenderer )
{
- mHighlightRenderer = Dali::Renderer::New( mQuadGeometry, mHighlightMaterial );
+ mHighlightRenderer = Dali::Renderer::New( mQuadGeometry, mHighlightShader );
mHighlightActor.AddRenderer( mHighlightRenderer );
}
}
Actor mHighlightActor; ///< Actor to display highlight
Renderer mHighlightRenderer;
- Material mHighlightMaterial; ///< Material used for highlight
+ Shader mHighlightShader; ///< Shader used for highlight
Property::Map mQuadVertexFormat;
- Property::Map mQuadIndexFormat;
PopupImpl mCopyPastePopup;
TextSelectionPopup::Buttons mEnabledPopupButtons; /// Bit mask of currently enabled Popup buttons
TextSelectionPopupCallbackInterface& mTextSelectionPopupCallbackInterface;
HandleImpl mHandle[HANDLE_TYPE_COUNT];
PropertyBuffer mQuadVertices;
- PropertyBuffer mQuadIndices;
Geometry mQuadGeometry;
QuadContainer mHighlightQuadList; ///< Sub-selections that combine to create the complete selection highlight