X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Fdecorator%2Ftext-decorator.h;h=f0bfd396c63bfa707f7303e1adaf5a122e1040d4;hb=826a077bb3183b5d317bfb22e14ab4e217d26f40;hp=4038d3f5bfb331c6b29d52cc2b0c39de0c342676;hpb=eea53605c5acb244aebb72d75bdd9b3a68a9678a;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/decorator/text-decorator.h b/dali-toolkit/internal/text/decorator/text-decorator.h index 4038d3f..f0bfd39 100644 --- a/dali-toolkit/internal/text/decorator/text-decorator.h +++ b/dali-toolkit/internal/text/decorator/text-decorator.h @@ -22,6 +22,7 @@ #include #include #include +#include namespace Dali { @@ -86,7 +87,11 @@ enum SelectionHandleState * @brief A Text Decorator is used to display cursors, handles, selection highlights and pop-ups. * * The decorator is responsible for clipping decorations which are positioned outside of the parent area. - * In some cases the decorations will be moved or flipped around, to maintain visibility on-screen. + * + * The Popup decoration will be positioned either above the Grab handle or above the selection handles but if doing so + * would cause the Popup to exceed the Decoration Bounding Box ( see SetBoundingBox API ) the the Popup will be repositioned below the handle(s). + * + * Selection handles will be flipped around to ensure they do not exceed the Decoration Bounding Box. ( Stay visible ). * * Decorator components forward input events to a controller class through an observer interface. * The controller is responsible for selecting which components are active. @@ -162,8 +167,9 @@ public: * @brief The decorator waits until a relayout before creating actors etc. * * @param[in] size The size of the parent control after size-negotiation. + * @param[in] scrollPosition The cursor, grab-handle positions etc. should be offset by this. */ - void Relayout( const Dali::Vector2& size ); + void Relayout( const Dali::Vector2& size, const Vector2& scrollPosition ); /** * @brief Sets which of the cursors are active. @@ -201,20 +207,6 @@ public: void GetPosition( Cursor cursor, float& x, float& y, float& height ) const; /** - * @brief Sets the image for a cursor. - * - * @param[in] image The image to use. - */ - void SetCursorImage( Dali::Image image ); - - /** - * @brief Retrieves the image for a cursor. - * - * @return The cursor image. - */ - Dali::Image GetCursorImage() const; - - /** * @brief Sets the color for a cursor. * * @param[in] cursor Whether this color is for the primary or secondary cursor. @@ -349,6 +341,35 @@ public: */ Dali::Image GetImage( SelectionHandle handle, SelectionHandleState state ) const; + /** + * @brief Adds a quad to the existing selection highlights. + * + * @param[in] x1 The top-left x position. + * @param[in] y1 The top-left y position. + * @param[in] x2 The bottom-right x position. + * @param[in] y3 The bottom-right y position. + */ + void AddHighlight( float x1, float y1, float x2, float y2 ); + + /** + * @brief Removes all of the previously added highlights. + */ + void ClearHighlights(); + + /** + * @brief Set the Selection Popup to show or hide via the active flaf + * @param[in] active true to show, false to hide + */ + void SetPopupActive( bool active ); + + /** + * @brief Query whether the Selection Popup is active. + * + * @return True if the Selection Popup should be active. + */ + bool IsPopupActive() const; + + protected: /**