#define DALI_TOOLKIT_INTERNAL_TEXT_FIELD_H
/*
- * 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.
*/
DevelTextField::SelectionClearedSignalType& SelectionClearedSignal();
+ /**
+ * @copydoc TextField::SelectionStartedSignal()
+ */
+ DevelTextField::SelectionStartedSignalType& SelectionStartedSignal();
+
private: // From Control
/**
* @copydoc Control::OnInitialize()
/**
* @copydoc Text::EditableControlInterface::AddDecoration()
*/
- void AddDecoration(Actor& actor, bool needsClipping) override;
+ void AddDecoration(Actor& actor, Toolkit::Text::DecorationType type, bool needsClipping) override;
/**
* @copydoc Text::EditableControlInterface::InputFiltered()
// From SelectableControlInterface
public:
+
/**
* @copydoc Text::SelectableControlInterface::SetTextSelectionRange()
*/
void EmitSelectionClearedSignal();
/**
+ * @brief Emits SelectionStarted signal.
+ */
+ void EmitSelectionStartedSignal();
+
+ /**
* @brief Callback function for when the layout is changed.
* @param[in] actor The actor whose layoutDirection is changed.
* @param[in] type The layoutDirection.
void OnLayoutDirectionChanged(Actor actor, LayoutDirection::Type type);
/**
+ * @brief Add a layer for active or cursor.
+ * @param[in] layer The actor in which to store the layer.
+ * @param[in] actor The new layer to add.
+ */
+ void AddLayer(Actor& layer, Actor& actor);
+
+ /**
* Construct a new TextField.
*/
TextField();
Toolkit::DevelTextField::CursorPositionChangedSignalType mCursorPositionChangedSignal;
Toolkit::DevelTextField::SelectionChangedSignalType mSelectionChangedSignal;
Toolkit::DevelTextField::SelectionClearedSignalType mSelectionClearedSignal;
+ Toolkit::DevelTextField::SelectionStartedSignalType mSelectionStartedSignal;
InputMethodContext mInputMethodContext;
Text::ControllerPtr mController;
Actor mRenderableActor;
Actor mActiveLayer;
+ Actor mCursorLayer;
Actor mBackgroundActor;
CallbackBase* mIdleCallback;
uint32_t mOldSelectionStart;
uint32_t mOldSelectionEnd;
+ bool mSelectionStarted : 1; ///< If true, emits SelectionStartedSignal at the end of OnRelayout().
+
protected:
struct PropertyHandler;