Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

void OglGui::DocFlowDrag::FlowDragDisplay (  )  [inline]

Definition at line 77 of file DocFlowDrag.h.

References ClampDocY(), OglGui::DocDimensions::DocY(), OglGui::OglWindow::H(), mFlowDoc, mFlowDragStartTime, mFlowing, mFlowPageExtra, mFlowPageThresh, mFlowSpeed, mFlowStartY, mFlowWnd, mFriction, mKineticScrolling, mOldDocY, OglGui::RepeatTimer::RepeatTime(), OglGui::OglWindow::SetAlwaysDraw(), and OglGui::OglWindow::UpdateScene().

Referenced by Impala::Visualization::ImageSetIdxGrid::DisplayFunc(), and Impala::Visualization::DirImViewer::DisplayFunc().

00078     {
00079         if (!mFlowing)
00080             return;
00081 
00082         int     docY = mFlowDoc->DocY();
00083         int     wndH = mFlowWnd->H();
00084         float   d;
00085 
00086         if (mOldDocY != docY)
00087         {
00088             mFlowWnd->SetAlwaysDraw(mFlowing=false);
00089             return;
00090         }
00091 
00092         if (mKineticScrolling)
00093         {
00094             float   t    = (OglClock() - mFlowDragStartTime);
00095             float   endT = fabs(mFlowSpeed / mFriction);
00096             //printf("t %f endT %f flowSpeed %f\n", t, endT, mFlowSpeed);
00097             if (t >= endT)
00098             {
00099                 t = endT;
00100                 mFlowWnd->SetAlwaysDraw(mFlowing=false);
00101                 mFlowWnd->UpdateScene();
00102             }
00103             d = mFlowSpeed*t + (0.5*(mFlowSpeed>0?1:-1)*mFriction * (t*t));
00104             docY = mFlowStartY - d;
00105         }
00106         else
00107         {
00108             // To prevent rushing by images that cause flicker
00109             if (mFlowSpeed > mFlowPageThresh || mFlowSpeed <-mFlowPageThresh)
00110             {
00111                 d = (mFlowSpeed>0) ? -wndH+mFlowPageExtra : wndH-mFlowPageExtra;
00112                 if (RepeatTime())
00113                     docY += d;
00114             }
00115             else
00116             {
00117                 d = -mFlowSpeed * (OglClock()-mFlowDragStartTime);
00118                 docY = mFlowStartY + d;
00119             }
00120         }
00121         ClampDocY(docY);
00122         mOldDocY = mFlowDoc->DocY();
00123     }

Here is the call graph for this function:


Generated on Fri Mar 19 12:00:44 2010 for ImpalaSrc by  doxygen 1.5.1