Reimplemented from OglGui::Window. Definition at line 140 of file ImageStrip.h. References OglGui::ScrollBar::ChangePos(), OglGui::Window::DisplayFunc(), OglGui::View::GetDimensions2D(), OglGui::ScrollBar::GetValue(), mDistance, mDragImId, mDragInsertId, mDragX, mFirstVis, Impala::Visualization::ImagesWindow::mImages, mImSteps, mNrViews, OglGui::OglWindow::mOglWnd, mPropagateScrolling, mScrollBar, Impala::Visualization::ImagesWindow::mViewHeight, Impala::Visualization::ImagesWindow::mViewWidth, mVSpace, OglGui::RepeatTimer::RepeatTime(), OglGui::View::SetDimensions2D(), and OglGui::View::SetVisible(). 00141 { 00142 OGC oldOGC; 00143 int offX = (mScrollBar->GetValue() % mImSteps) * (mViewWidth/mImSteps); 00144 00145 OGCSave(&oldOGC); 00146 for (int j=0 ; j<mNrViews ; j++) 00147 { 00148 View* view = GetView(j); 00149 if (!view) 00150 break; 00151 int imId = mFirstVis + j; 00152 bool vis = (imId < mImages.size() && imId != mDragImId); 00153 if (vis) 00154 { 00155 int pos = 3 + j * (mViewWidth+mDistance) - offX; 00156 view->SetDimensions2D(pos, mVSpace, mViewWidth, mViewHeight); 00157 } 00158 view->SetVisible(vis); 00159 } 00160 00161 if (mDragImId != -1) 00162 { 00163 View* view = GetView(mNrViews-1); 00164 if (view) 00165 { 00166 view->SetVisible(true); 00167 view->SetDimensions2D(mDragX-mViewWidth/2, mVSpace, mViewWidth, 00168 mViewHeight); 00169 } 00170 } 00171 00172 Window::DisplayFunc(); 00173 00174 if (mDragImId != -1 && mPropagateScrolling && RepeatTime()) 00175 mScrollBar->ChangePos(mPropagateScrolling); 00176 00177 if (mDragImId != -1) 00178 { 00179 int pos = (mDragX+mViewWidth/2+offX) / (mViewWidth+mDistance); 00180 if (mFirstVis+pos > mImages.size()) 00181 pos = mImages.size() - mFirstVis; 00182 mDragInsertId = mFirstVis + pos; 00183 pos = 3 + pos * (mViewWidth+mDistance) - offX; 00184 SetLineWidth(3); 00185 SetSolidLineColor(0xffff00ff); 00186 DrawLine(pos, 0, pos, mOglWnd->height); 00187 } 00188 00189 for (int i=0 ; i<mNrViews && mFirstVis + i < mImages.size() ; i++) 00190 { 00191 int x, y; 00192 View* view = GetView(i); 00193 if (view != 0) 00194 { 00195 int imId = mFirstVis + i; 00196 if (mDragImId != -1 && i==mNrViews-1) 00197 imId = mDragImId; 00198 view->GetDimensions2D(&x, &y, 0, 0); 00199 oglSys.PosColPrintf(mOglWnd, x+4, y-16+4, 00200 imId==mDragImId ? oglRED : oglBLACK, 00201 "%s", mImages[imId]->Caption().c_str()); 00202 } 00203 } 00204 OGCRestore(&oldOGC); 00205 }
Here is the call graph for this function:
|