// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart and Markus Holzem
-// Licence: wxWindows license
+// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#include "wx/wx.h"
#endif
#include "wx/txtstrm.h"
+#ifdef __WXMAC__
+#include "wx/filename.h"
+#endif
#if !wxUSE_DOC_VIEW_ARCHITECTURE
#error You must set wxUSE_DOC_VIEW_ARCHITECTURE to 1 in setup.h!
#include "doc.h"
#include "view.h"
-
IMPLEMENT_DYNAMIC_CLASS(DrawingDocument, wxDocument)
DrawingDocument::DrawingDocument(void)
}
#if wxUSE_STD_IOSTREAM
-ostream& DrawingDocument::SaveObject(ostream& stream)
+wxSTD ostream& DrawingDocument::SaveObject(wxSTD ostream& stream)
{
wxDocument::SaveObject(stream);
#endif
#if wxUSE_STD_IOSTREAM
-istream& DrawingDocument::LoadObject(istream& stream)
+wxSTD istream& DrawingDocument::LoadObject(wxSTD istream& stream)
{
wxDocument::LoadObject(stream);
}
#if wxUSE_STD_IOSTREAM
-ostream& DoodleSegment::SaveObject(ostream& stream)
+wxSTD ostream& DoodleSegment::SaveObject(wxSTD ostream& stream)
{
wxInt32 n = lines.Number();
stream << n << '\n';
wxTextOutputStream text_stream( stream );
wxInt32 n = lines.Number();
- text_stream << n << '\n';
+ text_stream << n << _T('\n');
wxNode *node = lines.First();
while (node)
{
DoodleLine *line = (DoodleLine *)node->Data();
- text_stream << line->x1 << " " <<
- line->y1 << " " <<
- line->x2 << " " <<
- line->y2 << "\n";
+ text_stream << line->x1 << _T(" ") <<
+ line->y1 << _T(" ") <<
+ line->x2 << _T(" ") <<
+ line->y2 << _T("\n");
node = node->Next();
}
#endif
#if wxUSE_STD_IOSTREAM
-istream& DoodleSegment::LoadObject(istream& stream)
+wxSTD istream& DoodleSegment::LoadObject(wxSTD istream& stream)
{
wxInt32 n = 0;
stream >> n;
if (!view->textsw->SaveFile(filename))
return FALSE;
Modify(FALSE);
+#ifdef __WXMAC__
+ wxFileName fn(filename) ;
+ fn.MacSetDefaultTypeAndCreator() ;
+#endif
return TRUE;
}