mEventData->mAllTextSelected = ( startOfSelection == 0 ) && ( endOfSelection == mLogicalModel->mText.Count() );
}
-void Controller::Impl::ClampHorizontalScroll( const Vector2& actualSize )
+void Controller::Impl::ClampHorizontalScroll( const Vector2& layoutSize )
{
// Clamp between -space & 0.
- if( actualSize.width > mVisualModel->mControlSize.width )
+ if( layoutSize.width > mVisualModel->mControlSize.width )
{
- const float space = ( actualSize.width - mVisualModel->mControlSize.width );
+ const float space = ( layoutSize.width - mVisualModel->mControlSize.width );
mScrollPosition.x = ( mScrollPosition.x < -space ) ? -space : mScrollPosition.x;
mScrollPosition.x = ( mScrollPosition.x > 0.f ) ? 0.f : mScrollPosition.x;
}
}
-void Controller::Impl::ClampVerticalScroll( const Vector2& actualSize )
+void Controller::Impl::ClampVerticalScroll( const Vector2& layoutSize )
{
// Clamp between -space & 0.
- if( actualSize.height > mVisualModel->mControlSize.height )
+ if( layoutSize.height > mVisualModel->mControlSize.height )
{
- const float space = ( actualSize.height - mVisualModel->mControlSize.height );
+ const float space = ( layoutSize.height - mVisualModel->mControlSize.height );
mScrollPosition.y = ( mScrollPosition.y < -space ) ? -space : mScrollPosition.y;
mScrollPosition.y = ( mScrollPosition.y > 0.f ) ? 0.f : mScrollPosition.y;
/**
* @biref Clamps the horizontal scrolling to get the control always filled with text.
*
- * @param[in] actualSize The size of the laid out text.
+ * @param[in] layoutSize The size of the laid out text.
*/
- void ClampHorizontalScroll( const Vector2& actualSize );
+ void ClampHorizontalScroll( const Vector2& layoutSize );
/**
* @biref Clamps the vertical scrolling to get the control always filled with text.
*
- * @param[in] actualSize The size of the laid out text.
+ * @param[in] layoutSize The size of the laid out text.
*/
- void ClampVerticalScroll( const Vector2& actualSize );
+ void ClampVerticalScroll( const Vector2& layoutSize );
/**
* @brief Scrolls the text to make a position visible.
mImpl->mOperationsPending = static_cast<OperationsMask>( mImpl->mOperationsPending |
LAYOUT |
ALIGN |
- UPDATE_ACTUAL_SIZE |
+ UPDATE_LAYOUT_SIZE |
UPDATE_DIRECTION |
REORDER );
mImpl->mOperationsPending = static_cast<OperationsMask>( mImpl->mOperationsPending |
LAYOUT |
ALIGN |
- UPDATE_ACTUAL_SIZE |
+ UPDATE_LAYOUT_SIZE |
REORDER );
}
SHAPE_TEXT |
GET_GLYPH_METRICS |
LAYOUT |
- UPDATE_ACTUAL_SIZE |
+ UPDATE_LAYOUT_SIZE |
REORDER |
ALIGN );
mImpl->mRecalculateNaturalSize = true;
SHAPE_TEXT |
GET_GLYPH_METRICS |
LAYOUT |
- UPDATE_ACTUAL_SIZE |
+ UPDATE_LAYOUT_SIZE |
REORDER |
ALIGN );
mImpl->mRecalculateNaturalSize = true;
SHAPE_TEXT |
GET_GLYPH_METRICS |
LAYOUT |
- UPDATE_ACTUAL_SIZE |
+ UPDATE_LAYOUT_SIZE |
REORDER |
ALIGN );
mImpl->mRecalculateNaturalSize = true;
SHAPE_TEXT |
GET_GLYPH_METRICS |
LAYOUT |
- UPDATE_ACTUAL_SIZE |
+ UPDATE_LAYOUT_SIZE |
REORDER |
ALIGN );
mImpl->mRecalculateNaturalSize = true;
SHAPE_TEXT |
GET_GLYPH_METRICS |
LAYOUT |
- UPDATE_ACTUAL_SIZE |
+ UPDATE_LAYOUT_SIZE |
REORDER |
ALIGN );
mImpl->mRecalculateNaturalSize = true;
mImpl->mOperationsPending = static_cast<OperationsMask>( mImpl->mOperationsPending |
LAYOUT |
ALIGN |
- UPDATE_ACTUAL_SIZE |
+ UPDATE_LAYOUT_SIZE |
REORDER );
// Set the update info to relayout the whole text.
mImpl->mTextUpdateInfo.mFullRelayoutNeeded = true;
const CharacterIndex startIndex = mImpl->mTextUpdateInfo.mParagraphCharacterIndex;
const Length requestedNumberOfCharacters = mImpl->mTextUpdateInfo.mRequestedNumberOfCharacters;
+ // Get the current layout size.
+ layoutSize = mImpl->mVisualModel->GetLayoutSize();
+
if( NO_OPERATION != ( LAYOUT & operations ) )
{
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "-->Controller::DoRelayout LAYOUT & operations\n");
if( 0u == totalNumberOfGlyphs )
{
- if( NO_OPERATION != ( UPDATE_ACTUAL_SIZE & operations ) )
+ if( NO_OPERATION != ( UPDATE_LAYOUT_SIZE & operations ) )
{
mImpl->mVisualModel->SetLayoutSize( Size::ZERO );
}
layoutParameters.estimatedNumberOfLines = mImpl->mTextUpdateInfo.mEstimatedNumberOfLines;
// Update the visual model.
+ Size newLayoutSize;
viewUpdated = mImpl->mLayoutEngine.LayoutText( layoutParameters,
glyphPositions,
mImpl->mVisualModel->mLines,
- layoutSize );
+ newLayoutSize );
+ viewUpdated = viewUpdated || ( newLayoutSize != layoutSize );
if( viewUpdated )
{
+ layoutSize = newLayoutSize;
+
if ( NO_OPERATION != ( UPDATE_DIRECTION & operations ) )
{
mImpl->mAutoScrollDirectionRTL = false;
}
} // REORDER
- // Sets the actual size.
- if( NO_OPERATION != ( UPDATE_ACTUAL_SIZE & operations ) )
+ // Sets the layout size.
+ if( NO_OPERATION != ( UPDATE_LAYOUT_SIZE & operations ) )
{
mImpl->mVisualModel->SetLayoutSize( layoutSize );
}
// Store the size used to layout the text.
mImpl->mVisualModel->mControlSize = size;
}
- else
- {
- layoutSize = mImpl->mVisualModel->GetLayoutSize();
- }
if( NO_OPERATION != ( ALIGN & operations ) )
{
// Set the flags to redo the layout operations
const OperationsMask layoutOperations = static_cast<OperationsMask>( LAYOUT |
- UPDATE_ACTUAL_SIZE |
+ UPDATE_LAYOUT_SIZE |
ALIGN |
REORDER );
SHAPE_TEXT |
GET_GLYPH_METRICS |
LAYOUT |
- UPDATE_ACTUAL_SIZE |
+ UPDATE_LAYOUT_SIZE |
REORDER |
ALIGN );
}