mImpl->SetAutoScrollEnabled(enable);
}
+void Controller::SetAutoScrollMaxTextureExceeded(bool exceed)
+{
+ mImpl->mIsAutoScrollMaxTextureExceeded = exceed;
+}
+
bool Controller::IsAutoScrollEnabled() const
{
DALI_LOG_INFO(gLogFilter, Debug::Verbose, "Controller::IsAutoScrollEnabled[%s]\n", mImpl->mIsAutoScrollEnabled ? "true" : "false");
return mImpl->mTextColor;
}
+void Controller::SetDisabledColorOpacity(float opacity)
+{
+ mImpl->mDisabledColorOpacity = opacity;
+}
+
+float Controller::GetDisabledColorOpacity() const
+{
+ return mImpl->mDisabledColorOpacity;
+}
+
+void Controller::SetUserInteractionEnabled(bool enabled)
+{
+ mImpl->SetUserInteractionEnabled(enabled);
+}
+
+bool Controller::IsUserInteractionEnabled() const
+{
+ return mImpl->mIsUserInteractionEnabled;
+}
+
void Controller::SetPlaceholderTextColor(const Vector4& textColor)
{
PlaceholderHandler::SetPlaceholderTextColor(*this, textColor);
return mImpl->mLayoutEngine.GetDefaultLineSize();
}
+bool Controller::SetRelativeLineSize(float relativeLineSize)
+{
+ return mImpl->SetRelativeLineSize(relativeLineSize);
+}
+
+float Controller::GetRelativeLineSize() const
+{
+ return mImpl->GetRelativeLineSize();
+}
+
void Controller::SetInputColor(const Vector4& color)
{
InputProperties::SetInputColor(*this, color);
mImpl->mModel->mVisualModel->SetEllipsisPosition(ellipsisPosition);
}
+void Controller::SetCharacterSpacing(float characterSpacing)
+{
+ mImpl->mModel->mVisualModel->SetCharacterSpacing(characterSpacing);
+
+ mImpl->RelayoutAllCharacters();
+ mImpl->RequestRelayout();
+}
+
+const float Controller::GetCharacterSpacing() const
+{
+ return mImpl->mModel->mVisualModel->GetCharacterSpacing();
+}
+
Controller::UpdateTextType Controller::Relayout(const Size& size, Dali::LayoutDirection::Type layoutDirection)
{
return Relayouter::Relayout(*this, size, layoutDirection);
return positionsList;
}
+Rect<> Controller::GetTextBoundingRectangle(CharacterIndex startIndex, CharacterIndex endIndex)
+{
+ Vector<Vector2> sizeList;
+ Vector<Vector2> positionList;
+
+ GetTextGeometry(mImpl->mModel, startIndex, endIndex, sizeList, positionList);
+
+ if(sizeList.Empty() || sizeList.Size() != positionList.Size())
+ {
+ return {0, 0, 0, 0};
+ }
+
+ auto minX = positionList[0].x;
+ auto minY = positionList[0].y;
+ auto maxRight = positionList[0].x + sizeList[0].x;
+ auto maxBottom = positionList[0].y + sizeList[0].y;
+
+ for(unsigned int i = 1; i < sizeList.Size(); i++)
+ {
+ minX = std::min(minX, positionList[i].x);
+ minY = std::min(minY, positionList[i].y);
+ maxRight = std::max(maxRight, positionList[i].x + sizeList[i].x);
+ maxBottom = std::max(maxBottom, positionList[i].y + sizeList[i].y);
+ }
+
+ return {minX, minY, maxRight - minX, maxBottom - minY};
+}
+
bool Controller::IsInputStyleChangedSignalsQueueEmpty()
{
return mImpl->IsInputStyleChangedSignalsQueueEmpty();
targetSize = mImpl->mModel->mVisualModel->mControlSize;
}
-void Controller::AddDecoration(Actor& actor, bool needsClipping)
+void Controller::AddDecoration(Actor& actor, DecorationType type, bool needsClipping)
{
if(mImpl->mEditableControlInterface)
{
- mImpl->mEditableControlInterface->AddDecoration(actor, needsClipping);
+ mImpl->mEditableControlInterface->AddDecoration(actor, type, needsClipping);
}
}
mImpl->ScrollBy(scroll);
}
+bool Controller::IsScrollable(const Vector2& displacement)
+{
+ return mImpl->IsScrollable(displacement);
+}
+
float Controller::GetHorizontalScrollPosition()
{
return mImpl->GetHorizontalScrollPosition();
Actor Controller::CreateBackgroundActor()
{
- return CreateControllerBackgroundActor(mImpl->mView, mImpl->mModel->mVisualModel, mImpl->mShaderBackground);
+ return CreateControllerBackgroundActor(mImpl->mView, mImpl->mModel->mVisualModel, mImpl->mModel->mLogicalModel, mImpl->mShaderBackground);
}
void Controller::GetAnchorActors(std::vector<Toolkit::TextAnchor>& anchorActors)