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-property-handler.cpp;h=3cb9df01a3063c98b6196205015a5813116a32ad;hp=62dfbda54262f92bfe94988bd485345fd1060c1a;hb=2512aa2794f3c5ea5841542b9ed9c8c32973540b;hpb=2b6e7d59a00075e2f83eedee483e3544a7af7f3d diff --git a/dali-toolkit/internal/controls/text-controls/text-editor-property-handler.cpp b/dali-toolkit/internal/controls/text-controls/text-editor-property-handler.cpp index 62dfbda..3cb9df0 100644 --- a/dali-toolkit/internal/controls/text-controls/text-editor-property-handler.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-editor-property-handler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,6 +14,7 @@ * limitations under the License. */ +#include #include #include @@ -311,6 +312,7 @@ void TextEditor::PropertyHandler::SetProperty(Toolkit::TextEditor textEditor, Pr DALI_LOG_INFO(gTextEditorLogFilter, Debug::General, "TextEditor %p ENABLE_MARKUP %d\n", impl.mController.Get(), enableMarkup); impl.mController->SetMarkupProcessorEnabled(enableMarkup); + CommonTextUtils::SynchronizeTextAnchorsInParent(textEditor, impl.mController, impl.mAnchorActors); break; } case Toolkit::TextEditor::Property::INPUT_COLOR: @@ -608,6 +610,15 @@ void TextEditor::PropertyHandler::SetProperty(Toolkit::TextEditor textEditor, Pr } break; } + case Toolkit::DevelTextEditor::Property::ENABLE_FONT_SIZE_SCALE: + { + const bool enableFontSizeScale = value.Get(); + if(!Equals(impl.mController->IsFontSizeScaleEnabled(), enableFontSizeScale)) + { + impl.mController->SetFontSizeScaleEnabled(enableFontSizeScale); + } + break; + } case Toolkit::DevelTextEditor::Property::PRIMARY_CURSOR_POSITION: { uint32_t position = static_cast(value.Get()); @@ -687,6 +698,31 @@ void TextEditor::PropertyHandler::SetProperty(Toolkit::TextEditor textEditor, Pr impl.mRenderer.Reset(); break; } + case Toolkit::DevelTextEditor::Property::STRIKETHROUGH: + { + const bool update = SetStrikethroughProperties(impl.mController, value, Text::EffectStyle::DEFAULT); + if(update) + { + impl.mRenderer.Reset(); + } + break; + } + case Toolkit::DevelTextEditor::Property::INPUT_STRIKETHROUGH: + { + const bool update = SetStrikethroughProperties(impl.mController, value, Text::EffectStyle::INPUT); + if(update) + { + impl.mRenderer.Reset(); + } + break; + } + case Toolkit::DevelTextEditor::Property::CHARACTER_SPACING: + { + const float characterSpacing = value.Get(); + impl.mController->SetCharacterSpacing(characterSpacing); + impl.mRenderer.Reset(); + break; + } } } @@ -973,6 +1009,16 @@ Property::Value TextEditor::PropertyHandler::GetProperty(Toolkit::TextEditor tex value = impl.mController->GetLineWrapMode(); break; } + case Toolkit::DevelTextEditor::Property::STRIKETHROUGH: + { + GetStrikethroughProperties(impl.mController, value, Text::EffectStyle::DEFAULT); + break; + } + case Toolkit::DevelTextEditor::Property::INPUT_STRIKETHROUGH: + { + GetStrikethroughProperties(impl.mController, value, Text::EffectStyle::INPUT); + break; + } case Toolkit::DevelTextEditor::Property::ENABLE_SHIFT_SELECTION: { value = impl.mController->IsShiftSelectionEnabled(); @@ -1030,6 +1076,11 @@ Property::Value TextEditor::PropertyHandler::GetProperty(Toolkit::TextEditor tex value = impl.mController->GetFontSizeScale(); break; } + case Toolkit::DevelTextEditor::Property::ENABLE_FONT_SIZE_SCALE: + { + value = impl.mController->IsFontSizeScaleEnabled(); + break; + } case Toolkit::DevelTextEditor::Property::PRIMARY_CURSOR_POSITION: { value = static_cast(impl.mController->GetPrimaryCursorPosition()); @@ -1074,6 +1125,11 @@ Property::Value TextEditor::PropertyHandler::GetProperty(Toolkit::TextEditor tex value = impl.mController->GetDefaultLineSize(); break; } + case Toolkit::DevelTextEditor::Property::CHARACTER_SPACING: + { + value = impl.mController->GetCharacterSpacing(); + break; + } } //switch return value; }