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

virtual void Impala::Application::VideoExcel::SelectionCollectionItem::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 42 of file SelectionCollectionItem.h.

References mContextMenu, mId, mListener, OglGui::Menu::Open(), Impala::Application::VideoExcel::SelectionCollectionListener::SelectCollectionEvent(), and OglGui::OglWindow::ToTopWindow().

00043     {
00044         if (mListener && msg == oglMouseUp && but == oglLeftButton)
00045             mListener->SelectCollectionEvent(mId);
00046 
00047         if (msg == oglMouseDown && but == oglRightButton)
00048         {
00049             int rx=0, ry=0;
00050             ToTopWindow(this, rx, ry);
00051             mContextMenu->Open(rx+x,ry+y);
00052         }
00053     }

Here is the call graph for this function:


Generated on Fri Mar 19 10:53:26 2010 for ImpalaSrc by  doxygen 1.5.1