X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-model.cpp;h=948044e63167083dc3262bc0ee0b954bfe9344ff;hb=113173c25ee8ebe85dbe6c27587ed8d618d38ecd;hp=c1767d8f5f467c6150779fb95b4c727d36fd2b62;hpb=99793f1e33400c0ea9421015e789d8924c7a2a6b;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/text-model.cpp b/dali-toolkit/internal/text/text-model.cpp old mode 100755 new mode 100644 index c1767d8..948044e --- a/dali-toolkit/internal/text/text-model.cpp +++ b/dali-toolkit/internal/text/text-model.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,16 +20,13 @@ namespace Dali { - namespace Toolkit { - namespace Text { - ModelPtr Model::New() { - return ModelPtr( new Model() ); + return ModelPtr(new Model()); } const Size& Model::GetControlSize() const @@ -162,9 +159,9 @@ Length Model::GetNumberOfUnderlineRuns() const return mVisualModel->GetNumberOfUnderlineRuns(); } -void Model::GetUnderlineRuns( GlyphRun* underlineRuns, UnderlineRunIndex index, Length numberOfRuns ) const +void Model::GetUnderlineRuns(GlyphRun* underlineRuns, UnderlineRunIndex index, Length numberOfRuns) const { - mVisualModel->GetUnderlineRuns( underlineRuns, index, numberOfRuns ); + mVisualModel->GetUnderlineRuns(underlineRuns, index, numberOfRuns); } const Vector4& Model::GetOutlineColor() const @@ -187,22 +184,42 @@ bool Model::IsBackgroundEnabled() const return mVisualModel->IsBackgroundEnabled(); } +bool Model::IsMarkupProcessorEnabled() const +{ + return mVisualModel->IsMarkupProcessorEnabled(); +} + +const GlyphInfo* Model::GetHyphens() const +{ + return mVisualModel->mHyphen.glyph.Begin(); +} + +const Length* Model::GetHyphenIndices() const +{ + return mVisualModel->mHyphen.index.Begin(); +} + +Length Model::GetHyphensCount() const +{ + return mVisualModel->mHyphen.glyph.Size(); +} + Model::Model() : mLogicalModel(), mVisualModel(), mScrollPosition(), mScrollPositionLast(), - mHorizontalAlignment( Text::HorizontalAlignment::BEGIN ), - mVerticalAlignment( Text::VerticalAlignment::TOP ), - mVerticalLineAlignment( DevelText::VerticalLineAlignment::TOP ), - mLineWrapMode( Text::LineWrap::WORD ), - mAlignmentOffset( 0.0f ), - mElideEnabled( false ), - mIgnoreSpacesAfterText( true ), - mMatchSystemLanguageDirection( false ) + mHorizontalAlignment(Text::HorizontalAlignment::BEGIN), + mVerticalAlignment(Text::VerticalAlignment::TOP), + mVerticalLineAlignment(DevelText::VerticalLineAlignment::TOP), + mLineWrapMode(Text::LineWrap::WORD), + mAlignmentOffset(0.0f), + mElideEnabled(false), + mIgnoreSpacesAfterText(true), + mMatchSystemLanguageDirection(false) { mLogicalModel = LogicalModel::New(); - mVisualModel = VisualModel::New(); + mVisualModel = VisualModel::New(); } Model::~Model()