1 // OCC_2dView.cpp: implementation of the OCC_2dView class.
3 //////////////////////////////////////////////////////////////////////
6 #include "OCC_2dView.h"
10 #include "resource2d\RectangularGrid.h"
11 #include "resource2d\CircularGrid.h"
13 #include "Quantity_Color.hxx"
14 #include "Quantity_NameOfColor.hxx"
18 // the key for multi selection :
19 #define MULTISELECTIONKEY MK_SHIFT
21 // the key for shortcut ( use to activate dynamic rotation, panning )
22 #define CASCADESHORTCUTKEY MK_CONTROL
24 // define in witch case you want to display the popup
25 #define POPUPONBUTTONDOWN
27 /////////////////////////////////////////////////////////////////////////////
30 IMPLEMENT_DYNCREATE(OCC_2dView, CView)
32 BEGIN_MESSAGE_MAP(OCC_2dView, CView)
33 //{{AFX_MSG_MAP(OCC_2dView)
34 // NOTE - the ClassWizard will add and remove mapping macros here.
35 // DO NOT EDIT what you see in these blocks of generated code!
36 ON_COMMAND(ID_FILE_EXPORT_IMAGE, OnFileExportImage)
37 ON_COMMAND(ID_BUTTON2DGridRectLines, OnBUTTONGridRectLines)
38 ON_COMMAND(ID_BUTTON2DGridRectPoints, OnBUTTONGridRectPoints)
39 ON_COMMAND(ID_BUTTON2DGridCircLines, OnBUTTONGridCircLines)
40 ON_COMMAND(ID_BUTTON2DGridCircPoints, OnBUTTONGridCircPoints)
41 ON_COMMAND(ID_BUTTON2DGridValues, OnBUTTONGridValues)
42 ON_UPDATE_COMMAND_UI(ID_BUTTON2DGridValues, OnUpdateBUTTONGridValues)
43 ON_COMMAND(ID_BUTTON2DGridCancel, OnBUTTONGridCancel)
44 ON_UPDATE_COMMAND_UI(ID_BUTTON2DGridCancel, OnUpdateBUTTONGridCancel)
53 ON_COMMAND(ID_BUTTON2DFitAll, OnBUTTONFitAll)
54 ON_COMMAND(ID_BUTTON2DGlobPanning, OnBUTTONGlobPanning)
55 ON_COMMAND(ID_BUTTON2DPanning, OnBUTTONPanning)
56 ON_COMMAND(ID_BUTTON2DZoomProg, OnBUTTONZoomProg)
57 ON_COMMAND(ID_BUTTON2DZoomWin, OnBUTTONZoomWin)
58 ON_UPDATE_COMMAND_UI(ID_BUTTON2DGlobPanning, OnUpdateBUTTON2DGlobPanning)
59 ON_UPDATE_COMMAND_UI(ID_BUTTON2DPanning, OnUpdateBUTTON2DPanning)
60 ON_UPDATE_COMMAND_UI(ID_BUTTON2DZoomProg, OnUpdateBUTTON2DZoomProg)
61 ON_UPDATE_COMMAND_UI(ID_BUTTON2DZoomWin, OnUpdateBUTTON2DZoomWin)
62 ON_COMMAND(ID_Modify_ChangeBackground ,OnChangeBackground)
66 /////////////////////////////////////////////////////////////////////////////
67 // OCC_2dView construction/destruction
69 OCC_2dView::OCC_2dView()
70 : myCurrentMode (CurAction2d_Nothing)
74 OCC_2dView::~OCC_2dView()
79 BOOL OCC_2dView::PreCreateWindow(CREATESTRUCT& cs)
81 // TODO: Modify the Window class or styles here by modifying
82 // the CREATESTRUCT cs
83 cs.lpszClass = ::AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS | CS_OWNDC, ::LoadCursor(NULL, IDC_ARROW), NULL, NULL);
84 return CView::PreCreateWindow(cs);
87 /////////////////////////////////////////////////////////////////////////////
90 void OCC_2dView::OnDraw(CDC* /*pDC*/)
92 if (!myV2dView.IsNull())
96 void OCC_2dView::OnInitialUpdate()
98 CView::OnInitialUpdate();
100 Handle(WNT_Window) aWNTWindow = new WNT_Window(GetSafeHwnd(),Quantity_NOC_MATRAGRAY);
101 myV2dView =((OCC_2dDoc*)GetDocument())->GetViewer2D()->CreateView();
102 myV2dView->SetWindow(aWNTWindow);
103 // initialize the grids dialogs
104 TheRectangularGridDialog.Create(CRectangularGrid::IDD, NULL);
105 TheCircularGridDialog.Create(CCircularGrid::IDD, NULL);
106 TheRectangularGridDialog.SetViewer (((OCC_2dDoc*)GetDocument())->GetViewer2D());
107 TheCircularGridDialog.SetViewer (((OCC_2dDoc*)GetDocument())->GetViewer2D());
109 Standard_Integer w=100 , h=100 ; /* Debug Matrox */
110 aWNTWindow->Size (w,h) ; /* Keeps me unsatisfied (rlb)..... */
111 /* Resize is not supposed to be done on */
113 /* I suspect another problem elsewhere */
114 ::PostMessage ( GetSafeHwnd () , WM_SIZE , SIZE_RESTORED , w + h*65536 ) ;
118 void OCC_2dView::OnFileExportImage()
120 GetDocument()->ExportView (myV2dView);
123 /////////////////////////////////////////////////////////////////////////////
124 // OCC_2dView diagnostics
127 void OCC_2dView::AssertValid() const
129 CView::AssertValid();
132 void OCC_2dView::Dump(CDumpContext& dc) const
137 OCC_2dDoc* OCC_2dView::GetDocument() // non-debug version is inline
139 //ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(OCC_2dDoc)));
140 return (OCC_2dDoc*)m_pDocument;
143 void OCC_2dView::OnBUTTONGridRectLines()
145 Handle(V3d_Viewer) aViewer = myV2dView->Viewer();
146 Handle(Graphic3d_AspectMarker3d) aGridAspect = new Graphic3d_AspectMarker3d(Aspect_TOM_RING1,Quantity_NOC_WHITE,2);
147 aViewer->SetGridEcho(aGridAspect);
148 Standard_Integer aWidth=0, aHeight=0, anOffset=0;
149 myV2dView->Window()->Size(aWidth,aHeight);
150 aViewer->SetRectangularGridGraphicValues(aWidth,aHeight,anOffset);
151 aViewer->ActivateGrid(Aspect_GT_Rectangular, Aspect_GDM_Lines);
154 if (TheCircularGridDialog.IsWindowVisible())
156 TheCircularGridDialog.ShowWindow(SW_HIDE);
157 TheRectangularGridDialog.UpdateValues();
158 TheRectangularGridDialog.ShowWindow(SW_SHOW);
162 void OCC_2dView::OnBUTTONGridRectPoints()
164 Handle(V3d_Viewer) aViewer = myV2dView->Viewer();
165 Handle(Graphic3d_AspectMarker3d) aGridAspect = new Graphic3d_AspectMarker3d(Aspect_TOM_RING1,Quantity_NOC_WHITE,2);
166 aViewer->SetGridEcho(aGridAspect);
167 Standard_Integer aWidth=0, aHeight=0, anOffset=0;
168 myV2dView->Window()->Size(aWidth,aHeight);
169 aViewer->SetRectangularGridGraphicValues(aWidth,aHeight,anOffset);
170 aViewer->ActivateGrid(Aspect_GT_Rectangular, Aspect_GDM_Points);
173 if (TheCircularGridDialog.IsWindowVisible())
175 TheCircularGridDialog.ShowWindow(SW_HIDE);
176 TheRectangularGridDialog.UpdateValues();
177 TheRectangularGridDialog.ShowWindow(SW_SHOW);
181 void OCC_2dView::OnBUTTONGridCircLines()
183 Handle(V3d_Viewer) aViewer = myV2dView->Viewer();
184 Handle(Graphic3d_AspectMarker3d) aGridAspect = new Graphic3d_AspectMarker3d(Aspect_TOM_RING1,Quantity_NOC_WHITE,2);
185 aViewer->SetGridEcho(aGridAspect);
186 Standard_Integer aWidth=0, aHeight=0, anOffset=0;
187 myV2dView->Window()->Size(aWidth,aHeight);
188 aViewer->SetCircularGridGraphicValues(aWidth>aHeight?aWidth:aHeight,anOffset);
189 aViewer->ActivateGrid(Aspect_GT_Circular, Aspect_GDM_Lines);
193 if (TheRectangularGridDialog.IsWindowVisible())
195 TheRectangularGridDialog.ShowWindow(SW_HIDE);
196 TheCircularGridDialog.UpdateValues();
197 TheCircularGridDialog.ShowWindow(SW_SHOW);
201 void OCC_2dView::OnBUTTONGridCircPoints()
203 Handle(V3d_Viewer) aViewer = myV2dView->Viewer();
204 Handle(Graphic3d_AspectMarker3d) aGridAspect = new Graphic3d_AspectMarker3d(Aspect_TOM_RING1,Quantity_NOC_WHITE,2);
205 aViewer->SetGridEcho(aGridAspect);
206 Standard_Integer aWidth=0, aHeight=0, anOffset=0;
207 myV2dView->Window()->Size(aWidth,aHeight);
208 aViewer->SetCircularGridGraphicValues(aWidth>aHeight?aWidth:aHeight,anOffset);
209 aViewer->ActivateGrid(Aspect_GT_Circular, Aspect_GDM_Points);
211 if (TheRectangularGridDialog.IsWindowVisible())
213 TheRectangularGridDialog.ShowWindow(SW_HIDE);
214 TheCircularGridDialog.UpdateValues();
215 TheCircularGridDialog.ShowWindow(SW_SHOW);
219 void OCC_2dView::OnBUTTONGridValues()
221 Handle(V3d_Viewer) aViewer = myV2dView->Viewer();
222 Aspect_GridType TheGridtype = aViewer->GridType();
224 switch( TheGridtype )
226 case Aspect_GT_Rectangular:
227 TheRectangularGridDialog.UpdateValues();
228 TheRectangularGridDialog.ShowWindow(SW_SHOW);
230 case Aspect_GT_Circular:
231 TheCircularGridDialog.UpdateValues();
232 TheCircularGridDialog.ShowWindow(SW_SHOW);
235 throw Standard_Failure("invalid Aspect_GridType");
238 void OCC_2dView::OnUpdateBUTTONGridValues(CCmdUI* pCmdUI)
240 Handle(V3d_Viewer) aViewer = myV2dView->Viewer();
241 pCmdUI-> Enable( aViewer->IsActive() );
244 void OCC_2dView::OnBUTTONGridCancel()
246 Handle(V3d_Viewer) aViewer = myV2dView->Viewer();
247 aViewer->DeactivateGrid();
248 TheRectangularGridDialog.ShowWindow(SW_HIDE);
249 TheCircularGridDialog.ShowWindow(SW_HIDE);
252 void OCC_2dView::OnUpdateBUTTONGridCancel(CCmdUI* pCmdUI)
254 Handle(V3d_Viewer) aViewer = myV2dView->Viewer();
255 pCmdUI-> Enable( aViewer->IsActive() );
258 void OCC_2dView::OnLButtonDown(UINT nFlags, CPoint point)
260 // save the current mouse coordinate in min
261 myXmin=point.x; myYmin=point.y;
262 myXmax=point.x; myYmax=point.y;
264 if ( nFlags & CASCADESHORTCUTKEY )
266 // Button MB1 down Control :start zomming
269 else // if ( MULTISELECTIONKEY )
271 switch (myCurrentMode)
273 case CurAction2d_Nothing : // start a drag
274 DragEvent2D(point.x,point.y,-1);
276 case CurAction2d_DynamicZooming : // nothing
278 case CurAction2d_WindowZooming : // nothing
280 case CurAction2d_DynamicPanning :// nothing
282 case CurAction2d_GlobalPanning :// nothing
285 throw Standard_Failure(" incompatible Current Mode ");
292 void OCC_2dView::OnLButtonUp(UINT nFlags, CPoint point)
294 // TODO: Add your message handler code here and/or call default
295 if ( nFlags & CASCADESHORTCUTKEY )
301 const Handle(AIS_InteractiveContext)& aContext = GetDocument()->GetAISContext();
302 switch (myCurrentMode)
304 case CurAction2d_Nothing :
305 if (point.x == myXmin && point.y == myYmin)
306 { // no offset between down and up --> selectEvent
309 if (nFlags & MULTISELECTIONKEY )
310 MultiInputEvent2D(point.x,point.y);
312 InputEvent2D (point.x,point.y);
315 drawRectangle (myXmin, myYmin, myXmax, myYmax, aContext, Standard_False);
318 if (nFlags & MULTISELECTIONKEY)
319 MultiDragEvent2D(point.x,point.y,1);
321 DragEvent2D(point.x,point.y,1);
324 case CurAction2d_DynamicZooming :
326 myCurrentMode = CurAction2d_Nothing;
328 case CurAction2d_WindowZooming :
329 myXmax=point.x; myYmax=point.y;
330 drawRectangle (myXmin, myYmin, myXmax, myYmax, aContext, Standard_False);
331 if ((abs(myXmin-myXmax)>ValZWMin) || (abs(myYmin-myYmax)>ValZWMin))
332 // Test if the zoom window is greater than a minimale window.
334 // Do the zoom window between Pmin and Pmax
335 myV2dView->WindowFit(myXmin,myYmin,myXmax,myYmax);
337 myCurrentMode = CurAction2d_Nothing;
339 case CurAction2d_DynamicPanning :
340 myCurrentMode = CurAction2d_Nothing;
342 case CurAction2d_GlobalPanning :
343 myV2dView->Place(point.x,point.y,myCurZoom);
344 myCurrentMode = CurAction2d_Nothing;
347 throw Standard_Failure(" incompatible Current Mode ");
349 } //switch (myCurrentMode)
350 } // else // if ( CASCADESHORTCUTKEY )
353 void OCC_2dView::OnMButtonDown(UINT nFlags, CPoint /*point*/)
355 if ( nFlags & CASCADESHORTCUTKEY )
357 // Button MB2 down + CASCADESHORTCUTKEY : panning init
362 void OCC_2dView::OnMButtonUp(UINT nFlags, CPoint /*point*/)
364 if ( nFlags & CASCADESHORTCUTKEY )
366 // Button MB2 up + CASCADESHORTCUTKEY : panning stop
370 void OCC_2dView::OnRButtonDown(UINT nFlags, CPoint point)
372 #ifdef POPUPONBUTTONDOWN
373 if ( !(nFlags & CASCADESHORTCUTKEY) )
374 Popup2D(point.x,point.y);
378 void OCC_2dView::OnRButtonUp(UINT
379 #ifndef POPUPONBUTTONDOWN
383 #ifndef POPUPONBUTTONDOWN
388 #ifndef POPUPONBUTTONDOWN
389 if ( !(nFlags & CASCADESHORTCUTKEY) )
390 Popup2D(point.x,point.y);
394 void OCC_2dView::OnMouseMove(UINT nFlags, CPoint point)
396 // ============================ LEFT BUTTON =======================
397 if ( (nFlags & MK_LBUTTON) &! (nFlags & MK_RBUTTON) ) // Left + Right is specific
399 if ( nFlags & CASCADESHORTCUTKEY )
401 // move with MB1 and CASCADESHORTCUTKEY : on the dynamic zooming
402 // Do the zoom in function of mouse's coordinates
403 myV2dView->Zoom(myXmax,myYmax,point.x,point.y);
404 // save the current mouse coordinate in min
408 else // if ( CASCADESHORTCUTKEY )
410 const Handle(AIS_InteractiveContext)& aContext = GetDocument()->GetAISContext();
411 switch (myCurrentMode)
413 case CurAction2d_Nothing :
414 myXmax = point.x; myYmax = point.y;
415 DragEvent2D(myXmax,myYmax,0);
416 drawRectangle (myXmin, myYmin, myXmax, myYmax, aContext);
418 case CurAction2d_DynamicZooming :
419 myV2dView->Zoom(myXmax,myYmax,point.x,point.y);
420 // save the current mouse coordinate in min \n";
421 myXmax=point.x; myYmax=point.y;
423 case CurAction2d_WindowZooming :
426 drawRectangle (myXmin, myYmin, myXmax, myYmax, aContext);
428 case CurAction2d_DynamicPanning :
429 myV2dView->Pan(point.x-myXmax,myYmax-point.y); // Realize the panning
430 myXmax = point.x; myYmax = point.y;
432 case CurAction2d_GlobalPanning : // nothing
435 throw Standard_Failure(" incompatible Current Mode ");
437 }// switch (myCurrentMode)
438 }// if ( nFlags & CASCADESHORTCUTKEY ) else
439 } else // if ( nFlags & MK_LBUTTON)
440 // ============================ MIDDLE BUTTON =======================
441 if ( nFlags & MK_MBUTTON)
443 if ( nFlags & CASCADESHORTCUTKEY )
445 myV2dView->Pan(point.x-myXmax,myYmax-point.y); // Realize the panning
446 myXmax = point.x; myYmax = point.y;
449 } else // if ( nFlags & MK_MBUTTON)
450 // ============================ RIGHT BUTTON =======================
451 if ( (nFlags & MK_RBUTTON) &! (nFlags & MK_LBUTTON) ) // Left + Right is specific
453 }else //if ( nFlags & MK_RBUTTON)
454 if ( (nFlags & MK_RBUTTON) && (nFlags & MK_LBUTTON) )
456 // in case of Left + Right : same as Middle
457 if ( nFlags & CASCADESHORTCUTKEY )
459 myV2dView->Pan(point.x-myXmax,myYmax-point.y); // Realize the panning
460 myXmax = point.x; myYmax = point.y;
462 }else //if ( nFlags & MK_RBUTTON)&& (nFlags & MK_LBUTTON)
463 // ============================ NO BUTTON =======================
465 myXmax = point.x; myYmax = point.y;
466 if (nFlags & MULTISELECTIONKEY)
467 MultiMoveEvent2D(point.x,point.y);
469 MoveEvent2D(point.x,point.y);
474 void OCC_2dView::OnSize(UINT nType, int cx, int cy)
476 OCC_BaseView::OnSize (nType, cx, cy);
477 // Take care : This fonction is call before OnInitialUpdate
478 if (!myV2dView.IsNull())
479 myV2dView->MustBeResized();
482 void OCC_2dView::OnBUTTONFitAll()
487 void OCC_2dView::OnBUTTONGlobPanning()
489 //save the current zoom value
490 myCurZoom = myV2dView->Scale();
496 myCurrentMode = CurAction2d_GlobalPanning;
498 void OCC_2dView::OnBUTTONPanning()
500 myCurrentMode = CurAction2d_DynamicPanning;
502 void OCC_2dView::OnBUTTONZoomProg()
504 myCurrentMode = CurAction2d_DynamicZooming;
506 void OCC_2dView::OnBUTTONZoomWin()
508 myCurrentMode = CurAction2d_WindowZooming;
510 void OCC_2dView::OnChangeBackground()
512 Standard_Real R1, G1, B1;
513 Handle(Aspect_Window) aWindow = myV2dView->Window();
514 Aspect_Background ABack = aWindow->Background();
515 Quantity_Color aColor = ABack.Color();
516 aColor.Values(R1,G1,B1,Quantity_TOC_RGB);
518 m_clr = RGB(R1*255,G1*255,B1*255);
520 CColorDialog dlgColor(m_clr);
521 if (dlgColor.DoModal() == IDOK)
523 m_clr = dlgColor.GetColor();
524 R1 = GetRValue(m_clr)/255.;
525 G1 = GetGValue(m_clr)/255.;
526 B1 = GetBValue(m_clr)/255.;
527 aColor.SetValues(R1,G1,B1,Quantity_TOC_RGB);
528 myV2dView->SetBackgroundColor(aColor);
534 void OCC_2dView::OnUpdateBUTTON2DGlobPanning(CCmdUI* pCmdUI)
536 pCmdUI->SetCheck (myCurrentMode == CurAction2d_GlobalPanning);
537 pCmdUI->Enable (myCurrentMode != CurAction2d_GlobalPanning);
540 void OCC_2dView::OnUpdateBUTTON2DPanning(CCmdUI* pCmdUI)
542 pCmdUI->SetCheck (myCurrentMode == CurAction2d_DynamicPanning);
543 pCmdUI->Enable (myCurrentMode != CurAction2d_DynamicPanning);
546 void OCC_2dView::OnUpdateBUTTON2DZoomProg(CCmdUI* pCmdUI)
548 pCmdUI->SetCheck (myCurrentMode == CurAction2d_DynamicZooming);
549 pCmdUI->Enable (myCurrentMode != CurAction2d_DynamicZooming);
552 void OCC_2dView::OnUpdateBUTTON2DZoomWin(CCmdUI* pCmdUI)
554 pCmdUI->SetCheck (myCurrentMode == CurAction2d_WindowZooming);
555 pCmdUI->Enable (myCurrentMode != CurAction2d_WindowZooming);
558 // =====================================================================
560 //-----------------------------------------------------------------------------------------
562 //-----------------------------------------------------------------------------------------
563 void OCC_2dView::DragEvent2D(const Standard_Integer x,
564 const Standard_Integer y,
565 const Standard_Integer TheState)
567 // TheState == -1 button down
568 // TheState == 0 move
569 // TheState == 1 button up
571 static Standard_Integer theButtonDownX=0;
572 static Standard_Integer theButtonDownY=0;
582 ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->MoveTo (x, y, myV2dView, Standard_False);
583 ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->Select (theButtonDownX, theButtonDownY, x, y, myV2dView, Standard_True);
588 ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->Select(true);
593 //-----------------------------------------------------------------------------------------
595 //-----------------------------------------------------------------------------------------
596 void OCC_2dView::InputEvent2D(const Standard_Integer /*x*/,
597 const Standard_Integer /*y*/)
599 ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->Select(true);
602 //-----------------------------------------------------------------------------------------
604 //-----------------------------------------------------------------------------------------
605 void OCC_2dView::MoveEvent2D(const Standard_Integer x,
606 const Standard_Integer y)
608 if(myV2dView->Viewer()->Grid()->IsActive())
610 Standard_Real aGridX=0,aGridY=0,aGridZ=0;
611 myV2dView->ConvertToGrid(x,y,aGridX,aGridY,aGridZ);
612 //View is not updated automatically in ConvertToGrid
615 ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->MoveTo (x, y, myV2dView, Standard_True);
618 //-----------------------------------------------------------------------------------------
620 //-----------------------------------------------------------------------------------------
621 void OCC_2dView::MultiMoveEvent2D(const Standard_Integer x,
622 const Standard_Integer y)
624 // MultiMoveEvent2D means we move the mouse in a multi selection mode
625 ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->MoveTo (x, y, myV2dView, Standard_True);
628 //-----------------------------------------------------------------------------------------
630 //-----------------------------------------------------------------------------------------
631 void OCC_2dView::MultiDragEvent2D(const Standard_Integer x ,
632 const Standard_Integer y ,
633 const Standard_Integer TheState)
635 static Standard_Integer theButtonDownX=0;
636 static Standard_Integer theButtonDownY=0;
646 ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->MoveTo (x, y, myV2dView, Standard_False);
647 ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->ShiftSelect (theButtonDownX, theButtonDownY, x, y, myV2dView, Standard_True);
652 ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->ShiftSelect(true);
657 //-----------------------------------------------------------------------------------------
659 //-----------------------------------------------------------------------------------------
660 void OCC_2dView::MultiInputEvent2D(const Standard_Integer /*x*/,
661 const Standard_Integer /*y*/)
663 ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->ShiftSelect(true);
666 //-----------------------------------------------------------------------------------------
668 //-----------------------------------------------------------------------------------------
669 void OCC_2dView::Popup2D(const Standard_Integer x,
670 const Standard_Integer y )
675 // load the 'normal' popup
676 VERIFY(menu.LoadMenu(IDR_Popup2D));
677 // activate the sub menu '0'
678 pPopup= menu.GetSubMenu(0);
679 ASSERT(pPopup != NULL);
682 POINT winCoord = { x , y };
683 ClientToScreen ( &winCoord);
684 pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON , winCoord.x, winCoord.y , AfxGetMainWnd());
687 void OCC_2dView::FitAll()