X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-controller.cpp;h=d78f275ed855b2167312cec91bbd76a3b2b6868a;hb=646440beeb663fc5efcccadeba73dd46016ed1b3;hp=a863317932719ae4edada96d398432dc6dc5082f;hpb=93ad73e0e2c46aca4c191a1e2f075061e167e8b5;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/text-controller.cpp b/dali-toolkit/internal/text/text-controller.cpp index a863317..d78f275 100644 --- a/dali-toolkit/internal/text/text-controller.cpp +++ b/dali-toolkit/internal/text/text-controller.cpp @@ -19,6 +19,8 @@ #include // EXTERNAL INCLUDES +#include +#include #include #include #include @@ -382,14 +384,19 @@ void Controller::SetIgnoreSpacesAfterText(bool ignore) mImpl->mModel->mIgnoreSpacesAfterText = ignore; } -bool Controller::IsMatchSystemLanguageDirection() const +void Controller::ChangedLayoutDirection() { - return mImpl->mModel->mMatchSystemLanguageDirection; + mImpl->mIsLayoutDirectionChanged = true; } -void Controller::SetMatchSystemLanguageDirection(bool match) +void Controller::SetMatchLayoutDirection(DevelText::MatchLayoutDirection type) { - mImpl->mModel->mMatchSystemLanguageDirection = match; + mImpl->mModel->mMatchLayoutDirection = type; +} + +DevelText::MatchLayoutDirection Controller::GetMatchLayoutDirection() const +{ + return mImpl->mModel->mMatchLayoutDirection; } void Controller::SetLayoutDirection(Dali::LayoutDirection::Type layoutDirection) @@ -397,6 +404,19 @@ void Controller::SetLayoutDirection(Dali::LayoutDirection::Type layoutDirection) mImpl->mLayoutDirection = layoutDirection; } +Dali::LayoutDirection::Type Controller::GetLayoutDirection(Dali::Actor& actor) const +{ + if(mImpl->mModel->mMatchLayoutDirection == DevelText::MatchLayoutDirection::LOCALE || + (mImpl->mModel->mMatchLayoutDirection == DevelText::MatchLayoutDirection::INHERIT && !mImpl->mIsLayoutDirectionChanged)) + { + return static_cast(DevelWindow::Get(actor).GetRootLayer().GetProperty(Dali::Actor::Property::LAYOUT_DIRECTION).Get()); + } + else + { + return static_cast(actor.GetProperty(Dali::Actor::Property::LAYOUT_DIRECTION).Get()); + } +} + bool Controller::IsShowingRealText() const { return mImpl->IsShowingRealText(); @@ -1618,6 +1638,23 @@ void Controller::GetHiddenInputOption(Property::Map& options) } } +void Controller::SetInputFilterOption(const Property::Map& options) +{ + if(!mImpl->mInputFilter) + { + mImpl->mInputFilter = std::unique_ptr(new InputFilter()); + } + mImpl->mInputFilter->SetProperties(options); +} + +void Controller::GetInputFilterOption(Property::Map& options) +{ + if(NULL != mImpl->mInputFilter) + { + mImpl->mInputFilter->GetProperties(options); + } +} + void Controller::SetPlaceholderProperty(const Property::Map& map) { PlaceholderHandler::SetPlaceholderProperty(*this, map);