Reimplemented from OglGui::Window. Definition at line 165 of file ImageSet.h. References OglGui::ScrollBar::ChangePos(), OglGui::Window::DisplayFunc(), OglGui::View::GetDimensions2D(), OglGui::ScrollBar::GetValue(), mDistance, mDragImId, mDragInsertId, mDragViewNr, mDragX, mDragY, mFirstVisY, Impala::Visualization::ImagesWindow::mImages, mImSteps, mNrVisibleX, mNrVisibleY, OglGui::OglWindow::mOglWnd, mPropagateScrolling, mScrollBar, Impala::Visualization::ImagesWindow::mViewHeight, Impala::Visualization::ImagesWindow::mViewWidth, OglGui::RepeatTimer::RepeatTime(), OglGui::View::SetDimensions2D(), OglGui::View::SetText(), OglGui::View::SetVisible(), and ViewHasImage(). 00166 { 00167 int cnt = 0; 00168 OGC oldOGC; 00169 int offY = mScrollBar->GetValue() % mImSteps; 00170 int nrV = mNrVisibleX * mNrVisibleY; 00171 int start = mFirstVisY * mNrVisibleX; 00172 00173 OGCSave(&oldOGC); 00174 for (int i=0 ; i<mNrVisibleY ; i++) 00175 { 00176 int y = mOglWnd->height - (i+1) * (mViewHeight+mDistance) + 00177 offY * (mViewHeight/mImSteps); 00178 for (int j=0 ; j<mNrVisibleX ; j++) 00179 { 00180 int x = j * (mViewWidth+mDistance); 00181 if (ViewHasImage(cnt)) 00182 { 00183 View* view = GetView(cnt); 00184 view->SetDimensions2D(x, y, mViewWidth, mViewHeight); 00185 bool vis = start + cnt != mDragImId; 00186 view->SetVisible(vis); 00187 if (vis) 00188 view->SetText(mImages[start+cnt]->Caption()); 00189 } 00190 cnt++; 00191 } 00192 } 00193 00194 if (mDragImId != -1) 00195 { 00196 View* view = GetView(mDragViewNr); 00197 view->SetVisible(true); 00198 view->SetText(mImages[mDragImId]->Caption()); 00199 view->SetDimensions2D(mDragX-mViewWidth/2, mDragY-mViewHeight/2, 00200 mViewWidth, mViewHeight); 00201 } 00202 00203 00204 Window::DisplayFunc(); 00205 00206 if (mDragImId != -1 && mPropagateScrolling && RepeatTime()) 00207 mScrollBar->ChangePos(mPropagateScrolling); 00208 00209 if (mDragImId != -1) 00210 { 00211 View* dragView = GetView(mDragViewNr); 00212 dragView->SetVisible(false); 00213 View* view = FindView(mDragX, mDragY); 00214 if (view) 00215 { 00216 mDragInsertId = mFirstVisY * mNrVisibleX + GetViewIdx(view); 00217 int x, y, w; 00218 view->GetDimensions2D(&x, &y, &w, 0); 00219 if (mDragX > x + w/2) 00220 { 00221 x += mViewWidth; 00222 mDragInsertId++; 00223 } 00224 SetLineWidth(3); 00225 SetSolidLineColor(0xffff00ff); 00226 DrawLine(x, y, x, y + mViewHeight); 00227 } 00228 else 00229 mDragInsertId = -1; 00230 dragView->SetVisible(true); 00231 } 00232 OGCRestore(&oldOGC); 00233 }
Here is the call graph for this function:
|