X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Ftext%2Fdecorator%2Ftext-decorator.h;h=809be0d46f69e1ba6ae724e66d041eeafa12d2d4;hp=3ebc588415ece223d2df12c52eec48bd4931f28e;hb=0ae54c139d553cd05ba466a102ec18cf2cf11e81;hpb=43304152ae02a473296e85846bf8c1b08bd918ac diff --git a/dali-toolkit/public-api/text/decorator/text-decorator.h b/dali-toolkit/public-api/text/decorator/text-decorator.h index 3ebc588..809be0d 100644 --- a/dali-toolkit/public-api/text/decorator/text-decorator.h +++ b/dali-toolkit/public-api/text/decorator/text-decorator.h @@ -62,10 +62,25 @@ enum ActiveCursor // The state information for grab handle events enum GrabHandleState { - GRAB_HANDLE_MOVING, + GRAB_HANDLE_TAPPED, + GRAB_HANDLE_PRESSED, GRAB_HANDLE_RELEASED }; +// The set the selection-handle positions etc. +enum SelectionHandle +{ + PRIMARY_SELECTION_HANDLE, + SECONDARY_SELECTION_HANDLE, + SELECTION_HANDLE_COUNT +}; + +enum SelectionHandleState +{ + SELECTION_HANDLE_PRESSED, + SELECTION_HANDLE_RELEASED +}; + /** * @brief A Text Decorator is used to display cursors, handles, selection highlights and pop-ups. * @@ -250,6 +265,58 @@ public: */ Dali::Image GetGrabHandleImage() const; + /** + * @brief Sets whether the selection handles and highlight are active. + * + * @param[in] active True if the selection handles and highlight are active. + */ + void SetSelectionActive( bool active ); + + /** + * @brief Query whether the selection handles and highlight are active. + * + * @return True if the selection handles and highlight are active. + */ + bool IsSelectionActive() const; + + /** + * @brief Sets the position of a selection handle. + * + * @param[in] handle The handle to set. + * @param[in] x The x position relative to the top-left of the parent control. + * @param[in] y The y position relative to the top-left of the parent control. + * @param[in] cursorHeight The logical cursor height at this position. + */ + void SetPosition( SelectionHandle handle, float x, float y, float cursorHeight ); + + /** + * @brief Retrieves the position of a selection handle. + * + * @param[in] handle The handle to get. + * @param[out] x The x position relative to the top-left of the parent control. + * @param[out] y The y position relative to the top-left of the parent control. + * @param[out] cursorHeight The logical cursor height at this position. + */ + void GetPosition( SelectionHandle handle, float& x, float& y, float& cursorHeight ) const; + + /** + * @brief Sets the image for one of the selection handles. + * + * @param[in] handle The selection handle. + * @param[in] state A different image can be set for the pressed/released states. + * @param[in] image The image to use. + */ + void SetImage( SelectionHandle handle, SelectionHandleState state, Dali::Image image ); + + /** + * @brief Retrieves the image for a selection handle. + * + * @param[in] handle The selection handle. + * @param[in] state A different image can be set for the pressed/released states. + * @return The image. + */ + Dali::Image GetImage( SelectionHandle handle, SelectionHandleState state ) const; + protected: /**