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 399 of file CheckBoxDrum.h. References OglGui::CheckBox3D::GetSelected(), HandleCategory(), mDrumRotX, OglGui::OglWindow::mOglWnd, OglGui::Window::MouseFunc(), mPicking, mWheelStep, PickDrawFunc(), and OglGui::CheckBox3D::SetSelected(). 00400 { 00401 if( msg == oglMouseDown && msg == oglLeftButton ) 00402 { 00403 mPicking = true; 00404 int picked = (int) oglSys.StdPickObject( mOglWnd, (FLOAT) x, (FLOAT) y, 00405 4.0f, 300.0f, PickDrawFunc, NULL, NULL ); 00406 mPicking = false; 00407 if( picked ){ 00408 CheckBox3D* cB = (CheckBox3D *) picked; 00409 cB->SetSelected( !cB->GetSelected() ); 00410 HandleCategory( cB ); 00411 } 00412 } 00413 if (msg == oglMouseWheelUp || msg == oglMouseWheelDown) 00414 { 00415 float delta = ((msg == oglMouseWheelUp) ? -mWheelStep : mWheelStep); 00416 delta *= ((state & oglControl) ? 2 : 1); 00417 mDrumRotX += delta; 00418 } 00419 else 00420 Window::MouseFunc(msg, but, state, x, y); 00421 }
Here is the call graph for this function:
|