// EXTERNAL INCLUDES
#include <dali/devel-api/adaptor-framework/clipboard.h>
#include <dali/devel-api/text-abstraction/font-client.h>
+#include <dali/public-api/rendering/shader.h>
// INTERNAL INCLUDES
#include <dali-toolkit/internal/text/input-style.h>
struct CursorInfo;
struct FontDefaults;
+class SelectableControlInterface;
+
struct Event
{
// Used to queue input events until DoRelayout()
LEFT_SELECTION_HANDLE_EVENT,
RIGHT_SELECTION_HANDLE_EVENT,
SELECT,
- SELECT_ALL
+ SELECT_ALL,
+ SELECT_NONE,
};
union Param
struct Controller::Impl
{
Impl( ControlInterface* controlInterface,
- EditableControlInterface* editableControlInterface )
+ EditableControlInterface* editableControlInterface,
+ SelectableControlInterface* selectableControlInterface )
: mControlInterface( controlInterface ),
mEditableControlInterface( editableControlInterface ),
+ mSelectableControlInterface( selectableControlInterface ),
mModel(),
mFontDefaults( NULL ),
mUnderlineDefaults( NULL ),
void OnSelectAllEvent();
+ void OnSelectNoneEvent();
+
+ /**
+ * @copydoc Text::SelectableControlInterface::SetTextSelectionRange()
+ */
+ void SetTextSelectionRange(const uint32_t *pStart, const uint32_t *pEndf);
+
+ /**
+ * @copydoc Text::SelectableControlInterface::GetTextSelectionRange()
+ */
+ Uint32Pair GetTextSelectionRange() const;
+
/**
* @brief Retrieves the selected text. It removes the text if the @p deleteAfterRetrieval parameter is @e true.
*
*/
void ScrollTextToMatchCursor( const CursorInfo& cursorInfo );
+ /**
+ * @brief Create an actor that renders the text background color
+ *
+ * @return the created actor or an empty handle if no background color needs to be rendered.
+ */
+ Actor CreateBackgroundActor();
+
public:
/**
ControlInterface* mControlInterface; ///< Reference to the text controller.
EditableControlInterface* mEditableControlInterface; ///< Reference to the editable text controller.
+ SelectableControlInterface* mSelectableControlInterface; ///< Reference to the selectable text controller.
ModelPtr mModel; ///< Pointer to the text's model.
FontDefaults* mFontDefaults; ///< Avoid allocating this when the user does not specify a font.
UnderlineDefaults* mUnderlineDefaults; ///< Avoid allocating this when the user does not specify underline parameters.
bool mShouldClearFocusOnEscape:1; ///< Whether text control should clear key input focus
LayoutDirection::Type mLayoutDirection; ///< Current system language direction
+ Shader mShaderBackground; ///< The shader for text background.
+
float mTextFitMinSize; ///< Minimum Font Size for text fit. Default 10
float mTextFitMaxSize; ///< Maximum Font Size for text fit. Default 100
float mTextFitStepSize; ///< Step Size for font intervalse. Default 1