+ ((XGUI_ViewWindow*)myActiveView->widget())->windowActivated();
+ QList<QMdiSubWindow*>::iterator aIt;
+ for (aIt = myViews.begin(); aIt != myViews.end(); ++aIt) {
+ if ((*aIt) != myActiveView) {
+ ((XGUI_ViewWindow*)(*aIt)->widget())->windowDeactivated();
+ }
+ }
+ }
+}
+
+
+void XGUI_Viewer::onWindowMinimized(QMdiSubWindow* theWnd)
+{
+ if (myActiveView == theWnd) {
+ myActiveView = 0;
+ QList<QMdiSubWindow*>::iterator aIt;
+ for (aIt = myViews.begin(); aIt != myViews.end(); ++aIt) {
+ if (!(*aIt)->widget()->isMinimized()) {
+ (*aIt)->raise();
+ onWindowActivated(*aIt);
+ break;
+ }
+ }
+ }
+}
+
+/*!
+ SLOT: called on mouse move, processes hilighting
+*/
+void XGUI_Viewer::onMouseMove(XGUI_ViewWindow* theWindow, QMouseEvent* theEvent)
+{
+ XGUI_ViewPort* aViewPort = theWindow->viewPort();
+ Handle(V3d_View) aView3d = aViewPort->getView();
+
+ if ( !aView3d.IsNull() ) {
+ myAISContext->MoveTo(theEvent->x(), theEvent->y(), aView3d);
+ mouseMoved(theEvent->pos());
+ }
+}
+
+/*!
+ SLOT: called on mouse button release, finishes selection
+*/
+void XGUI_Viewer::onMouseReleased(XGUI_ViewWindow* theWindow, QMouseEvent* theEvent)
+{
+ myAISContext->Select();
+
+ emit mouseReleased(theEvent->pos());