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. Reimplemented in Impala::Visualization::ImageSet, and Impala::Visualization::ImageStrip. Definition at line 191 of file ImagesWindow.h. References OglGui::ImagesListener::ImageSelectionEvent(), mImagesListener, mImagesListenerData, and OglGui::Window::MouseFunc(). 00192 { 00193 Window::MouseFunc(msg, but, state, x, y); 00194 00195 // todo : use ViewListener 00196 if (mImagesListener && (msg==oglMouseDown) && (but==oglLeftButton)) 00197 { 00198 View* view = FindView(x, y); 00199 if (view) 00200 { 00201 int imIdx = GetViewIdx(view); 00202 mImagesListener->ImageSelectionEvent(this, imIdx, 00203 mImagesListenerData); 00204 } 00205 } 00206 }
Here is the call graph for this function:
|