Merge branch 'tizen' into devel/new_mesh
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / decorator / text-decorator.cpp
index e92866b..245e581 100644 (file)
@@ -24,7 +24,6 @@
 #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>
@@ -33,8 +32,6 @@
 #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>
@@ -238,6 +235,7 @@ struct Decorator::Impl : public ConnectionTracker
     // TODO - Remove this if nothing is active
     CreateActiveLayer();
 
+    /*
     // Show or hide the cursors
     CreateCursors();
     if( mPrimaryCursor )
@@ -277,7 +275,7 @@ struct Decorator::Impl : public ConnectionTracker
       }
       mSecondaryCursor.SetVisible( mSecondaryCursorVisible );
     }
-
+    */
     // Show or hide the grab handle
     HandleImpl& grabHandle = mHandle[GRAB_HANDLE];
     if( grabHandle.active )
@@ -336,7 +334,7 @@ struct Decorator::Impl : public ConnectionTracker
     {
       UnparentAndReset( primary.actor );
       UnparentAndReset( secondary.actor );
-      UnparentAndReset( mHighlightMeshActor );
+      //UnparentAndReset( mHighlightMeshActor );
     }
 
     if ( mActiveCopyPastePopup )
@@ -399,6 +397,7 @@ struct Decorator::Impl : public ConnectionTracker
   // Add or Remove cursor(s) from parent
   void CreateCursors()
   {
+    /*
     if( mActiveCursor == ACTIVE_CURSOR_NONE )
     {
       UnparentAndReset( mPrimaryCursor );
@@ -406,7 +405,7 @@ struct Decorator::Impl : public ConnectionTracker
     }
     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 )
       {
@@ -436,10 +435,12 @@ struct Decorator::Impl : public ConnectionTracker
         UnparentAndReset( mSecondaryCursor );
       }
     }
+    */
   }
 
   bool OnCursorBlinkTimerTick()
   {
+    /*
     // Cursor blinking
     if ( mPrimaryCursor )
     {
@@ -451,7 +452,7 @@ struct Decorator::Impl : public ConnectionTracker
     }
 
     mCursorBlinkStatus = !mCursorBlinkStatus;
-
+    */
     return true;
   }
 
@@ -608,6 +609,7 @@ struct Decorator::Impl : public ConnectionTracker
 
   void CreateHighlight()
   {
+    /*
     if ( !mHighlightMeshActor )
     {
       mHighlightMaterial = Material::New( "HighlightMaterial" );
@@ -628,6 +630,7 @@ struct Decorator::Impl : public ConnectionTracker
       Actor parent = mTextControlParent.Self();
       parent.Add( mHighlightMeshActor );
     }
+    */
   }
 
   void UpdateHighlight()
@@ -657,6 +660,7 @@ struct Decorator::Impl : public ConnectionTracker
     //  9*    *7
     //
 
+    /*
     if ( mHighlightMesh && mHighlightMaterial && !mHighlightQuadList.empty() )
     {
       MeshData::VertexContainer vertices;
@@ -720,6 +724,7 @@ struct Decorator::Impl : public ConnectionTracker
       mHighlightMeshData.SetData( vertices, faceIndices, bones, mHighlightMaterial );
       mHighlightMesh.UpdateMeshData( mHighlightMeshData );
     }
+    */
   }
 
   void OnTap( Actor actor, const TapGesture& tap )
@@ -846,12 +851,13 @@ struct Decorator::Impl : public ConnectionTracker
   {
     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 )
@@ -1010,16 +1016,16 @@ struct Decorator::Impl : public ConnectionTracker
   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];