*
*/
-// INTERNAL INCLUDE
-#include <dali-toolkit/internal/text/line-run.h>
-
// EXTERNAL INCLUDE
#include <dali/public-api/common/dali-vector.h>
#include <dali/public-api/math/vector2.h>
+// INTERNAL INCLUDE
+#include <dali-toolkit/internal/text/line-run.h>
+
namespace Dali
{
MULTI_LINE_BOX
};
+ enum HorizontalAlignment
+ {
+ HORIZONTAL_ALIGN_BEGIN,
+ HORIZONTAL_ALIGN_CENTER,
+ HORIZONTAL_ALIGN_END
+ };
+
+ enum VerticalAlignment
+ {
+ VERTICAL_ALIGN_TOP,
+ VERTICAL_ALIGN_CENTER,
+ VERTICAL_ALIGN_BOTTOM
+ };
+
/**
* @brief Create a new instance of a LayoutEngine.
*/
unsigned int GetLayout() const;
/**
+ * @brief Enable or disable the text ellipsis.
+ *
+ * @param[in] enabled Whether to enable the text ellipsis.
+ */
+ void SetTextEllipsisEnabled( bool enabled );
+
+ /**
+ * @return Whether the text ellipsis is enabled.
+ */
+ bool GetTextEllipsisEnabled() const;
+
+ /**
+ * @brief Choose the required text horizontal alignment.
+ *
+ * @param[in] alignment The required alignment.
+ */
+ void SetHorizontalAlignment( HorizontalAlignment alignment );
+
+ /**
+ * @brief Query the required text horizontal alignment.
+ *
+ * @return The required alignment.
+ */
+ HorizontalAlignment GetHorizontalAlignment() const;
+
+ /**
+ * @brief Choose the required text vertical alignment.
+ *
+ * @param[in] alignment The required alignment.
+ */
+ void SetVerticalAlignment( VerticalAlignment alignment );
+
+ /**
+ * @brief Query the required text vertical alignment.
+ *
+ * @return The required alignment.
+ */
+ VerticalAlignment GetVerticalAlignment() const;
+
+ /**
* @brief Store the visual position of glyphs in the VisualModel.
*
* @param[in] layoutParameters The parameters needed to layout the text.
Vector<LineRun>& lines,
Size& actualSize );
+ /**
+ * @brief Re-lays out those lines with right to left characters.
+ *
+ * It doesn't change the phisical position of the glyphs in the model but sets their new position.
+ *
+ * @param[in] layoutParameters The parameters needed to layout the text.
+ * @param[in,out] glyphPositions The positions of all the glyphs.
+ */
+ void ReLayoutRightToLeftLines( const LayoutParameters& layoutParameters,
+ Vector<Vector2>& glyphPositions );
+
+ /**
+ * @brief Aligns the laid out lines.
+ *
+ * @param[in] layoutSize The size of the laid out the text.
+ * @param[in,out] lines The laid-out lines.
+ */
+ void Align( const Size& layoutSize,
+ Vector<LineRun>& lines );
+
private:
// Undefined