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 153 of file Camera3DXYZ.h. References mLastX, mLastY, mMouseState, mMouseX, mMouseY, OglGui::OglWindow::mOglWnd, OglGui::Window::MouseFunc(), mPropagateMouse, and mTarget. 00154 { 00155 mMouseX = x; 00156 mMouseY = y; 00157 mMouseState = state; 00158 00159 Window::MouseFunc(msg, btn, state, x, y); 00160 00161 if (msg==oglMouseDown && mTarget) 00162 { 00163 mLastX = x; 00164 mLastY = y; 00165 mPropagateMouse = true; 00166 oglSys.SetAlwaysDraw(mOglWnd, 1); 00167 } 00168 if (!state || !mTarget) 00169 { 00170 mPropagateMouse = false; 00171 oglSys.SetAlwaysDraw(mOglWnd, 0); 00172 } 00173 }
Here is the call graph for this function:
|