taskswitcher/taskswitcherui/taskswitcherapp/src/tseventcontroler.cpp
branchRCL_3
changeset 30 b8fae6b8a148
parent 16 9674c1a575e9
child 47 7be2816dbabd
equal deleted inserted replaced
16:9674c1a575e9 30:b8fae6b8a148
    64 CTsEventControler::CTsEventControler(
    64 CTsEventControler::CTsEventControler(
    65     MTsEventControlerObserver& aObserver)
    65     MTsEventControlerObserver& aObserver)
    66     :
    66     :
    67     CBase(),
    67     CBase(),
    68     iObserver(aObserver),
    68     iObserver(aObserver),
    69     iHandleEvents(ETrue)
    69     iHandleEvents(ETrue),
       
    70     iHandleDragEvents(ETrue)
    70     {
    71     {
    71     }
    72     }
    72 
    73 
    73 // -----------------------------------------------------------------------------
    74 // -----------------------------------------------------------------------------
    74 // ConstructL
    75 // ConstructL
   132 // -----------------------------------------------------------------------------
   133 // -----------------------------------------------------------------------------
   133 //
   134 //
   134 void CTsEventControler::HandleDragEventL(
   135 void CTsEventControler::HandleDragEventL(
   135     MAknTouchGestureFwDragEvent& aEvent)
   136     MAknTouchGestureFwDragEvent& aEvent)
   136     {
   137     {
   137     iObserver.DragL(aEvent);
   138     if ( iHandleDragEvents )
   138     if ( iHandleEvents )
   139         {
   139         {
   140         iObserver.DragL(aEvent);
   140         iPhysicsHelper->HandleDragEvent(aEvent);
   141         if ( iHandleEvents && iHandleDragEvents )
       
   142             {
       
   143             iPhysicsHelper->HandleDragEvent(aEvent);
       
   144             }
   141         }
   145         }
   142     }
   146     }
   143 
   147 
   144 // -----------------------------------------------------------------------------
   148 // -----------------------------------------------------------------------------
   145 // PhysicEmulationEnded
   149 // PhysicEmulationEnded
   219         {
   223         {
   220         iPhysicsHelper->Stop();
   224         iPhysicsHelper->Stop();
   221         }
   225         }
   222     }
   226     }
   223 
   227 
       
   228 
       
   229 // -----------------------------------------------------------------------------
       
   230 // EnableDragEventHandling
       
   231 // -----------------------------------------------------------------------------
       
   232 //
       
   233 void CTsEventControler::EnableDragEventHandling( TBool aEnable )
       
   234     {
       
   235     iHandleDragEvents = aEnable;
       
   236     if ( !aEnable && IsPhysicsRunning() )
       
   237         {
       
   238         iPhysicsHelper->Stop();
       
   239         }
       
   240     }
       
   241 
   224 // end of file
   242 // end of file