*/
enum SelectionType
{
- INTERACTIVE = 0x0000,
- ALL = 0x0001,
- NONE = 0x0002
+ INTERACTIVE = 0x0000, ///< Select the word where the cursor is located.
+ ALL = 0x0001, ///< Select the whole text.
+ NONE = 0x0002, ///< Unselect the whole text.
+ RANGE = 0x0003 ///< Select the range text.
};
typedef IntrusivePtr<Controller> ControllerPtr;
void SelectEvent(float x, float y, SelectionType selection);
/**
+ * @brief Creates a selection event with a selection index.
+ *
+ * It could be called from the SelectText().
+ * The start and end parameters are passed through the event.
+ *
+ * @param[in] start The start selection position.
+ * @param[in] end The end selection position.
+ * @param[in] selection type like the range.
+ */
+ void SelectEvent(const uint32_t start, const uint32_t end, SelectionType selection);
+
+ /**
* @copydoc Text::SelectableControlInterface::SetTextSelectionRange()
*/
void SetTextSelectionRange(const uint32_t* start, const uint32_t* end);
void SelectWholeText();
/**
+ * @copydoc Text::EditableControlInterface::CopyText()
+ */
+ string CopyText();
+
+ /**
+ * @copydoc Text::EditableControlInterface::CutText()
+ */
+ string CutText();
+
+ /**
+ * @copydoc Text::EditableControlInterface::PasteText()
+ */
+ void PasteText();
+
+ /**
* @copydoc Text::SelectableControlInterface::SelectNone()
*/
void SelectNone();
/**
+ * @copydoc Text::SelectableControlInterface::SelectText()
+ */
+ void SelectText(const uint32_t start, const uint32_t end);
+
+ /**
* @copydoc Text::SelectableControlInterface::GetSelectedText()
*/
string GetSelectedText() const;
void InsertText(const std::string& text, InsertType type);
/**
- * @brief Paste given string into Text model
- * @param[in] stringToPaste this string will be inserted into the text model
+ * @copydoc Text::EditableControlInterface::PasteText()
*/
void PasteText(const std::string& stringToPaste);
*/
void ResetScrollPosition();
+ /**
+ * @brief fill needed relayout parameters when line size is changed & request relayout.
+ */
+ void RelayoutForNewLineSize();
+
private: // Private contructors & copy operator.
/**
* @brief Private constructor.