Text selection refactoring
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / text-controller.cpp
index ca02bac..797ae32 100755 (executable)
@@ -3214,6 +3214,26 @@ Uint32Pair Controller::GetTextSelectionRange() const
   return mImpl->GetTextSelectionRange();
 }
 
+void Controller::SelectWholeText()
+{
+  SelectEvent( 0.f, 0.f, SelectionType::ALL );
+}
+
+void Controller::SelectNone()
+{
+  SelectEvent( 0.f, 0.f, SelectionType::NONE );
+}
+
+string Controller::GetSelectedText() const
+{
+  string text;
+  if( EventData::SELECTING == mImpl->mEventData->mState )
+  {
+    mImpl->RetrieveSelection( text, false );
+  }
+  return text;
+}
+
 InputMethodContext::CallbackData Controller::OnInputMethodContextEvent( InputMethodContext& inputMethodContext, const InputMethodContext::EventData& inputMethodContextEvent )
 {
   // Whether the text needs to be relaid-out.
@@ -3926,16 +3946,6 @@ bool Controller::RemoveSelectedText()
   return textRemoved;
 }
 
-std::string Controller::GetSelectedText()
-{
-  std::string text;
-  if( EventData::SELECTING == mImpl->mEventData->mState )
-  {
-    mImpl->RetrieveSelection( text, false );
-  }
-  return text;
-}
-
 // private : Relayout.
 
 bool Controller::DoRelayout( const Size& size,