Merge "Stop setting crazy Z value with controls (at the moment depth is ignored by...
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / layouts / layout-engine.h
index 093399b..121b240 100644 (file)
@@ -28,8 +28,6 @@
 namespace Dali
 {
 
-struct Vector2;
-
 namespace Toolkit
 {
 
@@ -51,11 +49,18 @@ public:
     MULTI_LINE_BOX
   };
 
-  enum Alignment
+  enum HorizontalAlignment
+  {
+    HORIZONTAL_ALIGN_BEGIN,
+    HORIZONTAL_ALIGN_CENTER,
+    HORIZONTAL_ALIGN_END
+  };
+
+  enum VerticalAlignment
   {
-    ALIGN_BEGIN,
-    ALIGN_CENTER,
-    ALIGN_END
+    VERTICAL_ALIGN_TOP,
+    VERTICAL_ALIGN_CENTER,
+    VERTICAL_ALIGN_BOTTOM
   };
 
   /**
@@ -83,18 +88,44 @@ public:
   unsigned int GetLayout() const;
 
   /**
-   * @brief Choose the required line alignment.
+   * @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 SetAlignment( Alignment alignment );
+  void SetHorizontalAlignment( HorizontalAlignment alignment );
 
   /**
-   * @brief Query the required line alignment.
+   * @brief Query the required text horizontal alignment.
    *
    * @return The required alignment.
    */
-  Alignment GetAlignment() const;
+  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.
@@ -125,13 +156,11 @@ public:
   /**
    * @brief Aligns the laid out lines.
    *
-   * @param[in] layoutParameters The parameters needed to layout the text.
-   * @param[in] lines The laid-out lines.
-   * @param[in,out] glyphPositions The positions of all the glyphs.
+   * @param[in] layoutSize The size of the laid out the text.
+   * @param[in,out] lines The laid-out lines.
    */
-  void Align( const LayoutParameters& layoutParameters,
-              const Vector<LineRun>& lines,
-              Vector<Vector2>& glyphPositions );
+  void Align( const Size& layoutSize,
+              Vector<LineRun>& lines );
 
 private: