+ textModel = Model::New(); ///< Pointer to the text's model.
+ LogicalModelPtr logicalModel = textModel->mLogicalModel;
+ VisualModelPtr visualModel = textModel->mVisualModel;
+
+ MarkupProcessData markupProcessData( logicalModel->mColorRuns,
+ logicalModel->mFontDescriptionRuns,
+ logicalModel->mEmbeddedItems,
+ logicalModel->mAnchors,
+ logicalModel->mUnderlinedCharacterRuns,
+ logicalModel->mBackgroundColorRuns);
+
+ Length textSize = 0u;
+ const uint8_t* utf8 = NULL;
+ if( markupProcessorEnabled )
+ {
+ ProcessMarkupString( text, markupProcessData );
+ textSize = markupProcessData.markupProcessedText.size();
+
+ // This is a bit horrible but std::string returns a (signed) char*
+ utf8 = reinterpret_cast<const uint8_t*>( markupProcessData.markupProcessedText.c_str() );
+ }
+ else
+ {
+ textSize = text.size();
+
+ // This is a bit horrible but std::string returns a (signed) char*
+ utf8 = reinterpret_cast<const uint8_t*>( text.c_str() );
+ }
+
+ //Ellipsis
+ textModel-> mElideEnabled = ellipsisEnabled;
+ textModel-> mVisualModel->SetTextElideEnabled(ellipsisEnabled);
+ textModel-> mEllipsisPosition = ellipsisPosition;
+ textModel-> mVisualModel->SetEllipsisPosition(ellipsisPosition);