X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=base%2Fdali-toolkit%2Fpublic-api%2Ftext%2Ftext-controller.h;h=42ef0d6835d16ab36375a13907fc07267689d6fa;hp=c03b2560feae3741e535633c83ed06e6c4b7d019;hb=20d79594120aa5db8769cff09a021e9641655bec;hpb=c813c4ae683991df95c5c2218811830c88292d30 diff --git a/base/dali-toolkit/public-api/text/text-controller.h b/base/dali-toolkit/public-api/text/text-controller.h index c03b256..42ef0d6 100644 --- a/base/dali-toolkit/public-api/text/text-controller.h +++ b/base/dali-toolkit/public-api/text/text-controller.h @@ -35,6 +35,8 @@ namespace Text { class Controller; +class LayoutEngine; + typedef IntrusivePtr ControllerPtr; /** @@ -54,8 +56,6 @@ public: */ static ControllerPtr New(); - // TODO - Layouting options e.g. single vs multi-line - /** * @brief Replaces any text previously set. * @@ -65,9 +65,25 @@ public: void SetText( const std::string& text ); /** + * @brief Triggers a relayout which updates View (if necessary). + * + * @note UI Controls are expected to minimize calls to this method e.g. call once after size negotiation. + * @param[in] size A the size of a bounding box to layout text within. + * @return True if the View was updated. + */ + bool Relayout( const Vector2& size ); + + /** + * @brief Return the layout engine. + * + * @return A reference to the layout engine. + */ + LayoutEngine& GetLayoutEngine(); + + /** * @brief Return a view of the text. * - * @return An interface to the view. + * @return A reference to the view. */ View& GetView(); @@ -86,10 +102,9 @@ private: Controller(); /** - * TODO - Move these with LayoutEngine + * @brief Populates the visual model. */ void UpdateVisualModel(); - void UpdateVisualPositions(); // Undefined Controller( const Controller& handle );