]> git.saurik.com Git - wxWidgets.git/commitdiff
Use xpmdecod instead of xpmhand.h
authorDavid Webster <Dave.Webster@bhmi.com>
Mon, 18 Feb 2002 04:30:35 +0000 (04:30 +0000)
committerDavid Webster <Dave.Webster@bhmi.com>
Mon, 18 Feb 2002 04:30:35 +0000 (04:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/os2/bitmap.h
include/wx/os2/xpmhand.h [deleted file]

index ba920a1fac854db08a765dd328f31dfad61df552..f5d99b666de8579ca8426408c63ecaa8cb4e0adb 100644 (file)
@@ -84,8 +84,8 @@ public:
             );
 
     // Initialize with XPM data
-    wxBitmap(const char** ppData);
-    wxBitmap(char** ppData);
+    wxBitmap(const char** ppData) { CreateFromXpm(ppData); }
+    wxBitmap(char** ppData) { CreateFromXpm((const char**)ppData); }
 
     // Load a file or resource
     wxBitmap( const wxString& rName
@@ -106,7 +106,7 @@ public:
              ,int nDepth = -1
             );
 
-    wxBitmap( const wxImage& image, int depth = -1 ) 
+    wxBitmap( const wxImage& image, int depth = -1 )
                          { (void)CreateFromImage(image, depth); }
 
     // we must have this, otherwise icons are silently copied into bitmaps using
@@ -136,7 +136,7 @@ public:
 
     virtual ~wxBitmap();
 
-    wxImage ConvertToImage() const;  
+    wxImage ConvertToImage() const;
 
     // get the given part of bitmap
     wxBitmap GetSubBitmap(const wxRect& rRect) const;
@@ -231,7 +231,7 @@ protected:
         { return new wxBitmapRefData; }
 
     // creates the bitmap from XPM data, supposed to be called from ctor
-    bool CreateFromXpm(const char **bits);
+    bool CreateFromXpm(const char** ppData);
     bool CreateFromImage(const wxImage& image, int depth);
 
 private:
diff --git a/include/wx/os2/xpmhand.h b/include/wx/os2/xpmhand.h
deleted file mode 100644 (file)
index c83fcde..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name:        xpmhand.h
-// Purpose:     XPM bitmap handler
-// Author:      Julian Smart
-// Modified by:
-// Created:     04/01/98
-// RCS-ID:      $Id$
-// Copyright:   (c) Julian Smart
-// Licence:    wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifdef __GNUG__
-#pragma interface "xpmhand.h"
-#endif
-
-#ifndef _WX_XPMHAND_H_
-#define _WX_XPMHAND_H_
-
-class WXDLLEXPORT wxXPMFileHandler: public wxBitmapHandler
-{
-    DECLARE_DYNAMIC_CLASS(wxXPMFileHandler)
-public:
-    inline wxXPMFileHandler(void)
-    {
-        m_sName = "XPM bitmap file";
-        m_sExtension = "xpm";
-        m_lType = wxBITMAP_TYPE_XPM;
-    };
-
-    virtual bool LoadFile( wxBitmap*       pBitmap
-                          ,const wxString& rsName
-                          ,long            lFlags
-                          ,int             nDesiredWidth = -1
-                          ,int             nDesiredHeight = -1
-                         );
-    virtual bool SaveFile( wxBitmap*        pBitmap
-                          ,const wxString&  rsName
-                          ,int              nType
-                          ,const wxPalette* pPalette = NULL
-                         );
-private:
-    inline bool LoadFile( wxBitmap*       pBitmap
-                         ,const wxString& rsName
-                         ,HPS             hPs
-                         ,long            lFlags
-                         ,int             nDesiredWidth
-                         ,int             nDesiredHeight
-                        )
-    {
-        return(wxBitmapHandler::LoadFile(pBitmap, rsName, hPs, lFlags, nDesiredWidth, nDesiredHeight));
-    }
-
-}; // end of CLASS wxWPMFileHandler
-
-class WXDLLEXPORT wxXPMDataHandler: public wxBitmapHandler
-{
-    DECLARE_DYNAMIC_CLASS(wxXPMDataHandler)
-public:
-    inline wxXPMDataHandler(void)
-    {
-        m_sName = "XPM bitmap data";
-        m_sExtension = "xpm";
-        m_lType = wxBITMAP_TYPE_XPM_DATA;
-    };
-    virtual bool Create( wxBitmap* pBitmap
-                        ,void*     pData
-                        ,long      lFlags
-                        ,int       lWidth
-                        ,int       lHeight
-                        ,int       lDepth = 1
-                       );
-private:
-    bool Create( wxGDIImage* pImage
-                ,void*       pData
-                ,long        lFlags
-                ,int         nWidth
-                ,int         nHeight
-                ,int         nDepth = 1
-               )
-    {
-        return(wxBitmapHandler::Create(pImage, pData, lFlags, nWidth, nHeight, nDepth));
-    }
-
-}; // end of wxXPMDataHandler
-
-#endif
-  // _WX_XPMHAND_H_
-