X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-controller.h;h=9612b1a4014779418798085adc741ff77b77fad1;hp=f99d5a99924e5e05143ca805cad49df998c7b8bc;hb=660728e83fd72194f53642fd74c09db561f88496;hpb=e35b08ebd60473aef7500601706f665ac8cf7d39 diff --git a/dali-toolkit/internal/text/text-controller.h b/dali-toolkit/internal/text/text-controller.h index f99d5a9..9612b1a 100644 --- a/dali-toolkit/internal/text/text-controller.h +++ b/dali-toolkit/internal/text/text-controller.h @@ -26,6 +26,7 @@ #include #include #include +#include namespace Dali { @@ -40,6 +41,7 @@ class Controller; class ControlInterface; class EditableControlInterface; class View; +class RenderingController; typedef IntrusivePtr ControllerPtr; @@ -297,24 +299,56 @@ public: // Configure the text controller. bool IsMultiLineEnabled() const; /** - * @copydoc Dali::Toolkit::Text::LayoutEngine::SetHorizontalAlignment() + * @brief Sets the text's horizontal alignment. + * + * @param[in] alignment The horizontal alignment. */ - void SetHorizontalAlignment( LayoutEngine::HorizontalAlignment alignment ); + void SetHorizontalAlignment( Layout::HorizontalAlignment alignment ); /** - * @copydoc Dali::Toolkit::Text::LayoutEngine::GetHorizontalAlignment() + * @copydoc ModelInterface::GetHorizontalAlignment() + */ + Layout::HorizontalAlignment GetHorizontalAlignment() const; + + /** + * @brief Sets the text's vertical alignment. + * + * @param[in] alignment The vertical alignment. */ - LayoutEngine::HorizontalAlignment GetHorizontalAlignment() const; + void SetVerticalAlignment( Layout::VerticalAlignment alignment ); /** - * @copydoc Dali::Toolkit::Text::LayoutEngine::SetVerticalAlignment() + * @copydoc ModelInterface::GetVerticalAlignment() + */ + Layout::VerticalAlignment GetVerticalAlignment() const; + + /** + * @brief Enable or disable the text elide. + * + * @param[in] enabled Whether to enable the text elide. */ - void SetVerticalAlignment( LayoutEngine::VerticalAlignment alignment ); + void SetTextElideEnabled( bool enabled ); /** - * @copydoc Dali::Toolkit::Text::LayoutEngine::GetVerticalAlignment() + * @copydoc ModelInterface::IsTextElideEnabled() */ - LayoutEngine::VerticalAlignment GetVerticalAlignment() const; + bool IsTextElideEnabled() const; + + /** + * @brief Sets input type to password + * + * @note The string is displayed continuous "*" + * + * @param[in] passwordInput True if password input is enabled. + */ + void SetInputModePassword( bool passwordInput ); + + /** + * @brief Returns whether the input mode type is set as password. + * + * @return True if input mode type is password + */ + bool IsInputModePassword(); public: // Update. @@ -443,18 +477,18 @@ public: // Default style & Input style float GetDefaultPointSize() const; /** - * @brief Set the text color + * @brief Sets the text's default color. * - * @param textColor The text color + * @param color The default color. */ - void SetTextColor( const Vector4& textColor ); + void SetDefaultColor( const Vector4& color ); /** - * @brief Retrieve the text color + * @brief Retrieves the text's default color. * - * @return The text color + * @return The default color. */ - const Vector4& GetTextColor() const; + const Vector4& GetDefaultColor() const; /** * @brief Set the text color @@ -499,22 +533,6 @@ public: // Default style & Input style const Vector4& GetShadowColor() const; /** - * @brief Sets the shadow's properties string. - * - * @note The string is stored to be recovered. - * - * @param[in] shadowProperties The shadow's properties string. - */ - void SetDefaultShadowProperties( const std::string& shadowProperties ); - - /** - * @brief Retrieves the shadow's properties string. - * - * @return The shadow's properties string. - */ - const std::string& GetDefaultShadowProperties() const; - - /** * @brief Set the underline color. * * @param[in] color color of underline. @@ -557,22 +575,6 @@ public: // Default style & Input style float GetUnderlineHeight() const; /** - * @brief Sets the underline's properties string. - * - * @note The string is stored to be recovered. - * - * @param[in] underlineProperties The underline's properties string. - */ - void SetDefaultUnderlineProperties( const std::string& underlineProperties ); - - /** - * @brief Retrieves the underline's properties string. - * - * @return The underline's properties string. - */ - const std::string& GetDefaultUnderlineProperties() const; - - /** * @brief Sets the emboss's properties string. * * @note The string is stored to be recovered. @@ -802,7 +804,7 @@ public: // Queries & retrieves. * * @return A reference to the layout engine. */ - LayoutEngine& GetLayoutEngine(); + Layout::Engine& GetLayoutEngine(); /** * @brief Return a view of the text. @@ -812,13 +814,6 @@ public: // Queries & retrieves. View& GetView(); /** - * @brief Query the current scroll position; the UI control is responsible for moving actors to this position. - * - * @return The scroll position. - */ - const Vector2& GetScrollPosition() const; - - /** * @copydoc Control::GetNaturalSize() */ Vector3 GetNaturalSize(); @@ -828,6 +823,32 @@ public: // Queries & retrieves. */ float GetHeightForWidth( float width ); + /** + * @brief Retrieves the text's model. + * + * @return A pointer to the text's model. + */ + const ModelInterface* const GetTextModel() const; + + /** + * @brief Used to get scrolled distance by user input + * + * @return Distance from last scroll offset to new scroll offset + */ + float GetScrollAmountByUserInput(); + + /** + * @brief Get latest scroll amount, control size and layout size + * + * This method is used to get information of control's scroll + * @param[out] scrollPosition The current scrolled position + * @param[out] controlHeight The size of a UI control + * @param[out] layoutHeight The size of a bounding box to layout text within. + * + * @return Whether the text scroll position is changed or not after last update. + */ + bool GetTextScrollInfo( float& scrollPosition, float& controlHeight, float& layoutHeight ); + public: // Relayout. /** @@ -840,6 +861,11 @@ public: // Relayout. */ UpdateTextType Relayout( const Size& size ); + /** + * @brief Request a relayout using the ControlInterface. + */ + void RequestRelayout(); + public: // Input style change signals. /**