#include <dali-toolkit/public-api/controls/page-turn-view/page-factory.h>
#include <dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h>
-#include <dali-toolkit/public-api/controls/scrollable/scroll-connector.h>
+#include <dali-toolkit/public-api/controls/scrollable/scroll-component.h>
+#include <dali-toolkit/public-api/controls/scrollable/scroll-component-impl.h>
#include <dali-toolkit/public-api/controls/scrollable/item-view/album-layout.h>
#include <dali-toolkit/public-api/controls/scrollable/item-view/depth-layout.h>
#include <dali-toolkit/public-api/controls/scrollable/item-view/navigation-layout.h>
}
ScrollBar::ScrollBar()
-: ControlImpl(true/*requires touch*/),
- mScrollStart(0.0f)
+: mScrollStart(0.0f)
{
}
EnableGestureDetection(Gesture::Type(Gesture::Pan));
}
-void ScrollBar::SetScrollConnector( Toolkit::ScrollConnector connector )
+void ScrollBar::OnScrollConnectorSet( Toolkit::ScrollConnector oldConnector )
{
- if(mScrollConnector)
+ if( oldConnector )
{
- mScrollConnector.DomainChangedSignal().Disconnect(this, &ScrollBar::OnScrollDomainChanged);
+ oldConnector.DomainChangedSignal().Disconnect(this, &ScrollBar::OnScrollDomainChanged);
+
+ mScrollPositionObject.Reset();
}
- mScrollConnector = connector;
- mScrollPositionObject = mScrollConnector.GetScrollPositionObject();
+ if( mScrollConnector )
+ {
+ mScrollPositionObject = mScrollConnector.GetScrollPositionObject();
- ApplyConstraints();
- mScrollConnector.DomainChangedSignal().Connect(this, &ScrollBar::OnScrollDomainChanged);
+ ApplyConstraints();
+ mScrollConnector.DomainChangedSignal().Connect(this, &ScrollBar::OnScrollDomainChanged);
+ }
}
void ScrollBar::SetBackgroundImage( Image image, const Vector4& border )
//
// INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/control-impl.h>
+#include <dali-toolkit/public-api/controls/scrollable/scroll-component-impl.h>
#include <dali-toolkit/public-api/controls/scrollable/scroll-connector.h>
#include <dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h>
* ScrollBar is a UI component that can be added to the scrollable controls
* indicating the current scroll position of the scrollable content.
*/
-class ScrollBar : public ControlImpl
+class ScrollBar : public ScrollComponentImpl
{
public:
static Toolkit::ScrollBar New();
/**
- * @copydoc Toolkit::ScrollBar::SetScrollConnector()
+ * @copydoc Toolkit::ScrollComponentImpl::OnScrollConnectorSet()
*/
- void SetScrollConnector( Toolkit::ScrollConnector connector );
+ void OnScrollConnectorSet( Toolkit::ScrollConnector connector );
/**
* @copydoc Toolkit::ScrollBar::SetBackgroundImage()
private:
- Toolkit::ScrollConnector mScrollConnector; ///< Connects scroll bar with the scrollable container.
Constrainable mScrollPositionObject; ///< From mScrollConnector
ImageActor mBackground; ///< Background image of scroll bar.
//
// INTERNAL INCLUDES
-#include <dali-toolkit/internal/controls/scroll-component/scroll-component-impl.h>
+#include <dali-toolkit/public-api/controls/scrollable/scroll-component-impl.h>
#include <dali-toolkit/internal/controls/scrollable/scrollable-impl.h>
#include <dali-toolkit/internal/controls/scroll-component/scroll-bar-internal.h>
-#include <dali-toolkit/public-api/controls/control-impl.h>
namespace Dali
{
* ScrollBarInternal is a UI component that can be added to the sides of the ScrollView
* indicating the current scroll position within the domain.
*/
-class ScrollBarInternal : public ScrollComponent
+class ScrollBarInternal : public ScrollComponentImpl
{
public:
//
// INTERNAL INCLUDES
-#include <dali-toolkit/internal/controls/scroll-component/scroll-component.h>
+#include <dali-toolkit/public-api/controls/scrollable//scroll-component.h>
#include <dali-toolkit/public-api/controls/scrollable/scrollable.h>
namespace Dali DALI_IMPORT_API
+++ /dev/null
-//
-// 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.
-//
-
-// CLASS HEADER
-#include <dali-toolkit/internal/controls/scroll-component/scroll-component-impl.h>
-#include <dali-toolkit/internal/controls/scroll-component/scroll-bar-internal.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace Internal
-{
-
-namespace
-{
-BaseHandle Create()
-{
- // empty handle as we cannot create ScrollComponent
- return Toolkit::ScrollComponent::New();
-}
-
-TypeRegistration mType( typeid(Toolkit::ScrollComponent), typeid(Toolkit::Control), Create );
-
-}
-
-ScrollComponent::ScrollComponent()
-: ControlImpl(true/*requires touch*/)
-{
-
-}
-
-ScrollComponent::~ScrollComponent()
-{
-}
-
-Toolkit::ScrollComponent ScrollComponent::New(Toolkit::Scrollable& scrollable, Toolkit::Scrollable::ScrollComponentType type)
-{
- Toolkit::ScrollComponent instance;
-
- switch(type)
- {
- case Toolkit::Scrollable::VerticalScrollBar:
- {
- instance = static_cast<Toolkit::ScrollComponent>(Toolkit::ScrollBarInternal::New(scrollable, true));
- break;
- }
- case Toolkit::Scrollable::HorizontalScrollBar:
- {
- instance = static_cast<Toolkit::ScrollComponent>(Toolkit::ScrollBarInternal::New(scrollable, false));
- break;
- }
- default:
- {
- DALI_ASSERT_ALWAYS(true && "Unrecognized component type");
- }
- }
-
- return instance;
-}
-
-
-} // namespace Internal
-
-} // namespace Toolkit
-
-} // namespace Dali
+++ /dev/null
-#ifndef __DALI_TOOLKIT_INTERNAL_SCROLL_COMPONENTS_H__
-#define __DALI_TOOLKIT_INTERNAL_SCROLL_COMPONENTS_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.
-//
-
-// INTERNAL INCLUDES
-#include <dali-toolkit/internal/controls/scroll-component/scroll-component.h>
-
-#include <dali-toolkit/public-api/controls/control-impl.h>
-#include <dali-toolkit/public-api/controls/scrollable/scrollable.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace Internal
-{
-
-class ScrollComponent;
-
-typedef IntrusivePtr<ScrollComponent> ScrollComponentPtr;
-
-
-/**
- * Base class for derived ScrollComponents
- * ScrollComponents such as ScrollBarInternal are derived from this class.
- * To instantiate these ScrollBarInternals and other derived components.
- */
-class ScrollComponent : public ControlImpl
-{
-public:
-
- /**
- * Create an initialized ScrollComponent
- * @param[in] scrollable reference to ScrollView implementation
- * @param[in] type the type of scroll component to create.
- * @return A pointer to the created ScrollComponent.
- */
- static Toolkit::ScrollComponent New(Toolkit::Scrollable& scrollable, Toolkit::Scrollable::ScrollComponentType type);
-
- /**
- * Called when the scroll component is disconnected from a Scrollable container.
- */
- virtual void OnDisconnect()
- {
- }
-
-protected:
-
- /**
- * Construct a new ScrollComponent.
- */
- ScrollComponent();
-
- /**
- * A reference counted object may only be deleted by calling Unreference()
- */
- virtual ~ScrollComponent();
-
-private:
-
- // Undefined
- ScrollComponent(const ScrollComponent&);
-
- // Undefined
- ScrollComponent& operator=(const ScrollComponent& rhs);
-
-};
-
-} // namespace Internal
-
-// Helpers for public-api forwarding methods
-
-inline Toolkit::Internal::ScrollComponent& GetImpl(Toolkit::ScrollComponent& scrollComponent)
-{
- DALI_ASSERT_ALWAYS(scrollComponent);
-
- Dali::RefObject& handle = scrollComponent.GetImplementation();
-
- return static_cast<Toolkit::Internal::ScrollComponent&>(handle);
-}
-
-inline const Toolkit::Internal::ScrollComponent& GetImpl(const Toolkit::ScrollComponent& scrollComponent)
-{
- DALI_ASSERT_ALWAYS(scrollComponent);
-
- const Dali::RefObject& handle = scrollComponent.GetImplementation();
-
- return static_cast<const Toolkit::Internal::ScrollComponent&>(handle);
-}
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif // __DALI_TOOLKIT_INTERNAL_SCROLL_COMPONENTS_H__
// INTERNAL INCLUDES
#include <dali/public-api/events/mouse-wheel-event.h>
#include <dali-toolkit/public-api/controls/scrollable/item-view/item-factory.h>
-#include <dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.h>
#include <dali-toolkit/internal/controls/scrollable/scroll-connector-impl.h>
using namespace std;
if(!mAddingItems)
{
// We don't want to do this downcast check for any item added by ItemView itself.
- Dali::Toolkit::ScrollBar scrollBar = Dali::Toolkit::ScrollBar::DownCast(child);
- if(scrollBar)
+ Dali::Toolkit::ScrollComponent scrollComponent = Dali::Toolkit::ScrollComponent::DownCast(child);
+ if(scrollComponent)
{
// Set the scroll connector when scroll bar is being added
- scrollBar.SetScrollConnector(mScrollConnector);
+ scrollComponent.SetScrollConnector(mScrollConnector);
}
}
}
// INTERNAL INCLUDES
#include <dali/public-api/events/mouse-wheel-event.h>
-#include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.h>
#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-constraints.h>
+#include <dali-toolkit/public-api/controls/scrollable/scroll-component-impl.h>
+#include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.h>
#include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-effect-impl.h>
-#include <dali-toolkit/internal/controls/scroll-component/scroll-component-impl.h>
#include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.h>
// TODO: Change to two class system:
{
// Create ScrollComponent
Toolkit::Scrollable scrollable = Toolkit::Scrollable::DownCast(Self());
- Toolkit::ScrollComponent scrollComponent = ScrollComponent::New(scrollable, type);
- Toolkit::Internal::ScrollComponent& component = static_cast<Toolkit::Internal::ScrollComponent&>(scrollComponent.GetImplementation());
+ Toolkit::ScrollComponent scrollComponent = NewScrollComponent(scrollable, type);
+ Toolkit::ScrollComponentImpl& component = static_cast<Toolkit::ScrollComponentImpl&>(scrollComponent.GetImplementation());
ScrollComponentPtr componentPtr(&component);
mComponents[type] = componentPtr;
{
ScrollComponentPtr component = pair->second;
- // Disconnect the scroll component first.
- component->OnDisconnect();
-
// Destroy ScrollComponent.
mComponents.erase( type );
}
return connected;
}
+Toolkit::ScrollComponent Scrollable::NewScrollComponent(Toolkit::Scrollable& scrollable, Toolkit::Scrollable::ScrollComponentType type)
+{
+ Toolkit::ScrollComponent instance;
+
+ switch(type)
+ {
+ case Toolkit::Scrollable::VerticalScrollBar:
+ {
+ instance = static_cast<Toolkit::ScrollComponent>(Toolkit::ScrollBarInternal::New(scrollable, true));
+ break;
+ }
+ case Toolkit::Scrollable::HorizontalScrollBar:
+ {
+ instance = static_cast<Toolkit::ScrollComponent>(Toolkit::ScrollBarInternal::New(scrollable, false));
+ break;
+ }
+ default:
+ {
+ DALI_ASSERT_ALWAYS(true && "Unrecognized component type");
+ }
+ }
+
+ return instance;
+}
+
} // namespace Internal
} // namespace Toolkit
#include <dali-toolkit/public-api/controls/control-impl.h>
#include <dali-toolkit/public-api/controls/scrollable/scrollable.h>
-#include <dali-toolkit/internal/controls/scroll-component/scroll-component-impl.h>
+#include <dali-toolkit/public-api/controls/scrollable/scroll-component-impl.h>
namespace Dali
{
// Undefined
Scrollable& operator=(const Scrollable& rhs);
+ /**
+ * Helper to create an initialized ScrollComponent
+ * @param[in] scrollable reference to ScrollView implementation
+ * @param[in] type the type of scroll component to create.
+ * @return A pointer to the created ScrollComponent.
+ */
+ Toolkit::ScrollComponent NewScrollComponent(Toolkit::Scrollable& scrollable, Toolkit::Scrollable::ScrollComponentType type);
+
protected:
Property::Index mPropertyRelativePosition;///< Scroll Relative Position ("scroll-relative-position") [range from 0.0f - 1.0f in each axes]
$(toolkit_src_dir)/controls/popup/popup-style-impl.cpp \
$(toolkit_src_dir)/controls/scroll-bar/scroll-bar-impl.cpp \
$(toolkit_src_dir)/controls/scroll-component/scroll-bar-internal-impl.cpp \
- $(toolkit_src_dir)/controls/scroll-component/scroll-component-impl.cpp \
$(toolkit_src_dir)/controls/scroll-component/scroll-bar-internal.cpp \
- $(toolkit_src_dir)/controls/scroll-component/scroll-component.cpp \
$(toolkit_src_dir)/controls/scrollable/item-view/item-view-impl.cpp \
$(toolkit_src_dir)/controls/scrollable/scrollable-impl.cpp \
$(toolkit_src_dir)/controls/scrollable/scroll-connector-impl.cpp \
}
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 )
{
}
{
}
-void ScrollBar::SetScrollConnector( ScrollConnector connector )
-{
- GetImpl(*this).SetScrollConnector(connector);
-}
-
void ScrollBar::SetBackgroundImage( Image image, const Vector4& border )
{
GetImpl(*this).SetBackgroundImage(image, border);
// INTERNAL INCLUDES
#include <dali/dali.h>
-#include <dali-toolkit/public-api/controls/control.h>
+#include <dali-toolkit/public-api/controls/scrollable/scroll-component.h>
namespace Dali DALI_IMPORT_API
{
* ScrollBar is a UI component that can be added to the scrollable controls
* indicating the current scroll position of the scrollable content.
*/
-class ScrollBar : public Control
+class ScrollBar : public ScrollComponent
{
public:
static ScrollBar DownCast( BaseHandle handle );
/**
- * @brief Sets the scroll connector for the scroll bar.
- *
- * @pre The scroll bar actor has been initialised.
- *
- * @param[in] connector Scroll connector used to connect scrollable container with this ScrollBar
- */
- void SetScrollConnector( ScrollConnector connector );
-
- /**
* @brief Sets the image for the background of scroll indicator.
*
* @pre The scroll bar actor has been initialised.
--- /dev/null
+//
+// 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.
+//
+
+// CLASS HEADER
+#include <dali-toolkit/public-api/controls/scrollable/scroll-component-impl.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace // unnamed namespace
+{
+
+BaseHandle Create()
+{
+ // empty handle as we cannot create ScrollComponent
+ return BaseHandle();
+}
+
+TypeRegistration mType( typeid(Toolkit::ScrollComponent), typeid(Toolkit::Control), Create );
+
+} // unnamed namespace
+
+void ScrollComponentImpl::SetScrollConnector( Toolkit::ScrollConnector connector )
+{
+ if( mScrollConnector != connector )
+ {
+ Toolkit::ScrollConnector oldConnector = mScrollConnector;
+ mScrollConnector = connector;
+
+ // Notify derived classes
+ OnScrollConnectorSet( oldConnector );
+ }
+}
+
+Toolkit::ScrollConnector ScrollComponentImpl::GetScrollConnector() const
+{
+ return mScrollConnector;
+}
+
+ScrollComponentImpl::ScrollComponentImpl()
+: ControlImpl(true/*requires touch*/)
+{
+}
+
+ScrollComponentImpl::~ScrollComponentImpl()
+{
+}
+
+void ScrollComponentImpl::OnScrollConnectorSet( Toolkit::ScrollConnector connector )
+{
+ // Do nothing (override in derived classes)
+}
+
+} // namespace Toolkit
+
+} // namespace Dali
--- /dev/null
+#ifndef __DALI_TOOLKIT_SCROLL_COMPONENT_IMPL_H__
+#define __DALI_TOOLKIT_SCROLL_COMPONENT_IMPL_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.
+//
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/controls/scrollable/scroll-component.h>
+
+#include <dali-toolkit/public-api/controls/control-impl.h>
+#include <dali-toolkit/public-api/controls/scrollable/scrollable.h>
+#include <dali-toolkit/public-api/controls/scrollable/scroll-connector.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+class ScrollComponentImpl;
+typedef IntrusivePtr<ScrollComponentImpl> ScrollComponentPtr;
+
+/**
+ * Base class for scroll component implementations.
+ * Scroll-components such as scroll bars, indicators etc. are connected to scrollable containers via ScrollConnector.
+ */
+class ScrollComponentImpl : public ControlImpl
+{
+public:
+
+ /**
+ * @brief Sets the scroll connector.
+ *
+ * @param[in] connector The scroll-connector used to connect with a scrollable container.
+ */
+ void SetScrollConnector( Toolkit::ScrollConnector connector );
+
+ /**
+ * @brief Retrieve the scroll connector.
+ *
+ * @return The scroll-connector used to connect with a scrollable container.
+ */
+ Toolkit::ScrollConnector GetScrollConnector() const;
+
+protected:
+
+ /**
+ * Construct a new ScrollComponentImpl.
+ */
+ ScrollComponentImpl();
+
+ /**
+ * A reference counted object may only be deleted by calling Unreference()
+ */
+ virtual ~ScrollComponentImpl();
+
+ /**
+ * @brief Called when a scroll component is connected to a scrollable UI control.
+ *
+ * @param[in] oldConnector The previous connector, or an empty handle.
+ */
+ virtual void OnScrollConnectorSet( Toolkit::ScrollConnector oldConnector );
+
+private:
+
+ // Undefined
+ ScrollComponentImpl(const ScrollComponentImpl&);
+
+ // Undefined
+ ScrollComponentImpl& operator=(const ScrollComponentImpl& rhs);
+
+protected:
+
+ Toolkit::ScrollConnector mScrollConnector;
+};
+
+// Helpers for public-api forwarding methods
+
+inline Toolkit::ScrollComponentImpl& GetImpl(Toolkit::ScrollComponent& scrollComponent)
+{
+ DALI_ASSERT_ALWAYS(scrollComponent);
+
+ Dali::RefObject& handle = scrollComponent.GetImplementation();
+
+ return static_cast<Toolkit::ScrollComponentImpl&>(handle);
+}
+
+inline const Toolkit::ScrollComponentImpl& GetImpl(const Toolkit::ScrollComponent& scrollComponent)
+{
+ DALI_ASSERT_ALWAYS(scrollComponent);
+
+ const Dali::RefObject& handle = scrollComponent.GetImplementation();
+
+ return static_cast<const Toolkit::ScrollComponentImpl&>(handle);
+}
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // __DALI_TOOLKIT_SCROLL_COMPONENT_IMPL_H__
// limitations under the License.
//
-#include <dali-toolkit/internal/controls/scroll-component/scroll-component.h>
-#include <dali-toolkit/internal/controls/scroll-component/scroll-component-impl.h>
+// CLASS HEADER
+#include <dali-toolkit/public-api/controls/scrollable/scroll-component.h>
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/controls/scrollable/scroll-component-impl.h>
namespace Dali
{
{
}
-ScrollComponent::ScrollComponent(Internal::ScrollComponent& implementation)
-: Control(implementation)
+ScrollComponent::ScrollComponent( ScrollComponentImpl& implementation )
+: Control( implementation )
{
}
-ScrollComponent::ScrollComponent( Dali::Internal::CustomActor* internal )
-: Control( internal )
+ScrollComponent::ScrollComponent( Dali::Internal::CustomActor* actor )
+: Control( actor )
{
- VerifyCustomActorPointer<Internal::ScrollComponent>(internal);
+ VerifyCustomActorPointer<ScrollComponentImpl>( actor );
}
-ScrollComponent::ScrollComponent( const ScrollComponent& scrollComponentNew )
-: Control(scrollComponentNew)
+ScrollComponent::ScrollComponent( const ScrollComponent& scrollComponent )
+: Control( scrollComponent )
{
}
-ScrollComponent& ScrollComponent::operator=( const ScrollComponent& scrollComponentNew )
+ScrollComponent& ScrollComponent::operator=( const ScrollComponent& scrollComponent )
{
- if( &scrollComponentNew != this )
+ if( &scrollComponent != this )
{
- Control::operator=( scrollComponentNew );
+ Control::operator=( scrollComponent );
}
return *this;
}
ScrollComponent ScrollComponent::DownCast( BaseHandle handle )
{
- return Control::DownCast<ScrollComponent, Internal::ScrollComponent>(handle);
+ return Control::DownCast<ScrollComponent, ScrollComponentImpl>(handle);
}
ScrollComponent::~ScrollComponent()
{
}
+void ScrollComponent::SetScrollConnector( ScrollConnector connector )
+{
+ GetImpl(*this).SetScrollConnector(connector);
+}
+
+ScrollConnector ScrollComponent::GetScrollConnector() const
+{
+ return GetImpl(*this).GetScrollConnector();
+}
+
} // namespace Toolkit
} // namespace Dali
namespace Toolkit
{
-namespace Internal DALI_INTERNAL
-{
-class ScrollComponent;
-}
+class ScrollComponentImpl;
+class ScrollConnector;
/**
- * Base class for derived ScrollComponents
- * ScrollComponents such as ScrollBarInternal are derived from this class.
- * To instantiate these ScrollBarInternals and other derived components
+ * Base class for scroll component handles.
+ * Scroll-components such as scroll bars, indicators etc. are connected to scrollable containers via ScrollConnector.
*/
class ScrollComponent : public Control
{
*/
static ScrollComponent DownCast( BaseHandle handle );
+ /**
+ * @brief Sets the scroll connector.
+ *
+ * @param[in] connector The scroll-connector used to connect with scrollable container.
+ */
+ void SetScrollConnector( ScrollConnector connector );
+
+ /**
+ * @brief Retrieve the scroll connector.
+ *
+ * @return The scroll-connector used to connect with a scrollable container.
+ */
+ ScrollConnector GetScrollConnector() const;
+
public: // Not intended for application developers
/**
- * Creates a handle using the Toolkit::Internal implementation.
- * @param[in] implementation The Control implementation.
+ * Creates a handle using the implementation.
+ * @param[in] implementation The Control implementation.
*/
- ScrollComponent( Internal::ScrollComponent& implementation );
+ ScrollComponent( ScrollComponentImpl& implementation );
/**
* Allows the creation of this Control from an Internal::CustomActor pointer.
$(public_api_src_dir)/controls/scrollable/item-view/album-layout.cpp \
$(public_api_src_dir)/controls/scrollable/scrollable.cpp \
$(public_api_src_dir)/controls/scrollable/scroll-connector.cpp \
+ $(public_api_src_dir)/controls/scrollable/scroll-component-impl.cpp \
+ $(public_api_src_dir)/controls/scrollable/scroll-component.cpp \
$(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view.cpp \
$(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view-constraints.cpp \
$(public_api_src_dir)/controls/scrollable/scroll-view/scroll-view-effect.cpp \
public_api_popup_header_files =
-public_api_scroll_component_header_files =
-
-public_api_scrollable_header_files =
+public_api_scrollable_header_files = \
+ $(public_api_src_dir)/controls/scrollable/scroll-component-impl.h \
+ $(public_api_src_dir)/controls/scrollable/scroll-component.h
public_api_scroll_bar_header_files = \
$(public_api_src_dir)/controls/scroll-bar/scroll-bar.h