X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Ftext-controls%2Ftext-editor-impl.h;h=d0609b60d1161e9359915d2a678a81993e69e74c;hb=4bcf7c57006f4241565c31c13dde06b8eea99855;hp=6be336bcb1e8177847a15c6d508baac09feabd84;hpb=d0b0cfa4a44953be9af9128885eb6ef5d83a214e;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/controls/text-controls/text-editor-impl.h b/dali-toolkit/internal/controls/text-controls/text-editor-impl.h index 6be336b..d0609b6 100644 --- a/dali-toolkit/internal/controls/text-controls/text-editor-impl.h +++ b/dali-toolkit/internal/controls/text-controls/text-editor-impl.h @@ -25,11 +25,13 @@ #include // INTERNAL INCLUDES +#include #include #include #include #include #include +#include #include #include #include @@ -47,7 +49,7 @@ namespace Internal /** * @brief A control which renders a long text string with styles. */ -class TextEditor : public Control, public Text::ControlInterface, public Text::EditableControlInterface, public Text::SelectableControlInterface +class TextEditor : public Control, public Text::ControlInterface, public Text::EditableControlInterface, public Text::SelectableControlInterface, public Text::AnchorControlInterface { public: /** @@ -86,6 +88,11 @@ public: DevelTextEditor::MaxLengthReachedSignalType& MaxLengthReachedSignal(); /** + * @copydoc Dali::Toollkit::TextEditor::AnchorClickedSignal() + */ + DevelTextEditor::AnchorClickedSignalType& AnchorClickedSignal(); + + /** * Connects a callback function with the object's signals. * @param[in] object The object providing the signal. * @param[in] tracker Used to disconnect the signal. @@ -204,7 +211,7 @@ private: // From Control /** * @copydoc Text::EditableControlInterface::TextChanged() */ - void TextChanged() override; + void TextChanged(bool immediate) override; /** * @copydoc Text::EditableControlInterface::MaxLengthReached() @@ -275,7 +282,15 @@ public: /** * @copydoc Text::EditableControlInterface::SetEditable() */ - void SetEditable(bool editable) override; + void SetEditable(bool editable) override; + + // From AnchorControlInterface + + /** + * @copydoc Text::AnchorControlInterface::AnchorClicked() + */ + void AnchorClicked(const std::string& href) override; + Text::ControllerPtr getController(); private: // Implementation @@ -328,6 +343,11 @@ private: // Implementation void OnIdleSignal(); /** + * @brief Emits TextChanged signal. + */ + void EmitTextChangedSignal(); + + /** * @brief set RenderActor's position with new scrollPosition * * Apply updated scroll position or start scroll animation if VerticalScrollAnimation is enabled @@ -356,6 +376,14 @@ private: // Implementation TextEditor& operator=(const TextEditor& rhs); /** + * @brief Resize actor to the given size. + * + * @param[in] actor The actor to be resized. + * @param[in] size Size to change. + */ + void ResizeActor(Actor& actor, const Vector2& size); + + /** * @brief Render view, create and attach actor(s) to this text editor. */ void RenderText(Text::Controller::UpdateTextType updateTextType); @@ -369,6 +397,7 @@ private: // Data Toolkit::TextEditor::InputStyleChangedSignalType mInputStyleChangedSignal; Toolkit::TextEditor::ScrollStateChangedSignalType mScrollStateChangedSignal; Toolkit::DevelTextEditor::MaxLengthReachedSignalType mMaxLengthReachedSignal; + Toolkit::DevelTextEditor::AnchorClickedSignalType mAnchorClickedSignal; InputMethodContext mInputMethodContext; Text::ControllerPtr mController; @@ -393,12 +422,13 @@ private: // Data bool mScrollAnimationEnabled : 1; bool mScrollBarEnabled : 1; bool mScrollStarted : 1; + bool mTextChanged : 1; ///< If true, emits TextChangedSignal in next OnRelayout(). - struct AccessibleImpl : public Control::Impl::AccessibleImpl, + struct AccessibleImpl : public DevelControl::AccessibleImpl, public virtual Dali::Accessibility::Text, public virtual Dali::Accessibility::EditableText { - using Control::Impl::AccessibleImpl::AccessibleImpl; + using DevelControl::AccessibleImpl::AccessibleImpl; std::string GetName() override; std::string GetText(size_t startOffset, size_t endOffset) override;