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

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

References OglGui::Window::GetState(), Impala::Visualization::ImageSetIdxGridListener::ImageSelectionEvent(), mFlowDragger, mListener, mListenerData, mNrOfImOnRow, OglGui::Window::MouseFunc(), OglGui::DocFlowDrag::MouseFunc(), NrOfFiles(), SetSelected(), X2Column(), and Y2Row().

00430     {
00431         if (!GetState()) return;
00432 
00433         mFlowDragger.MouseFunc(msg,but,state,x,y);
00434         Window::MouseFunc( msg, but, state, x, y );
00435 
00436         if (state & (oglAlt|oglShift|oglControl))
00437             return;
00438 
00439         if (msg == oglMouseDown && but == oglLeftButton)
00440         {
00441             int idx = Y2Row(y) * mNrOfImOnRow + X2Column(x);
00442             if (idx >= 0 && idx < NrOfFiles())
00443             {
00444                 SetSelected(idx);
00445                 if (mListener!=0)
00446                     mListener->ImageSelectionEvent(this,idx,mListenerData);
00447             }
00448         }
00449     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:44:20 2010 for ImpalaSrc by  doxygen 1.5.1