#include <dali/public-api/adaptor-framework/timer.h>
#include <dali/public-api/actors/image-actor.h>
#include <dali/public-api/actors/layer.h>
-#include <dali/devel-api/actors/mesh-actor.h>
#include <dali/public-api/animation/constraint.h>
#include <dali/public-api/common/constants.h>
#include <dali/public-api/common/stage.h>
#include <dali/public-api/events/touch-event.h>
#include <dali/public-api/events/pan-gesture.h>
#include <dali/public-api/events/pan-gesture-detector.h>
-#include <dali/devel-api/geometry/mesh.h>
-#include <dali/devel-api/geometry/mesh-data.h>
#include <dali/public-api/images/resource-image.h>
#include <dali/public-api/math/rect.h>
#include <dali/public-api/math/vector2.h>
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control.h>
+#include <dali-toolkit/public-api/controls/control-depth-index-ranges.h>
#include <dali-toolkit/public-api/controls/control-impl.h>
#include <dali-toolkit/public-api/controls/buttons/push-button.h>
#include <dali-toolkit/public-api/controls/default-controls/solid-color-actor.h>
// TODO - Remove this if nothing is active
CreateActiveLayer();
+ /*
// Show or hide the cursors
CreateCursors();
if( mPrimaryCursor )
}
mSecondaryCursor.SetVisible( mSecondaryCursorVisible );
}
-
+ */
// Show or hide the grab handle
HandleImpl& grabHandle = mHandle[GRAB_HANDLE];
if( grabHandle.active )
{
UnparentAndReset( primary.actor );
UnparentAndReset( secondary.actor );
- UnparentAndReset( mHighlightMeshActor );
+ //UnparentAndReset( mHighlightMeshActor );
}
if ( mActiveCopyPastePopup )
void CreateCursor( ImageActor& cursor, const Vector4& color )
{
cursor = CreateSolidColorActor( color );
+ cursor.SetDepthIndex( DECORATION_DEPTH_INDEX );
cursor.SetParentOrigin( ParentOrigin::TOP_LEFT ); // Need to set the default parent origin as CreateSolidColorActor() sets a different one.
cursor.SetAnchorPoint( AnchorPoint::TOP_CENTER );
}
// Add or Remove cursor(s) from parent
void CreateCursors()
{
+ /*
if( mActiveCursor == ACTIVE_CURSOR_NONE )
{
UnparentAndReset( mPrimaryCursor );
}
else
{
- /* Create Primary and or Secondary Cursor(s) if active and add to parent */
+ // Create Primary and or Secondary Cursor(s) if active and add to parent
if ( mActiveCursor == ACTIVE_CURSOR_PRIMARY ||
mActiveCursor == ACTIVE_CURSOR_BOTH )
{
UnparentAndReset( mSecondaryCursor );
}
}
+ */
}
bool OnCursorBlinkTimerTick()
{
+ /*
// Cursor blinking
if ( mPrimaryCursor )
{
}
mCursorBlinkStatus = !mCursorBlinkStatus;
-
+ */
return true;
}
}
grabHandle.actor = ImageActor::New( mHandleImages[GRAB_HANDLE][HANDLE_IMAGE_RELEASED] );
+ grabHandle.actor.SetDepthIndex( DECORATION_DEPTH_INDEX );
grabHandle.actor.SetAnchorPoint( AnchorPoint::TOP_CENTER );
- grabHandle.actor.SetDrawMode( DrawMode::OVERLAY );
// Area that Grab handle responds to, larger than actual handle so easier to move
#ifdef DECORATOR_DEBUG
grabHandle.actor.SetName( "GrabHandleActor" );
primary.actor.SetName("SelectionHandleOne");
#endif
primary.actor.SetAnchorPoint( AnchorPoint::TOP_RIGHT ); // Change to BOTTOM_RIGHT if Look'n'Feel requires handle above text.
- primary.actor.SetDrawMode( DrawMode::OVERLAY ); // ensure grab handle above text
+ primary.actor.SetDepthIndex( DECORATION_DEPTH_INDEX );
primary.flipped = false;
primary.grabArea = Actor::New(); // Area that Grab handle responds to, larger than actual handle so easier to move
secondary.actor.SetName("SelectionHandleTwo");
#endif
secondary.actor.SetAnchorPoint( AnchorPoint::TOP_LEFT ); // Change to BOTTOM_LEFT if Look'n'Feel requires handle above text.
- secondary.actor.SetDrawMode( DrawMode::OVERLAY ); // ensure grab handle above text
+ secondary.actor.SetDepthIndex( DECORATION_DEPTH_INDEX );
secondary.flipped = false;
secondary.grabArea = Actor::New(); // Area that Grab handle responds to, larger than actual handle so easier to move
void CreateHighlight()
{
+ /*
if ( !mHighlightMeshActor )
{
mHighlightMaterial = Material::New( "HighlightMaterial" );
Actor parent = mTextControlParent.Self();
parent.Add( mHighlightMeshActor );
}
+ */
}
void UpdateHighlight()
// 9* *7
//
+ /*
if ( mHighlightMesh && mHighlightMaterial && !mHighlightQuadList.empty() )
{
MeshData::VertexContainer vertices;
mHighlightMeshData.SetData( vertices, faceIndices, bones, mHighlightMaterial );
mHighlightMesh.UpdateMeshData( mHighlightMeshData );
}
+ */
}
void OnTap( Actor actor, const TapGesture& tap )
{
float alternativePosition=0.0f;;
+ /*
if ( mPrimaryCursor ) // Secondary cursor not used for paste
{
Cursor cursor = PRIMARY_CURSOR;
alternativePosition = mCursor[cursor].position.y;
}
-
+ */
const float popupHeight = 120.0f; // todo Set as a MaxSize Property in Control or retrieve from CopyPastePopup class.
if( mHandle[GRAB_HANDLE].active )
Timer mScrollTimer; ///< Timer used to scroll the text when the grab handle is moved close to the edges.
Layer mActiveLayer; ///< Layer for active handles and alike that ensures they are above all else.
- ImageActor mPrimaryCursor;
- ImageActor mSecondaryCursor;
- MeshActor mHighlightMeshActor; ///< Mesh Actor to display highlight
+ //ImageActor mPrimaryCursor;
+ //ImageActor mSecondaryCursor;
+ //MeshActor mHighlightMeshActor; ///< Mesh Actor to display highlight
TextSelectionPopup mCopyPastePopup;
Image mHandleImages[HANDLE_TYPE_COUNT][HANDLE_IMAGE_TYPE_COUNT];
Image mCursorImage;
- Mesh mHighlightMesh; ///< Mesh for highlight
- MeshData mHighlightMeshData; ///< Mesh Data for highlight
- Material mHighlightMaterial; ///< Material used for highlight
+ //Mesh mHighlightMesh; ///< Mesh for highlight
+ //MeshData mHighlightMeshData; ///< Mesh Data for highlight
+ //Material mHighlightMaterial; ///< Material used for highlight
CursorImpl mCursor[CURSOR_COUNT];
HandleImpl mHandle[HANDLE_TYPE_COUNT];