X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=capi%2Fdali-toolkit%2Fpublic-api%2Fcontrols%2Fscroll-bar%2Fscroll-bar.h;h=4e150cdfc92f98d9fbe2397b2fcb6cb3d1eec991;hp=12aa98bd44bcdcebf6edc08c301371c779906f6c;hb=1f49cc894b0c8c769f4b34f3a0e7084ce686b664;hpb=b660eac1a9b2cbfc45c7d7c12f60149c5144f69e diff --git a/capi/dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h b/capi/dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h index 12aa98b..4e150cd 100755 --- a/capi/dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h +++ b/capi/dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h @@ -49,9 +49,22 @@ public: static const char* const SCROLL_POSITION_NOTIFIED_SIGNAL_NAME; ///< "scroll-position-notified" signal name typedef SignalV2< void ( float ) > ScrollPositionNotifiedSignalType; + // Properties + static const Property::Index PROPERTY_INDICATOR_HEIGHT_POLICY; ///< name "indicator-height-policy", type STRING + static const Property::Index PROPERTY_INDICATOR_FIXED_HEIGHT; ///< name "indicator-fixed-height", type FLOAT + public: /** + * @brief Indicator height policy. + */ + enum IndicatorHeightPolicy + { + Variable = 0, ///< Variable height changed dynamically according to the length of scroll content + Fixed ///< Fixed height regardless of the length of scroll content + }; + + /** * @brief Create an uninitialized ScrollBar; this can be initialized with ScrollBar::New() * Calling member functions with an uninitialized Dali::Object is not allowed. * or horizontally (false) @@ -98,8 +111,23 @@ public: * * @param[in] image The image to cover background * @param[in] border The nine patch border for the image. + * + * @deprecated Use Control::SetBackground() */ - void SetBackgroundImage( Image image, const Vector4& border ); + void SetBackgroundImage( Image image, const Vector4& border ); + + /** + * @brief Sets the image for the indicator of scroll bar. + * + * @pre The scroll bar actor has been initialised. + * + * The indicator image is resized (stretched according to scale settings), + * to reflect the size of the scroll indicator and minimum/maximum limits + * of the scroll position. + * + * @param[in] image The image of indicator that moves to indicate the current scroll position. + */ + void SetIndicatorImage( Image image ); /** * @brief Sets the image for the indicator of scroll bar. @@ -112,6 +140,8 @@ public: * * @param[in] image The image of indicator that moves to indicate the current scroll position. * @param[in] border The nine patch border for the image. + * + * @deprecated Use the new 9-patch API */ void SetIndicatorImage( Image image, const Vector4& border ); @@ -120,7 +150,7 @@ public: * * @pre The scroll bar actor has been initialised. * - * The indicator indicates the current scroll position of the scrollable content. + * @return The indicator indicates the current scroll position of the scrollable content. */ Actor GetScrollIndicator(); @@ -135,6 +165,40 @@ public: void SetPositionNotifications( const std::vector& positions ); /** + * @brief Sets the height policy of scroll indicator to have either variable or fixed height. + * + * @pre The scroll bar actor has been initialised. + * + * @param[in] policy The height policy of scroll indicator + */ + void SetIndicatorHeightPolicy( IndicatorHeightPolicy policy ); + + /** + * @brief Gets the height policy of scroll indicator. + * + * @return The height policy of scroll indicator + */ + IndicatorHeightPolicy GetIndicatorHeightPolicy(); + + /** + * @brief Sets the fixed height of scroll indicator. + * Normally the height of scroll indicator is changed dynamically according to the length of scroll content. + * However, when the height policy of scroll indicator is set to be fixed, the height will keep fixed + * regardless of the length of scroll content. + * + * @pre The scroll bar actor has been initialised. + * + * @param[in] height The fixed height of the scroll indicator + */ + void SetIndicatorFixedHeight( float height ); + + /** + * @brief Gets the fix height of scroll indicator. + * @return The fixed height of the scroll indicator + */ + float GetIndicatorFixedHeight(); + + /** * @brief Shows the scroll indicator */ void Show();