// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
-// #pragma implementation
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
IMPLEMENT_DYNAMIC_CLASS(DiagramView, wxView)
BEGIN_EVENT_TABLE(DiagramView, wxView)
- EVT_MENU(OGLEDIT_CUT, DiagramView::OnCut)
+ EVT_MENU(wxID_CUT, DiagramView::OnCut)
EVT_MENU(OGLEDIT_CHANGE_BACKGROUND_COLOUR, DiagramView::OnChangeBackgroundColour)
EVT_MENU(OGLEDIT_EDIT_LABEL, DiagramView::OnEditLabel)
END_EVENT_TABLE()
// This part was added to preform the print preview and printing functions
- dc->BeginDrawing(); // Allows optimization of drawing code under MS Windows.
wxDiagram *diagram_p=((DiagramDocument*)GetDocument())->GetDiagram(); // Get the current diagram
if (diagram_p->GetShapeList())
{
current = current->GetNext(); // Procede to the next shape in the list
}
}
- dc->EndDrawing(); // Allows optimization of drawing code under MS Windows.
}
void DiagramView::OnUpdate(wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint))
wxShape *theShape = FindSelectedShape();
if (theShape)
- doc->GetCommandProcessor()->Submit(new DiagramCommand(_T("Cut"), OGLEDIT_CUT, doc, NULL, 0.0, 0.0, true, theShape));
+ doc->GetCommandProcessor()->Submit(new DiagramCommand(_T("Cut"), wxID_CUT, doc, NULL, 0.0, 0.0, true, theShape));
}
void DiagramView::OnChangeBackgroundColour(wxCommandEvent& WXUNUSED(event))