X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Flayouts%2Flayout-engine.h;h=42ff1aa8f9f3f28331597ec6c9a03c357297f98f;hb=630cf6828aba9a347d6ca52bc59b3ec4b60d21f8;hp=cdcd1567de3a8d264a89d83a60e55d1b563ba71e;hpb=3b1fb566901d21b8303d9be3308e3920f5182e6d;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/layouts/layout-engine.h b/dali-toolkit/internal/text/layouts/layout-engine.h index cdcd156..42ff1aa 100644 --- a/dali-toolkit/internal/text/layouts/layout-engine.h +++ b/dali-toolkit/internal/text/layouts/layout-engine.h @@ -51,6 +51,20 @@ public: 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. */ @@ -76,6 +90,46 @@ public: 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. @@ -91,7 +145,7 @@ public: Size& actualSize ); /** - * Re-lays out those lines with right to left characters. + * @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. * @@ -101,6 +155,19 @@ public: void ReLayoutRightToLeftLines( const LayoutParameters& layoutParameters, Vector& glyphPositions ); + /** + * @brief Aligns the laid out lines. + * + * @param[in] layoutParameters The parameters needed to layout the text. + * @param[in] layoutSize The size of the laid out the text. + * @param[in] lines The laid-out lines. + * @param[in,out] glyphPositions The positions of all the glyphs. + */ + void Align( const LayoutParameters& layoutParameters, + const Size& layoutSize, + const Vector& lines, + Vector& glyphPositions ); + private: // Undefined