}
}
+string TextEditor::CopyText()
+{
+ string copiedText = "";
+ if(mController && mController->IsShowingRealText())
+ {
+ copiedText = mController->CopyText();
+ }
+ return copiedText;
+}
+
+string TextEditor::CutText()
+{
+ string cutText = "";
+ if(mController && mController->IsShowingRealText())
+ {
+ cutText = mController->CutText();
+ }
+ return cutText;
+}
+
+void TextEditor::PasteText()
+{
+ if(mController)
+ {
+ SetKeyInputFocus(); //Giving focus to the editor that was passed to the PasteText in case the passed editor (current editor) doesn't have focus.
+ mController->PasteText();
+ }
+}
+
void TextEditor::ScrollBy(Vector2 scroll)
{
if(mController && mController->IsShowingRealText())
// Forward input events to controller
EnableGestureDetection(static_cast<GestureType::Value>(GestureType::TAP | GestureType::PAN | GestureType::LONG_PRESS));
GetTapGestureDetector().SetMaximumTapsRequired(2);
+ GetTapGestureDetector().ReceiveAllTapEvents(true);
self.TouchedSignal().Connect(this, &TextEditor::OnTouched);
mTextChanged(false),
mCursorPositionChanged(false),
mSelectionChanged(false),
- mSelectionCleared(false)
+ mSelectionCleared(false),
+ mOldPosition(0u),
+ mOldSelectionStart(0u),
+ mOldSelectionEnd(0u)
{
}