messagingappbase/mce/src/MceMainViewListView.cpp
branchRCL_3
changeset 66 fc3320e39880
parent 60 7fdbb852d323
child 77 da6ac9d688df
--- a/messagingappbase/mce/src/MceMainViewListView.cpp	Wed Sep 01 12:31:54 2010 +0100
+++ b/messagingappbase/mce/src/MceMainViewListView.cpp	Tue Sep 14 21:11:56 2010 +0300
@@ -364,7 +364,8 @@
         iMceUi->ResetResourceChange();
         }
     listBox->SetListBoxObserver(this);
-
+ 	//To observe scrollbar events
+    listBox->ScrollBarFrame()->SetScrollBarFrameObserver( this );
     iMsgListContainer->ActivateL();
     if ( !iListViewFlags.MceFlag( EMceUiFlagsContainerAddedToStack ) )
         {
@@ -454,9 +455,11 @@
                 iMsgListContainer->SetMskL();                
                 }
         break;
+        case EEventPanningStarted:
         case EEventFlickStarted:
             iFlick = ETrue;
             break;        
+        case EEventPanningStopped:
         case EEventFlickStopped:
             iFlick = EFalse;
             break;
@@ -1218,4 +1221,30 @@
        return KErrNotFound;
        }
     }
+// ---------------------------------------------------------
+// CMceMainViewListView::HandleScrollEventL
+// To take old bitmapindex for list items When 
+// stylus is down on scroll bar thumb and dragged
+// Calculate new bitmapindex when scrollbar thumb drag is stopped
+// ---------------------------------------------------------
+//
+void CMceMainViewListView::HandleScrollEventL(CEikScrollBar* aScrollBar,
+        TEikScrollEvent aEventType)
+    {
+    switch (aEventType)
+        {
+        case EEikScrollThumbDragVert:
+            iFlick = ETrue;
+            break;
+        case EEikScrollThumbReleaseVert:
+            iFlick = EFalse;
+            break;
+        default:
+            break;
+        }
+    CAknDoubleLargeStyleListBox* listBox =
+            REINTERPRET_CAST( CAknDoubleLargeStyleListBox*,
+                    iMsgListContainer->ListBox() );
+    listBox->HandleScrollEventL( aScrollBar, aEventType );
+    }
 //  End of File