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

virtual void Impala::Application::MediaTable::TableViewerPointCloud::MouseFunc ( int  msg,
int  btn,
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::ViewerPointCloud.

Definition at line 81 of file TableViewerPointCloud.h.

References OglGui::ViewerPointCloud::MouseFunc(), Impala::Application::MediaTable::TableDataViewController::OpenContextMenu(), and OglGui::OglWindow::ToTopWindow().

00082         {
00083         if (btn == oglRightButton)
00084                 {
00085             int rx=0, ry=0;
00086             ToTopWindow(this, rx, ry);
00087             OpenContextMenu(rx+x,ry+y);
00088                         return;
00089                 }
00090                 else if ((msg == oglMouseMove || msg == oglMouseDown)
00091                         && (state & oglLeftButton))
00092                 {
00093                         if(state & oglControl)
00094                         {
00095                                 state &= ~oglControl;
00096                                 state |= oglShift;
00097                                 btn = oglRightButton;
00098                         }
00099                         
00100                         else if(state & oglShift)
00101                         {
00102                                 state &= ~oglShift;
00103                                 btn = oglRightButton;
00104                         }
00105                 } 
00106                 OglGui::ViewerPointCloud::MouseFunc(msg, btn, state, x, y);             
00107         }

Here is the call graph for this function:


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