#include <dali-toolkit/devel-api/controls/text-controls/text-selection-popup-callback-interface.h>
#include <dali-toolkit/internal/text/decorator/text-decorator.h>
#include <dali-toolkit/internal/text/layouts/layout-engine.h>
+#include <dali-toolkit/internal/text/text-model-interface.h>
namespace Dali
{
class ControlInterface;
class EditableControlInterface;
class View;
+class RenderingController;
typedef IntrusivePtr<Controller> ControllerPtr;
bool IsMultiLineEnabled() const;
/**
- * @copydoc Dali::Toolkit::Text::LayoutEngine::SetHorizontalAlignment()
+ * @brief Sets the text's horizontal alignment.
+ *
+ * @param[in] alignment The horizontal alignment.
*/
- void SetHorizontalAlignment( LayoutEngine::HorizontalAlignment alignment );
+ void SetHorizontalAlignment( Layout::HorizontalAlignment alignment );
/**
- * @copydoc Dali::Toolkit::Text::LayoutEngine::GetHorizontalAlignment()
+ * @copydoc ModelInterface::GetHorizontalAlignment()
+ */
+ Layout::HorizontalAlignment GetHorizontalAlignment() const;
+
+ /**
+ * @brief Sets the text's vertical alignment.
+ *
+ * @param[in] alignment The vertical alignment.
*/
- LayoutEngine::HorizontalAlignment GetHorizontalAlignment() const;
+ void SetVerticalAlignment( Layout::VerticalAlignment alignment );
/**
- * @copydoc Dali::Toolkit::Text::LayoutEngine::SetVerticalAlignment()
+ * @copydoc ModelInterface::GetVerticalAlignment()
+ */
+ Layout::VerticalAlignment GetVerticalAlignment() const;
+
+ /**
+ * @brief Enable or disable the text elide.
+ *
+ * @param[in] enabled Whether to enable the text elide.
+ */
+ void SetTextElideEnabled( bool enabled );
+
+ /**
+ * @copydoc ModelInterface::IsTextElideEnabled()
+ */
+ bool IsTextElideEnabled() const;
+
+ /**
+ * @brief Sets input type to password
+ *
+ * @note The string is displayed continuous "*"
+ *
+ * @param[in] passwordInput True if password input is enabled.
*/
- void SetVerticalAlignment( LayoutEngine::VerticalAlignment alignment );
+ void SetInputModePassword( bool passwordInput );
/**
- * @copydoc Dali::Toolkit::Text::LayoutEngine::GetVerticalAlignment()
+ * @brief Returns whether the input mode type is set as password.
+ *
+ * @return True if input mode type is password
*/
- LayoutEngine::VerticalAlignment GetVerticalAlignment() const;
+ bool IsInputModePassword();
public: // Update.
float GetDefaultPointSize() const;
/**
- * @brief Set the text color
+ * @brief Sets the text's default color.
*
- * @param textColor The text color
+ * @param color The default color.
*/
- void SetTextColor( const Vector4& textColor );
+ void SetDefaultColor( const Vector4& color );
/**
- * @brief Retrieve the text color
+ * @brief Retrieves the text's default color.
*
- * @return The text color
+ * @return The default color.
*/
- const Vector4& GetTextColor() const;
+ const Vector4& GetDefaultColor() const;
/**
* @brief Set the text color
*
* @return A reference to the layout engine.
*/
- LayoutEngine& GetLayoutEngine();
+ Layout::Engine& GetLayoutEngine();
/**
* @brief Return a view of the text.
View& GetView();
/**
- * @brief Query the current scroll position; the UI control is responsible for moving actors to this position.
- *
- * @return The scroll position.
- */
- const Vector2& GetScrollPosition() const;
-
- /**
* @copydoc Control::GetNaturalSize()
*/
Vector3 GetNaturalSize();
*/
float GetHeightForWidth( float width );
+ /**
+ * @brief Retrieves the text's model.
+ *
+ * @return A pointer to the text's model.
+ */
+ const ModelInterface* const GetTextModel() const;
+
+ /**
+ * @brief Used to get scrolled distance by user input
+ *
+ * @return Distance from last scroll offset to new scroll offset
+ */
+ float GetScrollAmountByUserInput();
+
public: // Relayout.
/**