ChangeState( EventData::EDITING );
}
-void Controller::Impl::PasteTextFromClipboard()
+void Controller::Impl::GetTextFromClipboard( unsigned int itemIndex, std::string& retreivedString )
{
- // Not supported
+ if ( mClipboard )
+ {
+ retreivedString = mClipboard.GetItem( itemIndex );
+ }
}
void Controller::Impl::RepositionSelectionHandles( CharacterIndex selectionStart, CharacterIndex selectionEnd )
void SendSelectionToClipboard( bool deleteAfterSending );
- void PasteTextFromClipboard();
+ void GetTextFromClipboard( unsigned int itemIndex, std::string& retreivedString );
void RepositionSelectionHandles( CharacterIndex selectionStart, CharacterIndex selectionEnd );
void RepositionSelectionHandles( float visualX, float visualY );
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "UTF8 size %d, UTF32 size %d\n", text.size(), utf32Characters.Count() );
}
- if( 0u != utf32Characters.Count() )
+ if( 0u != utf32Characters.Count() ) // Check if Utf8ToUtf32 conversion succeeded
{
// Handle the IMF (predicitive text) state changes
if( mImpl->mEventData )
}
case Toolkit::TextSelectionPopup::PASTE:
{
- mImpl->PasteTextFromClipboard();
+ std::string stringToPaste("");
+ mImpl->GetTextFromClipboard( 0, stringToPaste ); // Paste latest item from system clipboard
+ InsertText( stringToPaste, Text::Controller::CLIPBOARD );
+ mImpl->ChangeState( EventData::EDITING );
+ mImpl->RequestRelayout();
break;
}
case Toolkit::TextSelectionPopup::SELECT: