+ /**
+ * @brief Paste given string into Text model
+ * @param[in] stringToPaste this string will be inserted into the text model
+ */
+ void PasteText( const std::string& stringToPaste );
+
+ /**
+ * @brief Remove a given number of characters
+ *
+ * When predictve text is used the pre-edit text is removed and inserted again with the new characters.
+ * The UpdateInputStyleType @type parameter if set to DONT_UPDATE_INPUT_STYLE avoids to update the input
+ * style when pre-edit text is removed.
+ *
+ * @param[in] cursorOffset Start position from the current cursor position to start deleting characters.
+ * @param[in] numberOfCharacters The number of characters to delete from the cursorOffset.
+ * @param[in] type Whether to update the input style.
+ * @return True if the remove was successful.
+ */
+ bool RemoveText( int cursorOffset,
+ int numberOfCharacters,
+ UpdateInputStyleType type );
+
+ /**
+ * @brief Checks if text is selected and if so removes it.
+ * @return true if text was removed
+ */
+ bool RemoveSelectedText();
+
+private: // Relayout.
+
+ /**
+ * @brief Lays-out the text.
+ *
+ * GetNaturalSize(), GetHeightForWidth() and Relayout() calls this method.
+ *
+ * @param[in] size A the size of a bounding box to layout text within.
+ * @param[in] operations The layout operations which need to be done.
+ * @param[out] layoutSize The size of the laid-out text.
+ */
+ bool DoRelayout( const Size& size,
+ OperationsMask operations,
+ Size& layoutSize );
+
+ /**
+ * @brief Calulates the vertical offset to align the text inside the bounding box.
+ *
+ * @param[in] size The size of the bounding box.
+ */
+ void CalculateVerticalOffset( const Size& size );
+
+private: // Events.
+
+ /**
+ * @brief Process queued events which modify the model.
+ */
+ void ProcessModifyEvents();
+
+ /**
+ * @brief Used to process an event queued from SetText()
+ */
+ void TextReplacedEvent();
+
+ /**
+ * @brief Used to process an event queued from key events etc.
+ */
+ void TextInsertedEvent();
+
+ /**
+ * @brief Used to process an event queued from backspace key etc.
+ */
+ void TextDeletedEvent();
+
+ /**
+ * @brief Creates a selection event.
+ *
+ * It could be called from the TapEvent (double tap) or when the text selection popup's sellect all button is pressed.
+ *
+ * @param[in] x The x position relative to the top-left of the parent control.
+ * @param[in] y The y position relative to the top-left of the parent control.
+ * @param[in] selectAll Whether the whole text is selected.
+ */
+ void SelectEvent( float x, float y, bool selectAll );