X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Ftext-controls%2Ftext-editor-impl.cpp;h=1c6009180048c66ca6b13c7b434fd3608426137a;hp=792cd7dbcb8d4c9539e2b3a8ed023bc5063bfbf9;hb=f7e6a8dfa8b498ba261cb66b9842d50d9d2c0e2f;hpb=f60be4f8d8ca4e80c505c93c828d487be598d659 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 792cd7d..1c60091 100644 --- a/dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp @@ -148,6 +148,7 @@ DALI_DEVEL_PROPERTY_REGISTRATION(Toolkit, TextEditor, "fontSizeScale", DALI_DEVEL_PROPERTY_REGISTRATION(Toolkit, TextEditor, "primaryCursorPosition", INTEGER, PRIMARY_CURSOR_POSITION ) DALI_DEVEL_PROPERTY_REGISTRATION(Toolkit, TextEditor, "grabHandleColor", VECTOR4, GRAB_HANDLE_COLOR ) DALI_DEVEL_PROPERTY_REGISTRATION(Toolkit, TextEditor, "enableGrabHandlePopup", BOOLEAN, ENABLE_GRAB_HANDLE_POPUP ) +DALI_DEVEL_PROPERTY_REGISTRATION(Toolkit, TextEditor, "inputMethodSettings", MAP, INPUT_METHOD_SETTINGS ) DALI_SIGNAL_REGISTRATION(Toolkit, TextEditor, "textChanged", SIGNAL_TEXT_CHANGED ) DALI_SIGNAL_REGISTRATION(Toolkit, TextEditor, "inputStyleChanged", SIGNAL_INPUT_STYLE_CHANGED) @@ -784,6 +785,22 @@ void TextEditor::SetProperty(BaseObject* object, Property::Index index, const Pr impl.mController->SetGrabHandlePopupEnabled(grabHandlePopupEnabled); break; } + case Toolkit::DevelTextEditor::Property::INPUT_METHOD_SETTINGS: + { + const Property::Map* map = value.GetMap(); + if(map) + { + impl.mInputMethodOptions.ApplyProperty(*map); + } + impl.mController->SetInputModePassword(impl.mInputMethodOptions.IsPassword()); + + Toolkit::Control control = Toolkit::KeyInputFocusManager::Get().GetCurrentFocusControl(); + if(control == textEditor) + { + impl.mInputMethodContext.ApplyOptions(impl.mInputMethodOptions); + } + break; + } } // switch } // texteditor } @@ -1150,6 +1167,13 @@ Property::Value TextEditor::GetProperty(BaseObject* object, Property::Index inde value = impl.mController->IsGrabHandlePopupEnabled(); break; } + case Toolkit::DevelTextEditor::Property::INPUT_METHOD_SETTINGS: + { + Property::Map map; + impl.mInputMethodOptions.RetrieveProperty(map); + value = map; + break; + } } //switch } @@ -1470,6 +1494,12 @@ void TextEditor::OnRelayout(const Vector2& size, RelayoutContainer& container) ResizeActor(mActiveLayer, contentSize); } + // If there is text changed, callback is called. + if(mTextChanged) + { + EmitTextChangedSignal(); + } + const Text::Controller::UpdateTextType updateTextType = mController->Relayout(contentSize, layoutDirection); if((Text::Controller::NONE_UPDATED != updateTextType) || @@ -1489,12 +1519,6 @@ void TextEditor::OnRelayout(const Vector2& size, RelayoutContainer& container) } RenderText(updateTextType); - - // If there is text changed, callback is called. - if(mTextChanged) - { - EmitTextChangedSignal(); - } } // The text-editor emits signals when the input style changes. These changes of style are @@ -1569,6 +1593,7 @@ void TextEditor::OnKeyInputFocusGained() if(mInputMethodContext && IsEditable()) { // All input panel properties, such as layout, return key type, and input hint, should be set before input panel activates (or shows). + mInputMethodContext.ApplyOptions(mInputMethodOptions); mInputMethodContext.NotifyTextInputMultiLine(true); mInputMethodContext.StatusChangedSignal().Connect(this, &TextEditor::KeyboardStatusChanged);