]> git.saurik.com Git - wxWidgets.git/commitdiff
added wxUSE_IMAGE; added write-only wxXPMHandler
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 22 Apr 2001 22:21:21 +0000 (22:21 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 22 Apr 2001 22:21:21 +0000 (22:21 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/image.h
include/wx/imagxpm.h [new file with mode: 0644]

index ca9cc6a3c10ce2e857600df931d3f37e25d24565..f814deabba677bb0f67f37d58cc2b8b945088d78 100644 (file)
@@ -24,6 +24,8 @@
 #  include "wx/stream.h"
 #endif
 
+#if wxUSE_IMAGE
+
 //-----------------------------------------------------------------------------
 // classes
 //-----------------------------------------------------------------------------
@@ -248,6 +250,9 @@ WXDLLEXPORT_DATA(extern wxImage)    wxNullImage;
 #include "wx/imagjpeg.h"
 #include "wx/imagtiff.h"
 #include "wx/imagpnm.h"
+#include "wx/imagxpm.h"
+
+#endif // wxUSE_IMAGE
 
 #endif
   // _WX_IMAGE_H_
diff --git a/include/wx/imagxpm.h b/include/wx/imagxpm.h
new file mode 100644 (file)
index 0000000..8ac4cdd
--- /dev/null
@@ -0,0 +1,50 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        imaggif.h
+// Purpose:     wxImage XPM handler
+// Author:      Vaclav Slavik
+// RCS-ID:      $Id$
+// Copyright:   (c) 2001 Vaclav Slavik
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_IMAGXPM_H_
+#define _WX_IMAGXPM_H_
+
+#ifdef __GNUG__
+#pragma interface "imagxpm.h"
+#endif
+
+#include "wx/image.h"
+
+
+//-----------------------------------------------------------------------------
+// wxXPMHandler
+//-----------------------------------------------------------------------------
+
+#if wxUSE_XPM
+class WXDLLEXPORT wxXPMHandler : public wxImageHandler
+{
+  DECLARE_DYNAMIC_CLASS(wxXPMHandler)
+
+public:
+
+  inline wxXPMHandler()
+  {
+      m_name = wxT("XPM file");
+      m_extension = wxT("xpm");
+      m_type = wxBITMAP_TYPE_XPM;
+      m_mime = wxT("image/xpm");
+  };
+
+#if wxUSE_STREAMS
+  virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=0 );
+  virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE );
+  virtual bool DoCanRead( wxInputStream& stream );
+#endif
+};
+#endif // wxUSE_XPM
+
+
+#endif
+  // _WX_IMAGXPM_H_
+