Definition at line 125 of file DocFlowDrag.h. References ClampDocY(), OglGui::DocDimensions::DocY(), mFlowDoc, mFlowDragDiff, mFlowDragging, mFlowDragLastY, mFlowDragStartTime, mFlowDragStartY, mFlowing, mFlowSpeed, mFlowStartY, mFlowWnd, mKineticScrolling, mMyMouseButton, mOldDocY, OglGui::OglWindow::SetAlwaysDraw(), and OglGui::RepeatTimer::StartRepeatTime(). Referenced by Impala::Visualization::ImageSetIdxGrid::MouseFunc(), and Impala::Visualization::DirImViewer::MouseFunc(). 00126 { 00127 if (msg == oglMouseDown && but == mMyMouseButton) 00128 { 00129 mKineticScrolling = !(state & oglControl); 00130 if (mFlowing) 00131 mFlowWnd->SetAlwaysDraw(mFlowing = false); 00132 mFlowDragging = true; 00133 mFlowDragDiff = 0; 00134 mFlowDragStartY = mFlowDragLastY = y; 00135 mFlowDragStartTime = OglClock(); 00136 } 00137 if (msg == oglMouseMove && mFlowDragging) 00138 { 00139 mFlowDragDiff = mFlowDragLastY - y; 00140 ClampDocY(mFlowDoc->DocY() - mFlowDragDiff); 00141 mFlowDragLastY = y; 00142 } 00143 if (mFlowDragging && msg == oglMouseUp && but == mMyMouseButton) 00144 { 00145 mOldDocY = mFlowStartY = mFlowDoc->DocY(); 00146 mFlowDragging = false; 00147 mFlowSpeed = ((double)mFlowDragStartY-y) / 00148 (OglClock() - mFlowDragStartTime); 00149 //printf("FlowSpeed %f\n", mFlowSpeed); 00150 if (abs(mFlowDragDiff) < 3) 00151 mFlowSpeed = 0; 00152 if (mFlowSpeed > 100 || mFlowSpeed < -100) 00153 mFlowWnd->SetAlwaysDraw(mFlowing = true); 00154 mFlowDragStartTime = OglClock(); 00155 StartRepeatTime(); 00156 } 00157 if (!(state & mMyMouseButton)) 00158 mFlowDragging = false; 00159 }
Here is the call graph for this function:
|