X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Ftext-controls%2Ftext-editor-impl.h;h=3c2cec44da19ea139d913ad547f2bd47c50d49ec;hp=2d7190b564268c9da6efc0944ec4eb7e294726ce;hb=6a9bd26564f5c34ba105b04cec4111523d294bec;hpb=754246a1c8812496ac70cdef21c122069ad21640 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 2d7190b..3c2cec4 100644 --- a/dali-toolkit/internal/controls/text-controls/text-editor-impl.h +++ b/dali-toolkit/internal/controls/text-controls/text-editor-impl.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_INTERNAL_TEXT_EDITOR_H /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,15 +20,18 @@ // EXTERNAL INCLUDES #include +#include // INTERNAL INCLUDES +#include #include +#include #include -#include #include #include #include #include +#include #include namespace Dali @@ -93,6 +96,11 @@ public: */ Toolkit::TextEditor::InputStyleChangedSignalType& InputStyleChangedSignal(); + /** + * @copydoc DevelTextEditor::ScrollStateChangedSignal() + */ + Toolkit::DevelTextEditor::ScrollStateChangedSignalType& ScrollStateChangedSignal(); + private: // From Control /** @@ -206,18 +214,18 @@ private: // Implementation void GetHandleImagePropertyValue( Property::Value& value, Text::HandleType handleType, Text::HandleImageType handleImageType ); /** - * @brief Enable or disable clipping. + * @brief Callback when keyboard is shown/hidden. * - * @param[in] size The area to clip within. + * @param[in] keyboardShown True if keyboard is shown. */ - void EnableClipping( const Vector2& size ); + void KeyboardStatusChanged( bool keyboardShown ); /** - * @brief Callback when keyboard is shown/hidden. + * @brief update scroll bar position * - * @param[in] keyboardShown True if keyboard is shown. + * If text scroll is occurred, create or update scroll bar position */ - void KeyboardStatusChanged( bool keyboardShown ); + void UpdateScrollBar(); /** * @brief Callback when TextEditor is touched @@ -235,6 +243,20 @@ 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(); + + /** + * @brief Callback function for ScrollBar indicator animation finished signal + * + * Emit ScrollBarStateChanged Signal and toggle mScrollStarted flag to false + */ + void OnScrollIndicatorAnimationFinished( Animation& animation ); + + /** * Construct a new TextEditor. */ TextEditor(); @@ -257,22 +279,32 @@ private: // Implementation void OnStageConnect( Dali::Actor actor ); private: // Data - // Signals Toolkit::TextEditor::TextChangedSignalType mTextChangedSignal; Toolkit::TextEditor::InputStyleChangedSignalType mInputStyleChangedSignal; + Toolkit::DevelTextEditor::ScrollStateChangedSignalType mScrollStateChangedSignal; + ImfManager mImfManager; Text::ControllerPtr mController; Text::RendererPtr mRenderer; Text::DecoratorPtr mDecorator; - Text::ClipperPtr mClipper; + Text::TextVerticalScrollerPtr mTextVerticalScroller; + Toolkit::Control mStencil; + Toolkit::ScrollBar mScrollBar; + Dali::Animation mAnimation; ///< Scroll indicator Show/Hide Animation. + Dali::TimePeriod mAnimationPeriod; std::vector mClippingDecorationActors; ///< Decoration actors which need clipping. Actor mRenderableActor; CallbackBase* mIdleCallback; + float mAlignmentOffset; + float mScrollAnimationDuration; int mRenderingBackend; bool mHasBeenStaged:1; + bool mScrollAnimationEnabled:1; + bool mScrollBarEnabled:1; + bool mScrollStarted:1; }; } // namespace Internal