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

virtual void Impala::Application::MediaTable::TableOverviewWindow::MouseFunc ( int  msg,
int  but,
int  state,
int  x,
int  y 
) [inline, virtual]

This function is called by the event handling system everytime the user has moved or clicked the mouse.

So if you want a window which reacts to the mouse in a specific way, you can inherit a class from Window. Another method to implement mouse behaviour is to use a window listener (in this case you have to inherit a class from WindowListener and attach it to this window, see WindowListener for more details)

Reimplemented from OglGui::Window.

Definition at line 37 of file TableOverviewWindow.h.

References Impala::Application::MediaTable::TableDataView::DoUpdateScrollFromSourceEvent(), Impala::Application::MediaTable::TableDataView::GetNumberOfRows(), Impala::Application::MediaTable::TableDataView::GetStartRow(), Impala::Application::MediaTable::TableDataView::GetTotalRows(), ILOG_USER, mDrawHeight, mDrawOffset, mSource, PixelToRow(), and Impala::Application::MediaTable::TableDataView::SetStartRow().

00038     {
00039         if ((msg==oglMouseDown || msg==oglMouseMove) && state==oglLeftButton)
00040         {
00041             //mDrawHeight = H() - 32;
00042             //mDrawOffset = 16;
00043             int row = PixelToRow(mDrawOffset+mDrawHeight - y);
00044                         ILOG_USER("overview window scroll event to "<<row);
00045             mSource->SetStartRow(row);
00046                         if (row + mSource->GetNumberOfRows() > mSource->GetTotalRows()) 
00047                                 row = mSource->GetTotalRows() - mSource->GetNumberOfRows();
00048                         if (row != mSource->GetStartRow())
00049                         mSource->SetStartRow(row);
00050             mSource->DoUpdateScrollFromSourceEvent();
00051         }
00052     }

Here is the call graph for this function:


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