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::TextField handle(GetOwner());
- mTextChangedSignal.Emit(handle);
- mTextChanged = false;
- }
}
// The text-field emits signals when the input style changes. These changes of style are
}
}
-void TextField::TextChanged()
+void TextField::TextChanged(bool immediate)
{
- mTextChanged = true;
+ if(immediate) // Emits TextChangedSignal immediately
+ {
+ EmitTextChangedSignal();
+ }
+ else
+ {
+ mTextChanged = true;
+ }
+}
+
+void TextField::EmitTextChangedSignal()
+{
+ Dali::Toolkit::TextField handle(GetOwner());
+ mTextChangedSignal.Emit(handle);
+ mTextChanged = false;
}
void TextField::MaxLengthReached()
}
}
+void TextField::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 TextField::OnSceneConnect(Dali::Actor actor)
{
if(mHasBeenStaged)