mActiveLayer.SetProperty(Actor::Property::POSITION, Vector2(padding.start, padding.top));
}
+ // 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) ||
}
RenderText(updateTextType);
-
- // If there is text changed, callback is called.
- if(mTextChanged)
- {
- Dali::Toolkit::TextEditor handle(GetOwner());
- mTextChangedSignal.Emit(handle);
- mTextChanged = false;
- }
}
// The text-editor emits signals when the input style changes. These changes of style are
RelayoutRequest();
}
-void TextEditor::TextChanged()
+void TextEditor::TextChanged(bool immediate)
{
- mTextChanged = true;
+ if(immediate) // Emits TextChangedSignal immediately
+ {
+ EmitTextChangedSignal();
+ }
+ else
+ {
+ mTextChanged = true;
+ }
+}
+
+void TextEditor::EmitTextChangedSignal()
+{
+ Dali::Toolkit::TextEditor handle(GetOwner());
+ mTextChangedSignal.Emit(handle);
+ mTextChanged = false;
}
void TextEditor::MaxLengthReached()
return range;
}
+void TextEditor::GetControlBackgroundColor(Vector4& color) const
+{
+ Property::Value propValue = Self().GetProperty(Toolkit::Control::Property::BACKGROUND);
+ Property::Map* resultMap = propValue.GetMap();
+
+ Property::Value* colorValue = nullptr;
+ if(resultMap && (colorValue = resultMap->Find(ColorVisual::Property::MIX_COLOR)))
+ {
+ colorValue->Get(color);
+ }
+}
+
void TextEditor::UpdateScrollBar()
{
using namespace Dali;