1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: XPM bitmap handler
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma interface "xpmhand.h"
16 #ifndef _WX_XPMHAND_H_
17 #define _WX_XPMHAND_H_
19 class WXDLLEXPORT wxXPMFileHandler
: public wxBitmapHandler
21 DECLARE_DYNAMIC_CLASS(wxXPMFileHandler
)
23 inline wxXPMFileHandler(void)
25 m_sName
= "XPM bitmap file";
27 m_lType
= wxBITMAP_TYPE_XPM
;
30 virtual bool LoadFile( wxBitmap
* pBitmap
31 ,const wxString
& rsName
33 ,int nDesiredWidth
= -1
34 ,int nDesiredHeight
= -1
36 virtual bool SaveFile( wxBitmap
* pBitmap
37 ,const wxString
& rsName
39 ,const wxPalette
* pPalette
= NULL
42 inline bool LoadFile( wxBitmap
* pBitmap
43 ,const wxString
& rsName
50 return(wxBitmapHandler::LoadFile(pBitmap
, rsName
, hPs
, lFlags
, nDesiredWidth
, nDesiredHeight
));
53 }; // end of CLASS wxWPMFileHandler
55 class WXDLLEXPORT wxXPMDataHandler
: public wxBitmapHandler
57 DECLARE_DYNAMIC_CLASS(wxXPMDataHandler
)
59 inline wxXPMDataHandler(void)
61 m_sName
= "XPM bitmap data";
63 m_lType
= wxBITMAP_TYPE_XPM_DATA
;
65 virtual bool Create( wxBitmap
* pBitmap
73 bool Create( wxGDIImage
* pImage
81 return(wxBitmapHandler::Create(pImage
, pData
, lFlags
, nWidth
, nHeight
, nDepth
));
84 }; // end of wxXPMDataHandler