Remove dependency to std::vector and property::value from property notification API
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / scroll-bar / scroll-bar.cpp
index 8f93e2c..e738495 100755 (executable)
@@ -1,20 +1,24 @@
-//
-// 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) 2015 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.
+ *
+ */
+
+// CLASS HEADER
 #include <dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h>
+
+// INTERNAL INCLUDES
 #include <dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.h>
 
 namespace Dali
@@ -23,25 +27,23 @@ namespace Dali
 namespace Toolkit
 {
 
-const char* const ScrollBar::SCROLL_POSITION_NOTIFIED_SIGNAL_NAME = "scroll-position-notified";
-
 ScrollBar::ScrollBar()
 {
 }
 
 ScrollBar::ScrollBar(Internal::ScrollBar& implementation)
-: Control( implementation )
+: ScrollComponent( implementation )
 {
 }
 
 ScrollBar::ScrollBar( Dali::Internal::CustomActor* internal )
-: Control( internal )
+: ScrollComponent( internal )
 {
   VerifyCustomActorPointer<Internal::ScrollBar>(internal);
 }
 
 ScrollBar::ScrollBar( const ScrollBar& scrollBar )
-: Control( scrollBar )
+: ScrollComponent( scrollBar )
 {
 }
 
@@ -68,29 +70,59 @@ ScrollBar::~ScrollBar()
 {
 }
 
-void ScrollBar::SetScrollConnector( ScrollConnector connector )
+void ScrollBar::SetIndicatorImage( Image image )
 {
-  GetImpl(*this).SetScrollConnector(connector);
+  GetImpl(*this).SetIndicatorImage(image);
 }
 
-void ScrollBar::SetBackgroundImage( Image image, const Vector4& border )
+Actor ScrollBar::GetScrollIndicator()
 {
-  GetImpl(*this).SetBackgroundImage(image, border);
+  return GetImpl(*this).GetScrollIndicator();
 }
 
-void ScrollBar::SetIndicatorImage( Image image, const Vector4& border )
+void ScrollBar::SetPositionNotifications( const Dali::Vector<float>& positions )
 {
-  GetImpl(*this).SetIndicatorImage(image, border);
+  GetImpl(*this).SetPositionNotifications(positions);
 }
 
-Actor ScrollBar::GetScrollIndicator()
+void ScrollBar::SetIndicatorHeightPolicy( ScrollBar::IndicatorHeightPolicy policy )
 {
-  return GetImpl(*this).GetScrollIndicator();
+  GetImpl(*this).SetIndicatorHeightPolicy(policy);
 }
 
-void ScrollBar::SetPositionNotifications( const std::vector<float>& positions )
+ScrollBar::IndicatorHeightPolicy ScrollBar::GetIndicatorHeightPolicy()
 {
-  GetImpl(*this).SetPositionNotifications(positions);
+  return GetImpl(*this).GetIndicatorHeightPolicy();
+}
+
+void ScrollBar::SetIndicatorFixedHeight( float height )
+{
+  GetImpl(*this).SetIndicatorFixedHeight(height);
+}
+
+float ScrollBar::GetIndicatorFixedHeight()
+{
+  return GetImpl(*this).GetIndicatorFixedHeight();
+}
+
+void ScrollBar::SetIndicatorShowDuration( float durationSeconds )
+{
+  GetImpl(*this).SetIndicatorShowDuration(durationSeconds);
+}
+
+float ScrollBar::GetIndicatorShowDuration()
+{
+  return GetImpl(*this).GetIndicatorShowDuration();
+}
+
+void ScrollBar::SetIndicatorHideDuration( float durationSeconds )
+{
+  GetImpl(*this).SetIndicatorHideDuration(durationSeconds);
+}
+
+float ScrollBar::GetIndicatorHideDuration()
+{
+  return GetImpl(*this).GetIndicatorHideDuration();
 }
 
 void ScrollBar::Show()