X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Ftext-controls%2Ftext-editor-impl.cpp;h=432ea0870d8cbe859a29532e703b5b7037ee770f;hb=refs%2Fchanges%2F01%2F273601%2F9;hp=b1ff578aacacac4c655e0bf16bd40d64c52aece5;hpb=a2c1293114a5e1ab31bf6bcea8d6574ccaf1fcfb;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 b1ff578..432ea08 100644 --- a/dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp @@ -159,6 +159,8 @@ DALI_DEVEL_PROPERTY_REGISTRATION(Toolkit, TextEditor, "strikethrough", DALI_DEVEL_PROPERTY_REGISTRATION(Toolkit, TextEditor, "inputStrikethrough", MAP, INPUT_STRIKETHROUGH ) DALI_DEVEL_PROPERTY_REGISTRATION(Toolkit, TextEditor, "characterSpacing", FLOAT, CHARACTER_SPACING ) DALI_DEVEL_PROPERTY_REGISTRATION(Toolkit, TextEditor, "relativeLineSize", FLOAT, RELATIVE_LINE_SIZE ) +DALI_DEVEL_PROPERTY_REGISTRATION(Toolkit, TextEditor, "verticalAlignment", STRING, VERTICAL_ALIGNMENT ) +DALI_DEVEL_PROPERTY_REGISTRATION(Toolkit, TextEditor, "selectionPopupStyle", MAP, SELECTION_POPUP_STYLE ) DALI_SIGNAL_REGISTRATION(Toolkit, TextEditor, "textChanged", SIGNAL_TEXT_CHANGED ) DALI_SIGNAL_REGISTRATION(Toolkit, TextEditor, "inputStyleChanged", SIGNAL_INPUT_STYLE_CHANGED ) @@ -673,6 +675,31 @@ void TextEditor::ResizeActor(Actor& actor, const Vector2& size) } } +void TextEditor::OnPropertySet(Property::Index index, const Property::Value& propertyValue) +{ + DALI_LOG_INFO(gTextEditorLogFilter, Debug::Verbose, "TextEditor::OnPropertySet index[%d]\n", index); + + switch(index) + { + case DevelActor::Property::USER_INTERACTION_ENABLED: + { + const bool enabled = propertyValue.Get(); + mController->SetUserInteractionEnabled(enabled); + if(mStencil) + { + float opacity = enabled ? 1.0f : mController->GetDisabledColorOpacity(); + mStencil.SetProperty(Actor::Property::OPACITY, opacity); + } + break; + } + default: + { + Control::OnPropertySet(index, propertyValue); // up call to control for non-handled properties + break; + } + } +} + void TextEditor::OnRelayout(const Vector2& size, RelayoutContainer& container) { DALI_LOG_INFO(gTextEditorLogFilter, Debug::Verbose, "TextEditor OnRelayout\n"); @@ -811,7 +838,10 @@ void TextEditor::OnKeyInputFocusGained() notifier.ContentSelectedSignal().Connect(this, &TextEditor::OnClipboardTextSelected); } - mController->KeyboardFocusGainEvent(); // Called in the case of no virtual keyboard to trigger this event + if(IsEditable() && mController->IsUserInteractionEnabled()) + { + mController->KeyboardFocusGainEvent(); // Called in the case of no virtual keyboard to trigger this event + } EmitKeyInputFocusSignal(true); // Calls back into the Control hence done last. }