X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1fc25a89ac1e6c5208db24bfc0abc8666b791dc6..c80217d1075b038dcfad8f657a620d89bf565493:/contrib/samples/ogl/ogledit/doc.cpp diff --git a/contrib/samples/ogl/ogledit/doc.cpp b/contrib/samples/ogl/ogledit/doc.cpp index 3557696662..90545046d5 100644 --- a/contrib/samples/ogl/ogledit/doc.cpp +++ b/contrib/samples/ogl/ogledit/doc.cpp @@ -14,7 +14,7 @@ #endif // For compilers that support precompilation, includes "wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop @@ -28,13 +28,12 @@ #error You must set wxUSE_DOC_VIEW_ARCHITECTURE to 1 in wx_setup.h! #endif -#include #include "ogledit.h" #include "doc.h" #include "view.h" #if wxUSE_STD_IOSTREAM -#include +#include #endif IMPLEMENT_DYNAMIC_CLASS(DiagramDocument, wxDocument) @@ -54,7 +53,7 @@ bool DiagramDocument::OnCloseDocument(void) } #if wxUSE_STD_IOSTREAM -ostream& DiagramDocument::SaveObject(ostream& stream) +wxSTD ostream& DiagramDocument::SaveObject(wxSTD ostream& stream) { wxDocument::SaveObject(stream); @@ -69,7 +68,7 @@ ostream& DiagramDocument::SaveObject(ostream& stream) return stream; } -istream& DiagramDocument::LoadObject(istream& stream) +wxSTD istream& DiagramDocument::LoadObject(wxSTD istream& stream) { wxDocument::LoadObject(stream); @@ -88,6 +87,8 @@ istream& DiagramDocument::LoadObject(istream& stream) wxOutputStream& DiagramDocument::SaveObject(wxOutputStream& stream) { +#if wxUSE_PROLOGIO + wxDocument::SaveObject(stream); char buf[400]; (void) wxGetTempFileName("diag", buf); @@ -97,16 +98,17 @@ wxOutputStream& DiagramDocument::SaveObject(wxOutputStream& stream) wxTransferFileToStream(buf, stream); wxRemoveFile(buf); - + +#endif return stream; } wxInputStream& DiagramDocument::LoadObject(wxInputStream& stream) { +#if wxUSE_PROLOGIO wxDocument::LoadObject(stream); - char buf[400]; (void) wxGetTempFileName("diag", buf); @@ -115,6 +117,7 @@ wxInputStream& DiagramDocument::LoadObject(wxInputStream& stream) diagram.DeleteAllShapes(); diagram.LoadFile(buf); wxRemoveFile(buf); +#endif return stream; } @@ -547,6 +550,8 @@ void MyEvtHandler::OnEndSize(double x, double y) /* * Diagram */ + +#if wxUSE_PROLOGIO bool MyDiagram::OnShapeSave(wxExprDatabase& db, wxShape& shape, wxExpr& expr) { @@ -569,6 +574,8 @@ bool MyDiagram::OnShapeLoad(wxExprDatabase& db, wxShape& shape, wxExpr& expr) return TRUE; } +#endif + /* * New shapes */