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

virtual void Impala::Application::SDash::PoliceMan::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::Window.

Definition at line 74 of file PoliceMan.h.

References mBalloon, mListener, mListenerData, mMouseOver, Impala::Application::SDash::PoliceManListener::PoliceManClicked(), and OglGui::OglWindow::SetVisible().

00075     {
00076         if (msg == oglMouseEnter || msg == oglMouseLeave)
00077         {
00078             mMouseOver = (msg == oglMouseEnter);
00079             mBalloon->SetVisible(mMouseOver);
00080         }
00081         if (msg == oglMouseDown && mListener != 0)
00082             mListener->PoliceManClicked(this, btn, state, x, y, mListenerData);
00083     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:16:06 2011 for ImpalaSrc by  doxygen 1.5.1