TextInput - Fixes the selection box for right to left text.
[platform/core/uifw/dali-toolkit.git] / base / dali-toolkit / internal / controls / text-view / text-view-processor-dbg.cpp
index cee71ac..713c681 100644 (file)
@@ -19,7 +19,7 @@
 #include <dali-toolkit/internal/controls/text-view/text-view-processor-dbg.h>
 
 // INTERNAL INCLUDES
-#include <dali/public-api/actors/text-actor.h>
+#include <dali-toolkit/internal/controls/text-view/text-view-processor-types.h>
 
 namespace Dali
 {
@@ -39,30 +39,9 @@ Debug::Filter* gTextViewProcessorLogFilter = Debug::Filter::New(Debug::NoLogging
 
 void dbgPrint( const WordLayoutInfo& word )
 {
-  for( CharacterLayoutInfoContainer::const_iterator characterIt = word.mCharactersLayoutInfo.begin(), endCharacterIt = word.mCharactersLayoutInfo.end();
-       characterIt != endCharacterIt;
-       ++characterIt )
-  {
-    const CharacterLayoutInfo& character( *characterIt );
-
-    std::cout << "[" << character.mSize << std::endl;
-    std::cout << " ascender " << character.mAscender << std::endl;
-
-    TextActor textActor = TextActor::DownCast( character.mGlyphActor );
-    if( textActor )
-    {
-      std::cout << "[" << textActor.GetText() << "]";
-    }
-    else
-    {
-      std::cout << "[ImageActor]" << std::endl;
-    }
-    std::cout << "{" << character.mStyledText.mText.GetText() << "}";
-  }
-  std::cout << "     size " << word.mSize << std::endl;
-  std::cout << " ascender " << word.mAscender << std::endl;
-  std::cout << " num char " << word.mCharactersLayoutInfo.size() << std::endl;
-  std::cout << "     type ";
+  std::cout << "       size " << word.mSize << std::endl;
+  std::cout << "   ascender " << word.mAscender << std::endl;
+  std::cout << "       type ";
   switch( word.mType )
   {
     case NoSeparator:
@@ -70,9 +49,9 @@ void dbgPrint( const WordLayoutInfo& word )
       std::cout << "NoSeparator" << std::endl;
       break;
     }
-    case LineSeparator:
+    case ParagraphSeparator:
     {
-      std::cout << "LineSeparator" << std::endl;
+      std::cout << "ParagraphSeparator" << std::endl;
       break;
     }
     case WordSeparator:
@@ -81,13 +60,26 @@ void dbgPrint( const WordLayoutInfo& word )
       break;
     }
   }
+  std::cout << " first char " << word.mFirstCharacter << std::endl;
+  std::cout << "   num char " << word.mCharactersLayoutInfo.size() << std::endl;
+  for( CharacterLayoutInfoContainer::const_iterator characterIt = word.mCharactersLayoutInfo.begin(), endCharacterIt = word.mCharactersLayoutInfo.end();
+       characterIt != endCharacterIt;
+       ++characterIt )
+  {
+    const CharacterLayoutInfo& character( *characterIt );
+
+    std::cout << "[" << character.mSize << std::endl;
+    std::cout << " ascender " << character.mAscender << std::endl;
+  }
 }
 
-void dbgPrint( const LineLayoutInfo& line )
+void dbgPrint( const ParagraphLayoutInfo& paragraph )
 {
   std::cout << "< ";
-  std::cout << line.mSize;
-  for( WordLayoutInfoContainer::const_iterator wordIt = line.mWordsLayoutInfo.begin(), endWordIt = line.mWordsLayoutInfo.end();
+  std::cout << "  text : [" << paragraph.mText.GetText() << "]" << std::endl;
+  std::cout << "  number of styles : " << paragraph.mTextStyles.Count() << std::endl;
+  std::cout << paragraph.mSize;
+  for( WordLayoutInfoContainer::const_iterator wordIt = paragraph.mWordsLayoutInfo.begin(), endWordIt = paragraph.mWordsLayoutInfo.end();
        wordIt != endWordIt;
        ++wordIt )
   {
@@ -101,7 +93,8 @@ void dbgPrint( const TextLayoutInfo& textInfo )
 {
   std::cout << "||" << std::endl;
   std::cout << textInfo.mWholeTextSize;
-  for( LineLayoutInfoContainer::const_iterator it = textInfo.mLinesLayoutInfo.begin(), endIt = textInfo.mLinesLayoutInfo.end();
+  std::cout << textInfo.mNumberOfCharacters;
+  for( ParagraphLayoutInfoContainer::const_iterator it = textInfo.mParagraphsLayoutInfo.begin(), endIt = textInfo.mParagraphsLayoutInfo.end();
        it != endIt;
        ++it )
   {
@@ -153,9 +146,10 @@ void dbgPrint( const TextStyle& style )
 
 void dbgPrint( const TextInfoIndices& indices )
 {
-  std::cout << "   line : " << indices.mLineIndex << std::endl;
-  std::cout << "   word : " << indices.mWordIndex << std::endl;
-  std::cout << "   char : " << indices.mCharacterIndex << std::endl;
+  std::cout << "          paragraph : " << indices.mParagraphIndex << std::endl;
+  std::cout << "               word : " << indices.mWordIndex << std::endl;
+  std::cout << "               char : " << indices.mCharacterIndex << std::endl;
+  std::cout << "  char in paragraph : " << indices.mCharacterParagraphIndex << std::endl;
 }
 
 void dbgPrint( const MarkupProcessor::StyledTextArray& textArray )
@@ -168,18 +162,6 @@ void dbgPrint( const MarkupProcessor::StyledTextArray& textArray )
   }
 }
 
-void dbgPrintText( const WordLayoutInfo& word )
-{
-  for( CharacterLayoutInfoContainer::const_iterator characterIt = word.mCharactersLayoutInfo.begin(), endCharacterIt = word.mCharactersLayoutInfo.end();
-       characterIt != endCharacterIt;
-       ++characterIt )
-  {
-    const CharacterLayoutInfo& character( *characterIt );
-
-    std::cout << character.mStyledText.mText.GetText();
-  }
-}
-
 } // namespace TextViewProcessor
 
 } // namespace Internal