return mImpl->mModel->mVerticalAlignment;
}
+bool Controller::IsIgnoreSpacesAfterText() const
+{
+ return mImpl->mModel->mIgnoreSpacesAfterText;
+}
+
+void Controller::SetIgnoreSpacesAfterText( bool ignore )
+{
+ mImpl->mModel->mIgnoreSpacesAfterText = ignore;
+}
+
+bool Controller::IsMatchSystemLanguageDirection() const
+{
+ return mImpl->mModel->mMatchSystemLanguageDirection;
+}
+
+void Controller::SetMatchSystemLanguageDirection( bool match )
+{
+ mImpl->mModel->mMatchSystemLanguageDirection = match;
+}
+
+void Controller::SetLayoutDirection( Dali::LayoutDirection::Type layoutDirection )
+{
+ mImpl->mLayoutDirection = layoutDirection;
+}
+
+
void Controller::SetLineWrapMode( Text::LineWrap::Mode lineWrapMode )
{
if( lineWrapMode != mImpl->mModel->mLineWrapMode )
// public : Relayout.
-Controller::UpdateTextType Controller::Relayout( const Size& size )
+Controller::UpdateTextType Controller::Relayout( const Size& size, Dali::LayoutDirection::Type layoutDirection )
{
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "-->Controller::Relayout %p size %f,%f, autoScroll[%s]\n", this, size.width, size.height, mImpl->mIsAutoScrollEnabled ?"true":"false" );
UpdateTextType updateTextType = NONE_UPDATED;
+ mImpl->mLayoutDirection = layoutDirection;
if( ( size.width < Math::MACHINE_EPSILON_1000 ) || ( size.height < Math::MACHINE_EPSILON_1000 ) )
{
if( 0u != mImpl->mModel->mVisualModel->mGlyphPositions.Count() )
const float outlineWidth = static_cast<float>( mImpl->mModel->GetOutlineWidth() );
// Set the layout parameters.
- const Vector2 sizeOffset = Vector2(outlineWidth * 2.0f, outlineWidth * 2.0f); // The outline should be fit into the bounding box
- Layout::Parameters layoutParameters( size - sizeOffset,
+ Layout::Parameters layoutParameters( size,
textBuffer,
lineBreakInfo.Begin(),
wordBreakInfo.Begin(),
totalNumberOfGlyphs,
mImpl->mModel->mHorizontalAlignment,
mImpl->mModel->mLineWrapMode,
- outlineWidth );
+ outlineWidth,
+ mImpl->mModel->mIgnoreSpacesAfterText,
+ mImpl->mModel->mMatchSystemLanguageDirection );
// Resize the vector of positions to have the same size than the vector of glyphs.
Vector<Vector2>& glyphPositions = mImpl->mModel->mVisualModel->mGlyphPositions;
requestedNumberOfCharacters,
mImpl->mModel->mHorizontalAlignment,
lines,
- mImpl->mModel->mAlignmentOffset );
+ mImpl->mModel->mAlignmentOffset,
+ mImpl->mLayoutDirection,
+ mImpl->mModel->mMatchSystemLanguageDirection );
viewUpdated = true;
}