DALI_DEVEL_PROPERTY_REGISTRATION(Toolkit, TextEditor, "minLineSize", FLOAT, MIN_LINE_SIZE )
DALI_DEVEL_PROPERTY_REGISTRATION(Toolkit, TextEditor, "strikethrough", MAP, STRIKETHROUGH )
DALI_DEVEL_PROPERTY_REGISTRATION(Toolkit, TextEditor, "inputStrikethrough", MAP, INPUT_STRIKETHROUGH )
+DALI_DEVEL_PROPERTY_REGISTRATION(Toolkit, TextEditor, "characterSpacing", FLOAT, CHARACTER_SPACING )
DALI_SIGNAL_REGISTRATION(Toolkit, TextEditor, "textChanged", SIGNAL_TEXT_CHANGED )
DALI_SIGNAL_REGISTRATION(Toolkit, TextEditor, "inputStyleChanged", SIGNAL_INPUT_STYLE_CHANGED )
DALI_SIGNAL_REGISTRATION(Toolkit, TextEditor, "cursorPositionChanged", SIGNAL_CURSOR_POSITION_CHANGED)
DALI_SIGNAL_REGISTRATION(Toolkit, TextEditor, "selectionChanged", SIGNAL_SELECTION_CHANGED )
DALI_SIGNAL_REGISTRATION(Toolkit, TextEditor, "selectionCleared", SIGNAL_SELECTION_CLEARED )
+DALI_SIGNAL_REGISTRATION(Toolkit, TextEditor, "selectionStarted", SIGNAL_SELECTION_STARTED )
DALI_TYPE_REGISTRATION_END()
// clang-format on
return mSelectionClearedSignal;
}
+DevelTextEditor::SelectionStartedSignalType& TextEditor::SelectionStartedSignal()
+{
+ return mSelectionStartedSignal;
+}
+
Text::ControllerPtr TextEditor::GetTextController()
{
return mController;
editorImpl.SelectionClearedSignal().Connect(tracker, functor);
}
}
+ else if(0 == strcmp(signalName.c_str(), SIGNAL_SELECTION_STARTED))
+ {
+ if(editor)
+ {
+ Internal::TextEditor& editorImpl(GetImpl(editor));
+ editorImpl.SelectionStartedSignal().Connect(tracker, functor);
+ }
+ }
else
{
// signalName does not match any signal
EmitCursorPositionChangedSignal();
}
+ if(mSelectionStarted)
+ {
+ EmitSelectionStartedSignal();
+ }
+
if(mSelectionChanged)
{
EmitSelectionChangedSignal();
mSelectionCleared = false;
}
+void TextEditor::EmitSelectionStartedSignal()
+{
+ Dali::Toolkit::TextEditor handle(GetOwner());
+ mSelectionStartedSignal.Emit(handle);
+ mSelectionStarted = false;
+}
+
void TextEditor::SelectionChanged(uint32_t oldStart, uint32_t oldEnd, uint32_t newStart, uint32_t newEnd)
{
if(((oldStart != newStart) || (oldEnd != newEnd)) && !mSelectionChanged)
{
mSelectionCleared = true;
}
+ else
+ {
+ if(oldStart == oldEnd)
+ {
+ mSelectionStarted = true;
+ }
+ }
mSelectionChanged = true;
mOldSelectionStart = oldStart;
mSelectionCleared(false),
mOldPosition(0u),
mOldSelectionStart(0u),
- mOldSelectionEnd(0u)
+ mOldSelectionEnd(0u),
+ mSelectionStarted(false)
{
}