- // Update the input style.
- mImpl->mLogicalModel->RetrieveStyle( cursorIndex, mImpl->mEventData->mInputStyle );
-
- // Compare if the input style has changed.
- const bool hasInputStyleChanged = !currentInputStyle.Equal( mImpl->mEventData->mInputStyle );
-
- if( hasInputStyleChanged )
- {
- const InputStyle::Mask styleChangedMask = currentInputStyle.GetInputStyleChangeMask( mImpl->mEventData->mInputStyle );
- // Queue the input style changed signal.
- mImpl->mEventData->mInputStyleChangedQueue.PushBack( styleChangedMask );
- }
- }
-
- // Updates the text style runs by removing characters. Runs with no characters are removed.
- mImpl->mLogicalModel->UpdateTextStyleRuns( cursorIndex, -numberOfCharacters );
-
- // Remove the characters.
- Vector<Character>::Iterator first = currentText.Begin() + cursorIndex;
- Vector<Character>::Iterator last = first + numberOfCharacters;
-
- currentText.Erase( first, last );
-
- // Cursor position retreat
- oldCursorIndex = cursorIndex;
-
- mImpl->mEventData->mScrollAfterDelete = true;
-
- DALI_LOG_INFO( gLogFilter, Debug::General, "Controller::RemoveText %p removed %d\n", this, numberOfCharacters );
- removed = true;
- }
- }
-
- return removed;
-}
-
-void Controller::SetPlaceholderTextColor( const Vector4& textColor )
-{
- if( NULL != mImpl->mEventData )
- {
- mImpl->mEventData->mPlaceholderTextColor = textColor;
- }
-
- if( mImpl->IsShowingPlaceholderText() )
- {
- mImpl->mVisualModel->SetTextColor( textColor );
- mImpl->RequestRelayout();
- }
-}
-
-const Vector4& Controller::GetPlaceholderTextColor() const
-{
- if( NULL != mImpl->mEventData )
- {
- return mImpl->mEventData->mPlaceholderTextColor;
- }
-
- return Color::BLACK;
-}
-
-void Controller::SetShadowOffset( const Vector2& shadowOffset )
-{
- mImpl->mVisualModel->SetShadowOffset( shadowOffset );
-
- mImpl->RequestRelayout();
-}
-
-const Vector2& Controller::GetShadowOffset() const
-{
- return mImpl->mVisualModel->GetShadowOffset();
-}
-
-void Controller::SetShadowColor( const Vector4& shadowColor )
-{
- mImpl->mVisualModel->SetShadowColor( shadowColor );
-
- mImpl->RequestRelayout();
-}
-
-const Vector4& Controller::GetShadowColor() const
-{
- return mImpl->mVisualModel->GetShadowColor();
-}
-
-void Controller::SetDefaultShadowProperties( const std::string& shadowProperties )
-{
- if( NULL == mImpl->mShadowDefaults )
- {
- mImpl->mShadowDefaults = new ShadowDefaults();
- }
-
- mImpl->mShadowDefaults->properties = shadowProperties;
-}
-
-const std::string& Controller::GetDefaultShadowProperties() const
-{
- if( NULL != mImpl->mShadowDefaults )
- {
- return mImpl->mShadowDefaults->properties;
- }
-
- return EMPTY_STRING;
-}
-
-void Controller::SetUnderlineColor( const Vector4& color )
-{
- mImpl->mVisualModel->SetUnderlineColor( color );
-
- mImpl->RequestRelayout();
-}
-
-const Vector4& Controller::GetUnderlineColor() const
-{
- return mImpl->mVisualModel->GetUnderlineColor();
-}
-
-void Controller::SetUnderlineEnabled( bool enabled )
-{
- mImpl->mVisualModel->SetUnderlineEnabled( enabled );
-
- mImpl->RequestRelayout();
-}
-
-bool Controller::IsUnderlineEnabled() const
-{
- return mImpl->mVisualModel->IsUnderlineEnabled();
-}