X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Fscroll-bar%2Fscroll-bar.cpp;h=847548263da939c4f13d411020f16666b4e9e6f7;hp=8f93e2ca601133808dfde6dc543151fc42031fd3;hb=1c3cb32385174b852b8d57b531625f733238f664;hpb=818994dc0acac601b0b27c0b715259b504ef4ceb diff --git a/dali-toolkit/public-api/controls/scroll-bar/scroll-bar.cpp b/dali-toolkit/public-api/controls/scroll-bar/scroll-bar.cpp index 8f93e2c..8475482 100755 --- a/dali-toolkit/public-api/controls/scroll-bar/scroll-bar.cpp +++ b/dali-toolkit/public-api/controls/scroll-bar/scroll-bar.cpp @@ -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) 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. + * + */ + +// CLASS HEADER #include + +// INTERNAL INCLUDES #include 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::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 std::vector& 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& 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()