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

virtual void Impala::Application::MediaTable::TableOverviewWindow::DisplayFunc (  )  [inline, virtual]

Reimplemented from OglGui::Window.

Definition at line 115 of file TableOverviewWindow.h.

References OglGui::Window::DisplayFunc(), Impala::Application::MediaTable::TableDataView::GetFilteredRows(), Impala::Application::MediaTable::TableDataView::GetMark(), Impala::Application::MediaTable::TableDataView::GetNumberOfRows(), Impala::Application::MediaTable::TableDataView::GetStartRow(), OglGui::OglWindow::H(), MarkToColor(), mDrawHeight, mDrawOffset, mHeaderHeight, mPixelCacheSynced, mSelPixelCache, mSource, RowToPixel(), UpdatePixelCache(), and OglGui::OglWindow::W().

00116     {
00117         if (mSource->GetFilteredRows() == 0)
00118         {
00119             Window::DisplayFunc();
00120             return;
00121         }
00122 
00123         OGC     myOGC;
00124         OGCSave(&myOGC);
00125         SetStipple((short)oglDot);
00126         SetSolidLineColor(0xff777777);
00127 
00128         mDrawHeight = H() - 32 - mHeaderHeight;
00129         mDrawOffset = 16;
00130         // mark marked areas:
00131         if (mDrawHeight < mSource->GetFilteredRows())
00132         {
00133             if (mDrawHeight > mSelPixelCache.size())
00134                 mPixelCacheSynced=false;
00135 
00136             // more rows than pixels: use cached version of sampled rows
00137             if (!mPixelCacheSynced)
00138                 UpdatePixelCache(mDrawHeight);
00139 
00140             for (int i=0; i<mDrawHeight; i++)
00141             {
00142                 unsigned long avgcol = mSelPixelCache[i];
00143                 if (avgcol > 0)
00144                 {
00145                     SetSolidFillColor(avgcol);
00146                     FillRectangle(0, mDrawOffset+mDrawHeight-i, W(), 1);
00147                 }
00148             }
00149         }
00150         else
00151         {
00152             // less rows than pixels, draw blocks
00153             for (int y = 0; y < mSource->GetFilteredRows(); y++)
00154             {
00155                 int mark = mSource->GetMark(y);
00156                 if (mark)
00157                 {
00158                     SetSolidFillColor(MarkToColor(mark));
00159                     int l = RowToPixel(1);
00160                     int s = RowToPixel(y) + l;
00161                     FillRectangle(0, mDrawOffset+mDrawHeight-s, W(), l+1);
00162                 }
00163             }
00164         }
00165 
00166         // mark current visible area:
00167         SetSolidFillColor(0xffffffff);
00168         int l = RowToPixel(mSource->GetNumberOfRows());
00169         int s = RowToPixel(mSource->GetStartRow()) + l;
00170         FillRectangle(0,mDrawOffset+mDrawHeight-s, 8,l);
00171         FillRectangle(W()-8,mDrawOffset+mDrawHeight-s, 8,l);
00172 
00173         OGCRestore(&myOGC);
00174         Window::DisplayFunc();
00175     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:15:35 2011 for ImpalaSrc by  doxygen 1.5.1