1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-05-06 10:36:12 +03:00
occt/samples/mfc/standard/01_Geometry/src/GeometryView.cpp
aba 4716247158 0025284: Problems with standard MFC samples
- OCAF sample Save Document option: corrected conversion from LPCTSTR to Standard_CString
 - HLR sample: corrected mouse move event handling for HLR 2D view; Corrected CSelectionDialog view displaying and updating
 - Geometry sample: CGeometryDoc correction to avoid code duplication
 - OCC_3dBaseDoc: corrected DragEvent() handler for proper emulation of rectangle selection.
 - Viewer3d sample: moved resource files (resource.h; resource.hm; AISToolbar.bmp) from /src to /res

Code style changes

Fixed "About" dialog error in release.

Corrected dimension dialogs

Workaround for dimensions sample: AIS_LocalContext::SelectedShape() doesn't take into account TopoDS shape local transformation, and operates with selected interactive transformation.
2014-10-09 16:02:12 +04:00

68 lines
1.4 KiB
C++
Executable File

// GeometryView.cpp : implementation of the CGeometryView class
//
#include "stdafx.h"
#include "GeometryApp.h"
#include <GeometryApp.h>
#include "GeometryDoc.h"
#include "GeometryView.h"
#define ValZWMin 1
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CGeometryView
IMPLEMENT_DYNCREATE(CGeometryView, OCC_3dView)
BEGIN_MESSAGE_MAP(CGeometryView, OCC_3dView)
//{{AFX_MSG_MAP(CGeometryView)
ON_COMMAND(ID_FILE_EXPORT_IMAGE, OnFileExportImage)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CGeometryView construction/destruction
CGeometryView::CGeometryView()
{
}
CGeometryView::~CGeometryView()
{
}
/////////////////////////////////////////////////////////////////////////////
// CGeometryView diagnostics
#ifdef _DEBUG
void CGeometryView::AssertValid() const
{
CView::AssertValid();
}
void CGeometryView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CGeometryDoc* CGeometryView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CGeometryDoc)));
return (CGeometryDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CGeometryView message handlers
void CGeometryView::OnFileExportImage()
{
GetDocument()->ExportView (myView);
}