]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/docview/doc.cpp
adding docset processing instructions
[wxWidgets.git] / samples / docview / doc.cpp
index 4892856fe09fbb4203cb849f21431f1a5c70a77a..713a76d569786199611053feb0e2419740d505e7 100644 (file)
@@ -7,7 +7,7 @@
 // RCS-ID:      $Id$
 // Copyright:   (c) 1998 Julian Smart
 //              (c) 2008 Vadim Zeitlin
-// Licence:     wxWindows license
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // ----------------------------------------------------------------------------
@@ -34,6 +34,7 @@
 #else
     #include "wx/txtstrm.h"
 #endif
+#include "wx/wfstream.h"
 
 #include "doc.h"
 #include "view.h"
@@ -247,3 +248,15 @@ wxTextCtrl* TextEditDocument::GetTextCtrl() const
     wxView* view = GetFirstView();
     return view ? wxStaticCast(view, TextEditView)->GetText() : NULL;
 }
+
+// ----------------------------------------------------------------------------
+// ImageDocument and wxImageDetailsDocument implementation
+// ----------------------------------------------------------------------------
+
+IMPLEMENT_DYNAMIC_CLASS(ImageDocument, wxDocument)
+
+bool ImageDocument::DoOpenDocument(const wxString& file)
+{
+    return m_image.LoadFile(file);
+}
+