Allow configurable duration to show or hide scroll indicator
[platform/core/uifw/dali-toolkit.git] / base / dali-toolkit / internal / controls / scroll-bar / scroll-bar-impl.h
index db26273..0ceaf44 100755 (executable)
@@ -1,21 +1,22 @@
 #ifndef __DALI_TOOLKIT_INTERNAL_SCROLL_BAR_H__
 #define __DALI_TOOLKIT_INTERNAL_SCROLL_BAR_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.
+ *
+ */
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/scrollable/scroll-component-impl.h>
@@ -47,7 +48,7 @@ public:
   // Properties
   enum
   {
-    SCROLLBAR_PROPERTY_START_INDEX = ControlImpl::CONTROL_PROPERTY_END_INDEX + 1,
+    SCROLLBAR_PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1,
     SCROLLBAR_PROPERTY_END_INDEX = SCROLLBAR_PROPERTY_START_INDEX + 1000 ///< Reserving 1000 property indices
   };
 
@@ -77,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()
@@ -117,6 +113,26 @@ public:
   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();
@@ -152,7 +168,7 @@ public:
   */
  static Property::Value GetProperty( BaseObject* object, Property::Index index );
 
-private: // from ControlImpl
+private: // from Control
 
   /**
    * @copydoc Toolkit::Control::OnInitialize
@@ -207,6 +223,9 @@ private:
   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.