X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fscrollable%2Fitem-view%2Fitem-view-impl.cpp;h=19d737379364997aac996414629dd94f89de9f7b;hp=dc329edc8ae007706c25769c9d3bb3fc42f2a408;hb=f546dd5d83a968e573f8f053a01ce43df32c71a0;hpb=a57d543cd372560a9065a31b32184a6a02d49e77 diff --git a/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp b/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp index dc329ed..19d7373 100644 --- a/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp +++ b/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp @@ -333,7 +333,7 @@ Dali::Toolkit::ItemView ItemView::New(ItemFactory& factory) } ItemView::ItemView(ItemFactory& factory) -: Scrollable( ControlBehaviour( DISABLE_SIZE_NEGOTIATION | DISABLE_STYLE_CHANGE_SIGNALS | REQUIRES_WHEEL_EVENTS | REQUIRES_KEYBOARD_NAVIGATION_SUPPORT ) ), +: Scrollable( ControlBehaviour( DISABLE_SIZE_NEGOTIATION | DISABLE_STYLE_CHANGE_SIGNALS | REQUIRES_KEYBOARD_NAVIGATION_SUPPORT ) ), mItemFactory(factory), mItemsParentOrigin(ParentOrigin::CENTER), mItemsAnchorPoint(AnchorPoint::CENTER), @@ -362,6 +362,8 @@ ItemView::ItemView(ItemFactory& factory) void ItemView::OnInitialize() { + Scrollable::OnInitialize(); + Actor self = Self(); Vector2 stageSize = Stage::GetCurrent().GetSize(); @@ -374,6 +376,9 @@ void ItemView::OnInitialize() mWheelEventFinishedTimer.TickSignal().Connect( this, &ItemView::OnWheelEventFinished ); SetRefreshInterval(DEFAULT_REFRESH_INTERVAL_LAYOUT_POSITIONS); + + // Connect wheel event + self.WheelEventSignal().Connect( this, &ItemView::OnWheelEvent ); } ItemView::~ItemView() @@ -1022,7 +1027,7 @@ void ItemView::OnChildAdd(Actor& child) Scrollable::OnChildAdd( child ); } -bool ItemView::OnWheelEvent(const WheelEvent& event) +bool ItemView::OnWheelEvent(Actor actor, const WheelEvent& event) { // Respond the wheel event to scroll if (mActiveLayout) @@ -1816,7 +1821,7 @@ void ItemView::SetLayoutArray( const Property::Array& layouts ) { const Property::Value& element = layouts.GetElementAt( arrayIdx ); - Property::Map* layout = element.GetMap(); + const Property::Map* layout = element.GetMap(); if( layout != NULL ) { for( unsigned int mapIdx = 0, mapCount = (*layout).Count(); mapIdx < mapCount; ++mapIdx )