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%2Fscrollable%2Fscroll-view%2Fscroll-view.h;h=25ce6c867af24221aa7b3cfc2f549398e38b20bc;hp=79a42f301794334b6f1ceae2ce465c580b0ade6e;hb=a342499604e471b0e0d80eac30eb28e898b06c69;hpb=30f6ca1e541089b19f2b349a8a12d8a5bcaf2f9e diff --git a/capi/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h b/capi/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h index 79a42f3..25ce6c8 100644 --- a/capi/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h +++ b/capi/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h @@ -1,21 +1,22 @@ #ifndef __DALI_TOOLKIT_SCROLL_VIEW_H__ #define __DALI_TOOLKIT_SCROLL_VIEW_H__ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Flora License, Version 1.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://floralicense.org/license/ -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an AS IS BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// +/* + * Copyright (c) 2014 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ /** * @addtogroup CAPI_DALI_TOOLKIT_SCROLL_VIEW_MODULE @@ -136,11 +137,6 @@ public: Ruler(); /** - * @brief Destructor - A reference counted object may only be deleted by calling Unreference(). - */ - virtual ~Ruler(); - - /** * @brief Snaps (x) in accordance to the ruler settings. * * @param[in] x The input value on the ruler to be snapped. @@ -295,6 +291,13 @@ public: protected: + /** + * @brief Destructor - A reference counted object may only be deleted by calling Unreference(). + */ + virtual ~Ruler(); + +protected: + RulerType mType; ///< Type of Ruler (Fixed or Free). bool mEnabled; ///< If the ruler is enabled. RulerDomain mDomain; ///< The domain of the ruler. @@ -489,11 +492,11 @@ public: ScrollView& operator=( const ScrollView& handle ); /** - * @brief Virtual destructor. + * @brief Destructor * - * Dali::Object derived classes typically do not contain member data. + * This is non-virtual since derived Handle types must not contain data or virtual methods. */ - virtual ~ScrollView(); + ~ScrollView(); /** * @brief Create an initialized ScrollView. @@ -700,6 +703,7 @@ public: void SetWrapMode(bool enable); /** + * @deprecated * @brief Gets the current refresh interval in milliseconds. * * @return Current refresh interval in milliseconds @@ -707,6 +711,7 @@ public: int GetRefreshInterval() const; /** + * @deprecated * @brief Sets the refresh interval in milliseconds. * * The refresh interval is a notification signal @@ -720,6 +725,23 @@ public: void SetRefreshInterval(int milliseconds); /** + * @brief Gets the current distance needed to scroll for ScrollUpdatedSignal to be emitted + * + * @return Current scroll update distance + */ + int GetScrollUpdateDistance() const; + + /** + * @brief Sets the distance needed to scroll for ScrollUpdatedSignal to be emitted + * + * The scroll update distance tells ScrollView how far to move before ScrollUpdatedSignal the informs application. + * Each time the ScrollView crosses this distance the signal will be emitted + * + * @param[in] distance The distance for ScrollView to move before emitting update signal + */ + void SetScrollUpdateDistance(int distance); + + /** * @brief Returns state of Axis Auto Lock mode. * * @return Whether Axis Auto Lock mode has been enabled or not. @@ -806,6 +828,36 @@ public: void SetFlickSpeedCoefficient(float speed); /** + * @brief Returns the minimum pan distance required for a flick gesture in pixels + * + * @return Minimum pan distance vector with separate x and y distance + */ + Vector2 GetMinimumDistanceForFlick() const; + + /** + * @brief Sets the minimum pan distance required for a flick in pixels + * + * Takes a Vector2 containing separate x and y values. As long as the pan distance exceeds one of these axes a flick will be allowed + * + * @param[in] distance The minimum pan distance for a flick + */ + void SetMinimumDistanceForFlick( const Vector2& distance ); + + /** + * @brief Returns the minimum pan speed required for a flick gesture in pixels per second + * + * @return Minimum pan speed + */ + float GetMinimumSpeedForFlick() const; + + /** + * @brief Sets the minimum pan speed required for a flick in pixels per second + * + * @param[in] speed The minimum pan speed for a flick + */ + void SetMinimumSpeedForFlick( float speed ); + + /** * @brief Gets the maximum flick speed setting for ScrollView when * flicking in free panning mode. * @@ -858,6 +910,14 @@ public: Vector3 GetCurrentScrollPosition() const; /** + * @brief Sets the current scroll position, overriding current scroll animations. If panning is currently taking place + * SetScrollPosition will have no effect. Try to ensure panning has stopped before calling this function. + * + * @param[in] position The new scroll position to set. + */ + void SetScrollPosition(const Vector3& position); + + /** * @brief Retrieves current scroll scale. * * @returns The current scroll scale.