]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/docview/doc.h
Implement watching directory correctly in MSW wxFileSystemWatcher.
[wxWidgets.git] / samples / docview / doc.h
index ecc1453a382488bf1256b45d3cc398e86faec24e..d79f8275de31b43f0a7376e7dd6b8098b5140059 100644 (file)
@@ -7,7 +7,7 @@
 // RCS-ID:      $Id$
 // Copyright:   (c) 1998 Julian Smart
 //              (c) 2008 Vadim Zeitlin
-// Licence:     wxWindows license
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifndef _WX_SAMPLES_DOCVIEW_DOC_H_
@@ -166,7 +166,7 @@ class wxTextDocument : public wxDocument
 public:
     wxTextDocument() : wxDocument() { }
 
-    virtual bool OnCreate(const wxString& path, long flags); 
+    virtual bool OnCreate(const wxString& path, long flags);
 
     virtual wxTextCtrl* GetTextCtrl() const = 0;
 
@@ -198,33 +198,24 @@ public:
 };
 
 // ----------------------------------------------------------------------------
-// A basic image document class
+// A document class representing an image
 // ----------------------------------------------------------------------------
 
-class wxImageDocument : public wxDocument
+class ImageDocument : public wxDocument
 {
-protected:
-    wxImage m_image;
 public:
-    wxImageDocument();
-
-    wxImage*       GetImage()       { return &m_image; }
-    const wxImage& GetImage() const { return m_image; }
-
-    bool SaveFile(wxOutputStream*, wxBitmapType) const;
+    ImageDocument() : wxDocument() { }
 
-public:
-    virtual ~wxImageDocument();
-    virtual bool DeleteContents();
+    wxImage GetImage() const { return m_image; }
 
+protected:
     virtual bool DoOpenDocument(const wxString& file);
-    virtual bool DoSaveDocument(const wxString& file);
 
-    virtual bool DoOpenDocument(wxInputStream*);
-    virtual bool DoSaveDocument(wxOutputStream*) const;
+private:
+    wxImage m_image;
 
-    wxDECLARE_NO_COPY_CLASS(wxImageDocument);
-    DECLARE_DYNAMIC_CLASS(wxImageDocument)
+    wxDECLARE_NO_COPY_CLASS(ImageDocument);
+    DECLARE_DYNAMIC_CLASS(ImageDocument)
 };
 
 #endif // _WX_SAMPLES_DOCVIEW_DOC_H_