X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=base%2Fdali-toolkit%2Finternal%2Fcontrols%2Fscroll-bar%2Fscroll-bar-impl.h;h=0ceaf447e7955fa821af3728dca8fa3d0e403c91;hp=585343c4ca0deec51b2ab3ef6d95399d428ac8ec;hb=cf3829e07db4fe95b8ccc0e684b66441cfe694d9;hpb=a881757839b7abb008873a68c67e17b3ba39669b diff --git a/base/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.h b/base/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.h index 585343c..0ceaf44 100755 --- a/base/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.h +++ b/base/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.h @@ -45,6 +45,14 @@ class ScrollBar : public ScrollComponentImpl public: + // Properties + enum + { + SCROLLBAR_PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, + SCROLLBAR_PROPERTY_END_INDEX = SCROLLBAR_PROPERTY_START_INDEX + 1000 ///< Reserving 1000 property indices + }; + + // Signals typedef Toolkit::ScrollBar::ScrollPositionNotifiedSignalType ScrollPositionNotifiedSignalType; public: @@ -70,14 +78,9 @@ public: void OnScrollConnectorSet( Toolkit::ScrollConnector connector ); /** - * @copydoc Toolkit::ScrollBar::SetBackgroundImage() - */ - void SetBackgroundImage( Image image, const Vector4& border ); - - /** * @copydoc Toolkit::ScrollBar::SetIndicatorImage() */ - void SetIndicatorImage( Image image, const Vector4& border ); + void SetIndicatorImage( Image image ); /** * @copydoc Toolkit::ScrollBar::GetScrollIndicator() @@ -90,6 +93,46 @@ public: void SetPositionNotifications( const std::vector& positions ); /** + * @copydoc Toolkit::ScrollBar::SetIndicatorHeightPolicy() + */ + void SetIndicatorHeightPolicy( Toolkit::ScrollBar::IndicatorHeightPolicy policy ); + + /** + * @copydoc Toolkit::ScrollBar::GetIndicatorHeightPolicy() + */ + Toolkit::ScrollBar::IndicatorHeightPolicy GetIndicatorHeightPolicy(); + + /** + * @copydoc Toolkit::ScrollBar::SetIndicatorFixedHeight() + */ + void SetIndicatorFixedHeight( float height ); + + /** + * @copydoc Toolkit::ScrollBar::GetIndicatorFixedHeight() + */ + float GetIndicatorFixedHeight(); + + /** + * @copydoc Toolkit::ScrollBar::SetIndicatorShowDuration() + */ + void SetIndicatorShowDuration( float durationSeconds ); + + /** + * @copydoc Toolkit::ScrollBar::GetIndicatorShowDuration() + */ + float GetIndicatorShowDuration(); + + /** + * @copydoc Toolkit::ScrollBar::SetIndicatorHideDuration() + */ + void SetIndicatorHideDuration( float durationSeconds ); + + /** + * @copydoc Toolkit::ScrollBar::GetIndicatorHideDuration() + */ + float GetIndicatorHideDuration(); + + /** * @copydoc Toolkit::ScrollBar::Show() */ void Show(); @@ -107,7 +150,25 @@ public: return mScrollPositionNotifiedSignal; } -private: // from ControlImpl + // Properties + + /** + * Called when a property of an object of this type is set. + * @param[in] object The object whose property is set. + * @param[in] index The property index. + * @param[in] value The new property value. + */ + static void SetProperty( BaseObject* object, Property::Index index, const Property::Value& value ); + + /** + * Called to retrieve a property of an object of this type. + * @param[in] object The object whose property is to be retrieved. + * @param[in] index The property index. + * @return The current value of the property. + */ + static Property::Value GetProperty( BaseObject* object, Property::Index index ); + +private: // from Control /** * @copydoc Toolkit::Control::OnInitialize @@ -148,27 +209,42 @@ private: */ bool OnPanGestureProcessTick(); + /** + * Handle SetProperty for scroll indicator height policy. + * @param[in] propertyValue The new property value. + */ + void OnIndicatorHeightPolicyPropertySet(Property::Value propertyValue); + private: - Constrainable mScrollPositionObject; ///< From mScrollConnector + Constrainable mScrollPositionObject; ///< From mScrollConnector + + ImageActor mBackground; ///< Background image of scroll bar. + ImageActor mIndicator; ///< Image of scroll indicator. + Animation mAnimation; ///< Scroll indicator Show/Hide Animation. - ImageActor mBackground; ///< Background image of scroll bar. - ImageActor mIndicator; ///< Image of scroll indicator. - Animation mAnimation; ///< Scroll indicator Show/Hide Animation. + float mIndicatorShowDuration; ///< The duration of scroll indicator show animation + float mIndicatorHideDuration; ///< The duration of scroll indicator hide animation - float mScrollStart; ///< Scroll Start position (start of drag) - Vector3 mGestureDisplacement; ///< Gesture Displacement. + float mScrollStart; ///< Scroll Start position (start of drag) + Vector3 mGestureDisplacement; ///< Gesture Displacement. - bool mIsPanning; ///< Whether the scroll bar is being panned. - float mCurrentScrollPosition; ///< The current scroll position updated by the pan gesture + bool mIsPanning; ///< Whether the scroll bar is being panned. + float mCurrentScrollPosition; ///< The current scroll position updated by the pan gesture - Timer mTimer; ///< The timer to process the pan gesture after the gesture is started. + Toolkit::ScrollBar::IndicatorHeightPolicy mIndicatorHeightPolicy; ///< The height policy of scroll indicator (variable or fixed) + float mIndicatorFixedHeight; ///< The fixed height of scroll indicator - Property::Index mPropertyIndicatorPosition; ///< Indicatore Position ("indicator-position") + Timer mTimer; ///< The timer to process the pan gesture after the gesture is started. - PropertyNotification mPositionNotification; ///< Stores the property notification used for scroll position changes + Property::Index mPropertyIndicatorPosition; ///< Indicatore Position ("indicator-position") + + PropertyNotification mPositionNotification; ///< Stores the property notification used for scroll position changes ScrollPositionNotifiedSignalType mScrollPositionNotifiedSignal; + + ActiveConstraint mIndicatorSizeConstraint; + ActiveConstraint mIndicatorPositionConstraint; }; } // namespace Internal