X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2ba06d5a8ccf8c224fcfbd52fa01a55abf7befbd..88517d90087856e01002f1e3dea1a0ce659f28ea:/contrib/samples/ogl/studio/csprint.cpp diff --git a/contrib/samples/ogl/studio/csprint.cpp b/contrib/samples/ogl/studio/csprint.cpp index ff3e0ec461..862d0deaba 100644 --- a/contrib/samples/ogl/studio/csprint.cpp +++ b/contrib/samples/ogl/studio/csprint.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: csprint.cpp +// Name: contrib/samples/ogl/studio/csprint.cpp // Purpose: Printing and clipboard functionality // Author: Julian Smart // Modified by: @@ -9,10 +9,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -// #pragma implementation -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -21,16 +17,15 @@ #endif #ifndef WX_PRECOMP -#include +#include "wx/wx.h" #endif -#include -#include +#include "wx/ogl/ogl.h" // base header of OGL, includes and adjusts wx/deprecated/setup.h -#include +#include "wx/clipbrd.h" #ifdef __WXMSW__ -#include +#include "wx/metafile.h" #endif #include "studio.h" @@ -70,7 +65,7 @@ bool wxDiagramClipboard::DoCopy(wxDiagram* diagramFrom, wxDiagram* diagramTo, bo // First copy all node shapes. wxList* shapeList = diagramFrom->GetShapeList(); - wxNode* node = shapeList->GetFirst(); + wxObjectList::compatibility_iterator node = shapeList->GetFirst(); while (node) { wxShape* shape = (wxShape*) node->GetData(); @@ -137,7 +132,7 @@ bool wxDiagramClipboard::DoCopy(wxDiagram* diagramFrom, wxDiagram* diagramTo, bo // Make a list of all the new lines, in the same order as the old lines. // Then apply the list of new lines to the shape. wxList newLines; - wxNode* lineNode = shape->GetLines().GetFirst(); + wxObjectList::compatibility_iterator lineNode = shape->GetLines().GetFirst(); while (lineNode) { wxLineShape* lineShape = (wxLineShape*) lineNode->GetData(); @@ -190,7 +185,7 @@ bool wxDiagramClipboard::CopyToClipboard(double scale) if (!newBitmap->Ok()) { delete newBitmap; - + wxChar buf[200]; wxSprintf(buf, _T("Sorry, could not allocate clipboard bitmap (%dx%d)"), (maxX+10), (maxY+10)); wxMessageBox(buf, _T("Clipboard copy problem")); @@ -226,7 +221,7 @@ bool wxDiagramClipboard::CopyToClipboard(double scale) // Close clipboard wxCloseClipboard(); } - + delete newBitmap; delete mf; @@ -323,5 +318,3 @@ bool csDiagramClipboard::OnAddShape(wxDiagram* diagramTo, wxShape* newShape, wxD return true; } - -