X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fscrollable%2Fscroll-view%2Fscroll-view-impl.cpp;h=5111cec02f9d803fc31a0bd70b3c4282dbf4d59e;hb=2ec164cd618f93ccafe17b1d0b8ff16401ed4aef;hp=dd2c63abe80483ecb56a63f2db27b05a7511fbaf;hpb=b8d4bac83c801b93dc7b3298148864a4215e139f;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp b/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp index dd2c63a..5111cec 100644 --- a/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp +++ b/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp @@ -24,13 +24,14 @@ #include #include #include +#include #include // INTERNAL INCLUDES -#include #include -#include +#include #include +#include //#define ENABLED_SCROLL_STATE_LOGGING @@ -52,10 +53,6 @@ using namespace Dali; namespace { -// Signals - -const char* const SIGNAL_SNAP_STARTED = "snap-started"; - const Vector2 DEFAULT_MIN_FLICK_DISTANCE(30.0f, 30.0f); ///< minimum distance for pan before flick allowed const float DEFAULT_MIN_FLICK_SPEED_THRESHOLD(500.0f); ///< Minimum pan speed required for flick in pixels/s const float FREE_FLICK_SPEED_THRESHOLD = 200.0f; ///< Free-Flick threshold in pixels/ms @@ -208,6 +205,18 @@ namespace Internal namespace { +BaseHandle Create() +{ + return Toolkit::ScrollView::New(); +} + +// Setup properties, signals and actions using the type-registry. +DALI_TYPE_REGISTRATION_BEGIN( Toolkit::ScrollView, Toolkit::Scrollable, Create ) + +DALI_SIGNAL_REGISTRATION( ScrollView, "value-changed", SIGNAL_SNAP_STARTED ) + +DALI_TYPE_REGISTRATION_END() + /** * Returns whether to lock scrolling to a particular axis * @@ -510,16 +519,6 @@ struct InternalFinalConstraint AlphaFunction mFunctionY; }; - -BaseHandle Create() -{ - return Toolkit::ScrollView::New(); -} - -TypeRegistration typeRegistration( typeid( Toolkit::ScrollView ), typeid( Toolkit::Scrollable ), Create ); - -SignalConnectorType signalConnector1( typeRegistration, SIGNAL_SNAP_STARTED, &ScrollView::DoConnectSignal ); - }