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

virtual void Impala::Visualization::VideoMinimap::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 209 of file VideoMinimap.h.

References Impala::Visualization::MapFunction::GetHeight(), Impala::Visualization::MapFunction::GetWidth(), HidePreviewWindow(), ILOG_USER, mMapFunction, OglGui::OglWindow::mOglWnd, ShowPreviewWindow(), UpdatePreviewWindow(), and Impala::Visualization::MapFunction::XYToShot().

00210     {
00211         if (but == 1)
00212         {
00213             ShowPreviewWindow();
00214 
00215             y = mOglWnd->height - y;
00216             x = mMapFunction->GetWidth() * x / mOglWnd->width;
00217             y = mMapFunction->GetHeight() * y / mOglWnd->height;
00218             ILOG_USER("Mouse previewing shot " << x <<"," << y <<" == " << mMapFunction->XYToShot(x,y));
00219             
00220             UpdatePreviewWindow(mMapFunction->XYToShot(x,y));
00221         }
00222         if (but == 0)
00223         {
00224             HidePreviewWindow();
00225         }
00226     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:49:51 2010 for ImpalaSrc by  doxygen 1.5.1