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 1007 of file RotorBrowser.h. References AddToHistory(), BookmarkSpecific(), BookmarkSpecificNegative(), FindContextForPosition(), Impala::Visualization::RotorBrowser::RotorView::GetName(), Impala::Visualization::RotorBrowser::RotorBrowserContext::GetName(), Impala::Visualization::RotorBrowser::RotorView::GetNR(), Impala::Visualization::RotorBrowser::RotorBrowserContext::GoTo(), ILOG_USER, KeyboardFunc(), mActiveContext, mBrowseMode, MODE_FORKBROWSER, OglGui::OglWindow::mOglWnd, OglGui::Window::MouseFunc(), Impala::Visualization::RotorBrowser::RotorViewCache::OGLVIEW3DToRotorView(), PublishContextMoved(), SwitchToContext(), Impala::Visualization::RotorBrowser::RotorView::UpdateBookmarkState(), and UpdateViewsToContext(). 01008 { 01009 if (msg == oglMouseWheelUp) 01010 { 01011 KeyboardFunc('s', state); 01012 return; 01013 } 01014 01015 if (msg == oglMouseWheelDown) 01016 { 01017 KeyboardFunc('w', state); 01018 return; 01019 } 01020 01021 if ((state & oglAlt) || (msg != oglMouseDown)) 01022 { 01023 #ifndef AS_TODS_BROWSER 01024 Window::MouseFunc(msg, but, state, x, y); 01025 #endif 01026 return; 01027 } 01028 OGLVIEW3D *v = view3DSys.FindView(mOglWnd, x, y); 01029 if (v == NULL) return; 01030 RotorView *view = RotorViewCache::OGLVIEW3DToRotorView(v); 01031 if (view == NULL) return; 01032 01033 if (but == oglLeftButton) 01034 { 01035 if (state & oglShift) 01036 { 01037 // move to the clicked shot. 01038 int vNr = view->GetNR(); 01039 RotorBrowserContext *c = FindContextForPosition(vNr); 01040 if (!c) return; 01041 01042 ILOG_USER("MOUSE: move to shot " << vNr << 01043 " from context " << c->GetName() ); 01044 if (SwitchToContext(c->GetName())) 01045 { 01046 mActiveContext->GoTo(vNr); 01047 UpdateViewsToContext(); 01048 PublishContextMoved(0); 01049 } 01050 } 01051 else 01052 { 01053 ILOG_USER("MOUSE: click on shot " << view->GetNR() << 01054 " at " << view->GetName()); 01055 BookmarkSpecific(view->GetNR()); 01056 view->UpdateBookmarkState(); 01057 if (mBrowseMode == MODE_FORKBROWSER) 01058 { 01059 AddToHistory(view->GetNR()); 01060 UpdateViewsToContext(); 01061 } 01062 } 01063 } 01064 if (but == oglRightButton) 01065 { 01066 ILOG_USER("MOUSE: rightclick on shot " << view->GetNR() << 01067 " at " << view->GetName() ); 01068 BookmarkSpecificNegative(view->GetNR()); 01069 view->UpdateBookmarkState(); 01070 } 01071 }
Here is the call graph for this function:
|