X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=capi%2Fdali-toolkit%2Fpublic-api%2Fcontrols%2Fscrollable%2Fscroll-connector.h;h=1e64e7e9438c7af70e46a6f5dff425a504741ad5;hb=6af5947bc891acb3ee308d9bca5f848fb69a1744;hp=82517a322021ed0cc14d23b4c55685ad111616a4;hpb=30f6ca1e541089b19f2b349a8a12d8a5bcaf2f9e;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/capi/dali-toolkit/public-api/controls/scrollable/scroll-connector.h b/capi/dali-toolkit/public-api/controls/scrollable/scroll-connector.h index 82517a3..1e64e7e 100644 --- a/capi/dali-toolkit/public-api/controls/scrollable/scroll-connector.h +++ b/capi/dali-toolkit/public-api/controls/scrollable/scroll-connector.h @@ -1,21 +1,22 @@ #ifndef __DALI_TOOLKIT_SCROLL_CONNECTOR_H__ #define __DALI_TOOLKIT_SCROLL_CONNECTOR_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_CONNECTOR_MODULE @@ -69,6 +70,9 @@ public: static const char* const DOMAIN_CHANGED_SIGNAL_NAME; ///< "domain-changed" signal name typedef SignalV2< void ( float min, float max, float size ) > DomainChangedSignalType; + static const char* const SCROLL_POSITION_CHANGED_SIGNAL_NAME; ///< "scroll-position-changed" signal name + typedef SignalV2< void ( float position ) > ScrollPositionChangedSignalType; + /** * Create a ScrollConnector. * @return A handle to a newly allocated ScrollConnector. @@ -92,18 +96,20 @@ public: using Dali::BaseHandle::operator=; /** - * Virtual destructor. + * @brief Destructor + * + * This is non-virtual since derived Handle types must not contain data or virtual methods. */ - virtual ~ScrollConnector(); + ~ScrollConnector(); /** - * Downcast a BaseHandle to ScrollConnector handle. + * @brief Downcast a BaseHandle to ScrollConnector handle. * @return A handle to a ScrollConnector or an empty handle. */ static ScrollConnector DownCast( BaseHandle handle ); /** - * Set the scroll domain, corresponding to the start & end position, and size of the scrollable content in actor coordinates. + * @brief Set the scroll domain, corresponding to the start & end position, and size of the scrollable content in actor coordinates. * @param[in] min The minimum scroll position limit. * @param[in] max The maximum scroll position limit. * @param[in] length The length of the scrollable content in actor coordinates. @@ -111,30 +117,50 @@ public: void SetScrollDomain( float min, float max, float length ); /** - * Retrieve the min limit. + * @brief Retrieve the min limit. * @return The minimum value. */ float GetMinLimit() const; /** - * Retrieve the max limit. + * @brief Retrieve the max limit. * @return The maximum value. */ float GetMaxLimit() const; /** - * Retrieve the length of the scrollable content in actor coordinates. + * @brief Retrieve the length of the scrollable content in actor coordinates. * @return The length of the scrollable content. */ float GetContentLength() const; /** - * Signal emitted after the SetScrollDomain() method has been called. + * @brief Set the scroll position. + * + * This will set the "scroll-position" property and emit the ScrollPositionChanged signal. + * + * @param[in] position The scroll position. + */ + void SetScrollPosition( float position ); + + /** + * @brief Retrieve the scroll position. + * @return The scroll position. + */ + float GetScrollPosition() const; + + /** + * @brief Signal emitted after the SetScrollPosition() method has been called. + */ + ScrollConnector::ScrollPositionChangedSignalType& ScrollPositionChangedSignal(); + + /** + * @brief Signal emitted after the SetScrollDomain() method has been called. */ ScrollConnector::DomainChangedSignalType& DomainChangedSignal(); /** - * Retrieve the object which provides the "scroll-position" property. + * @brief Retrieve the object which provides the "scroll-position" property. * @return The scroll-position object. */ Constrainable GetScrollPositionObject() const;