if(mDecorator &&
(Text::Controller::NONE_UPDATED != (Text::Controller::DECORATOR_UPDATED & updateTextType)))
{
- mDecorator->Relayout(contentSize);
+ mDecorator->Relayout(contentSize, container);
}
if(!mRenderer)
// The text-editor adds an idle callback to the adaptor to emit the signals after the size negotiation.
if(!mController->IsInputStyleChangedSignalsQueueEmpty())
{
- if(Adaptor::IsAvailable())
- {
- Adaptor& adaptor = Adaptor::Get();
-
- if(NULL == mIdleCallback)
- {
- // @note: The callback manager takes the ownership of the callback object.
- mIdleCallback = MakeCallback(this, &TextEditor::OnIdleSignal);
- if(DALI_UNLIKELY(!adaptor.AddIdle(mIdleCallback, false)))
- {
- DALI_LOG_ERROR("Fail to add idle callback for text editor queue. Skip these callbacks\n");
-
- // Set the pointer to null as the callback manager deletes the callback even AddIdle failed.
- mIdleCallback = NULL;
- }
- }
- }
+ mController->RequestProcessInputStyleChangedSignals();
}
}
return false;
}
-void TextEditor::OnIdleSignal()
-{
- // Emits the change of input style signals.
- mController->ProcessInputStyleChangedSignals();
-
- // Set the pointer to null as the callback manager deletes the callback after execute it.
- mIdleCallback = NULL;
-}
-
void TextEditor::ApplyScrollPosition()
{
const Vector2& scrollOffset = mController->GetTextModel()->GetScrollPosition();
TextEditor::TextEditor(ControlBehaviour additionalBehaviour)
: Control(ControlBehaviour(CONTROL_BEHAVIOUR_DEFAULT | additionalBehaviour)),
mAnimationPeriod(0.0f, 0.0f),
- mIdleCallback(NULL),
mAlignmentOffset(0.f),
mScrollAnimationDuration(0.f),
mLineSpacing(0.f),
TextEditor::~TextEditor()
{
UnparentAndReset(mStencil);
-
- if((NULL != mIdleCallback) && Adaptor::IsAvailable())
- {
- // Removes the callback from the callback manager in case the text-editor is destroyed before the callback is executed.
- Adaptor::Get().RemoveIdle(mIdleCallback);
- }
}
std::string TextEditor::TextEditorAccessible::GetName() const