X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Ftext-controls%2Ftext-editor-impl.h;h=09465a818e8e2c1c45a53a8719ca442e566981ae;hb=85fb989437f48082146d91e0f092f6b97d1a9df5;hp=cb404068561935cbfbd8ede0d0dcab4285a2ec82;hpb=260c832bfaa0294e74a4f96d321f149adf09a3ce;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 cb40406..09465a8 100644 --- a/dali-toolkit/internal/controls/text-controls/text-editor-impl.h +++ b/dali-toolkit/internal/controls/text-controls/text-editor-impl.h @@ -1,5 +1,5 @@ -#ifndef __DALI_TOOLKIT_INTERNAL_TEXT_EDITOR_H__ -#define __DALI_TOOLKIT_INTERNAL_TEXT_EDITOR_H__ +#ifndef DALI_TOOLKIT_INTERNAL_TEXT_EDITOR_H +#define DALI_TOOLKIT_INTERNAL_TEXT_EDITOR_H /* * Copyright (c) 2016 Samsung Electronics Co., Ltd. @@ -18,18 +18,19 @@ * */ +// EXTERNAL INCLUDES +#include + // INTERNAL INCLUDES #include #include -#include #include #include +#include #include +#include #include -// EXTERNAL INCLUDES -#include - namespace Dali { @@ -42,7 +43,7 @@ namespace Internal /** * @brief A control which renders a long text string with styles. */ -class TextEditor : public Control, public Text::ControlInterface +class TextEditor : public Control, public Text::ControlInterface, public Text::EditableControlInterface { public: @@ -157,15 +158,12 @@ private: // From Control // From ControlInterface /** - * @copydoc Text::ControlInterface::AddDecoration() - */ - virtual void AddDecoration( Actor& actor, bool needsClipping ); - - /** * @copydoc Text::ControlInterface::RequestTextRelayout() */ virtual void RequestTextRelayout(); +// From EditableControlInterface + /** * @copydoc Text::ControlInterface::TextChanged() */ @@ -181,6 +179,11 @@ private: // From Control */ virtual void InputStyleChanged( Text::InputStyle::Mask inputStyleMask ); + /** + * @copydoc Text::ControlInterface::AddDecoration() + */ + virtual void AddDecoration( Actor& actor, bool needsClipping ); + private: // Implementation /** @@ -203,14 +206,6 @@ private: // Implementation void GetHandleImagePropertyValue( Property::Value& value, Text::HandleType handleType, Text::HandleImageType handleImageType ); /** - * @brief Enable or disable clipping. - * - * @param[in] clipping True if clipping should be enabled. - * @param[in] size The area to clip within. - */ - void EnableClipping( bool clipping, const Vector2& size ); - - /** * @brief Callback when keyboard is shown/hidden. * * @param[in] keyboardShown True if keyboard is shown. @@ -233,6 +228,13 @@ private: // Implementation void OnIdleSignal(); /** + * @brief set RenderActor's position with new scrollPosition + * + * Apply updated scroll position or start scroll animation if VerticalScrollAnimation is enabled + */ + void ApplyScrollPosition(); + + /** * Construct a new TextEditor. */ TextEditor(); @@ -263,14 +265,18 @@ private: // Data Text::ControllerPtr mController; Text::RendererPtr mRenderer; Text::DecoratorPtr mDecorator; - Text::ClipperPtr mClipper; + Text::TextVerticalScrollerPtr mTextVerticalScroller; + Toolkit::Control mStencil; std::vector mClippingDecorationActors; ///< Decoration actors which need clipping. Actor mRenderableActor; CallbackBase* mIdleCallback; + float mAlignmentOffset; + float mScrollAnimationDuration; int mRenderingBackend; bool mHasBeenStaged:1; + bool mScrollAnimationEnabled:1; }; } // namespace Internal @@ -299,4 +305,4 @@ inline const Toolkit::Internal::TextEditor& GetImpl( const Toolkit::TextEditor& } // namespace Dali -#endif // __DALI_TOOLKIT_INTERNAL_TEXT_EDITOR_H__ +#endif // DALI_TOOLKIT_INTERNAL_TEXT_EDITOR_H