X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Ftext-controls%2Ftext-editor-impl.cpp;h=75b90f3586af8bf9547263c063cb00661c9a4a24;hb=7d2f20cb084ebba297e77b7b3847fb8cf19c0af5;hp=eb05cf185bbf7fd9159c9808b55f4a379161b02a;hpb=8f2687c154d9fc859c58e5ee2fb42a18f9fe6e78;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp index eb05cf1..75b90f3 100644 --- a/dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp @@ -149,6 +149,8 @@ DALI_DEVEL_PROPERTY_REGISTRATION(Toolkit, TextEditor, "grabHandleColor DALI_DEVEL_PROPERTY_REGISTRATION(Toolkit, TextEditor, "enableGrabHandlePopup", BOOLEAN, ENABLE_GRAB_HANDLE_POPUP ) DALI_DEVEL_PROPERTY_REGISTRATION(Toolkit, TextEditor, "inputMethodSettings", MAP, INPUT_METHOD_SETTINGS ) DALI_DEVEL_PROPERTY_REGISTRATION(Toolkit, TextEditor, "inputFilter", MAP, INPUT_FILTER ) +DALI_DEVEL_PROPERTY_REGISTRATION(Toolkit, TextEditor, "ellipsis", BOOLEAN, ELLIPSIS ) +DALI_DEVEL_PROPERTY_REGISTRATION(Toolkit, TextEditor, "ellipsisPosition", INTEGER, ELLIPSIS_POSITION ) DALI_SIGNAL_REGISTRATION(Toolkit, TextEditor, "textChanged", SIGNAL_TEXT_CHANGED ) DALI_SIGNAL_REGISTRATION(Toolkit, TextEditor, "inputStyleChanged", SIGNAL_INPUT_STYLE_CHANGED) @@ -764,7 +766,7 @@ void TextEditor::SetProperty(BaseObject* object, Property::Index index, const Pr { uint32_t position = static_cast(value.Get()); DALI_LOG_INFO(gLogFilter, Debug::General, "TextEditor %p PRIMARY_CURSOR_POSITION %d\n", impl.mController.Get(), position); - if(impl.mController->SetPrimaryCursorPosition(position)) + if(impl.mController->SetPrimaryCursorPosition(position, impl.HasKeyInputFocus())) { impl.SetKeyInputFocus(); } @@ -812,6 +814,24 @@ void TextEditor::SetProperty(BaseObject* object, Property::Index index, const Pr } break; } + case Toolkit::DevelTextEditor::Property::ELLIPSIS: + { + const bool ellipsis = value.Get(); + DALI_LOG_INFO(gLogFilter, Debug::General, "TextEditor %p ELLIPSIS %d\n", impl.mController.Get(), ellipsis); + + impl.mController->SetTextElideEnabled(ellipsis); + break; + } + case Toolkit::DevelTextEditor::Property::ELLIPSIS_POSITION: + { + DevelText::EllipsisPosition::Type ellipsisPositionType(static_cast(-1)); // Set to invalid value to ensure a valid mode does get set + if(GetEllipsisPositionTypeEnumeration(value, ellipsisPositionType)) + { + DALI_LOG_INFO(gLogFilter, Debug::General, "TextEditor %p EllipsisPosition::Type %d\n", impl.mController.Get(), ellipsisPositionType); + impl.mController->SetEllipsisPosition(ellipsisPositionType); + } + break; + } } // switch } // texteditor } @@ -1192,6 +1212,16 @@ Property::Value TextEditor::GetProperty(BaseObject* object, Property::Index inde value = map; break; } + case Toolkit::DevelTextEditor::Property::ELLIPSIS: + { + value = impl.mController->IsTextElideEnabled(); + break; + } + case Toolkit::DevelTextEditor::Property::ELLIPSIS_POSITION: + { + value = impl.mController->GetEllipsisPosition(); + break; + } } //switch }