This commit is contained in:
parent
17b863e4be
commit
9be320207d
12 changed files with 308 additions and 202 deletions
|
@ -19,6 +19,7 @@ IMPLEMENT_DYNCREATE(CMapEditDoc, CDocument)
|
|||
|
||||
BEGIN_MESSAGE_MAP(CMapEditDoc, CDocument)
|
||||
//{{AFX_MSG_MAP(CMapEditDoc)
|
||||
ON_UPDATE_COMMAND_UI(ID_INDICATOR_CURSORXY, OnStatusCursorXY)
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
@ -35,12 +36,9 @@ CMapEditDoc::~CMapEditDoc()
|
|||
|
||||
BOOL CMapEditDoc::OnNewDocument()
|
||||
{
|
||||
if (!CDocument::OnNewDocument())
|
||||
return FALSE;
|
||||
if (!CDocument::OnNewDocument()) return FALSE;
|
||||
TRACE0("New Doc\n");
|
||||
|
||||
// TODO: add reinitialization code here
|
||||
// (SDI documents will reuse this document)
|
||||
Core.NewMap();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -51,21 +49,19 @@ BOOL CMapEditDoc::OnOpenDocument(LPCTSTR lpszPathName)
|
|||
return FALSE;
|
||||
|
||||
TRACE1("Load Doc %s\n",lpszPathName);
|
||||
|
||||
// TODO: Add your specialized creation code here
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CMapEditDoc serialization
|
||||
|
||||
void CMapEditDoc::Serialize(CArchive& ar)
|
||||
{
|
||||
if (ar.IsStoring())
|
||||
{
|
||||
// TODO: add storing code here
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -87,3 +83,83 @@ void CMapEditDoc::Dump(CDumpContext& dc) const
|
|||
CDocument::Dump(dc);
|
||||
}
|
||||
#endif //_DEBUG
|
||||
|
||||
/*********************************************************************************/
|
||||
/*********************************************************************************/
|
||||
/*********************************************************************************/
|
||||
/*********************************************************************************/
|
||||
void CMapEditDoc::UpdateView(CMapEditView *View)
|
||||
{
|
||||
Core.UpdateView(View);
|
||||
}
|
||||
|
||||
/*********************************************************************************/
|
||||
void CMapEditDoc::Render(CMapEditView *View)
|
||||
{
|
||||
Core.Render(View);
|
||||
}
|
||||
|
||||
/*********************************************************************************/
|
||||
void CMapEditDoc::UpdateAll(CMapEditView *View)
|
||||
{
|
||||
Core.UpdateAll(View);
|
||||
}
|
||||
|
||||
/*********************************************************************************/
|
||||
void CMapEditDoc::OnStatusCursorXY(CCmdUI *pCmdUI)
|
||||
{
|
||||
|
||||
CPoint &XY=Core.GetCursorPos();
|
||||
CString XYStr;
|
||||
pCmdUI->Enable();
|
||||
if (XY.x!=-1 && XY.y!=-1)
|
||||
XYStr.Format( "%d\t%d", XY.x,XY.y);
|
||||
pCmdUI->SetText(XYStr);
|
||||
}
|
||||
|
||||
/*********************************************************************************/
|
||||
/*********************************************************************************/
|
||||
/*** Windows Message Handlers ****************************************************/
|
||||
/*********************************************************************************/
|
||||
/*********************************************************************************/
|
||||
void CMapEditDoc::LButtonControl(CMapEditView *View,UINT nFlags, CPoint &point,BOOL DownFlag)
|
||||
{
|
||||
Core.LButtonControl(View,nFlags,point,DownFlag);
|
||||
}
|
||||
|
||||
/*********************************************************************************/
|
||||
void CMapEditDoc::MButtonControl(CMapEditView *View,UINT nFlags, CPoint &point,BOOL DownFlag)
|
||||
{
|
||||
Core.MButtonControl(View,nFlags,point,DownFlag);
|
||||
}
|
||||
|
||||
/*********************************************************************************/
|
||||
void CMapEditDoc::RButtonControl(CMapEditView *View,UINT nFlags, CPoint &point,BOOL DownFlag)
|
||||
{
|
||||
Core.RButtonControl(View,nFlags,point,DownFlag);
|
||||
}
|
||||
|
||||
/*********************************************************************************/
|
||||
void CMapEditDoc::MouseWheel(CMapEditView *View,UINT nFlags, short zDelta, CPoint &point)
|
||||
{
|
||||
Core.MouseWheel(View,nFlags,zDelta,point);
|
||||
}
|
||||
|
||||
/*********************************************************************************/
|
||||
void CMapEditDoc::MouseMove(CMapEditView *View,UINT nFlags, CPoint &point)
|
||||
{
|
||||
Core.MouseMove(View,nFlags,point);
|
||||
}
|
||||
|
||||
/*********************************************************************************/
|
||||
void CMapEditDoc::ToggleLayerView(CMapEditView *View)
|
||||
{
|
||||
Core.ToggleLayerView(View);
|
||||
}
|
||||
|
||||
/*********************************************************************************/
|
||||
void CMapEditDoc::ToggleTileView(CMapEditView *View)
|
||||
{
|
||||
Core.ToggleTileView(View);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue