1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxXPMDecoder, XPM reader for wxImage and wxBitmap
4 // Author: Vaclav Slavik
5 // Copyright: (c) 2001 Vaclav Slavik
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
9 #ifndef _WX_XPMDECOD_H_
10 #define _WX_XPMDECOD_H_
14 #if wxUSE_IMAGE && wxUSE_XPM
16 class WXDLLIMPEXP_FWD_CORE wxImage
;
17 class WXDLLIMPEXP_FWD_BASE wxInputStream
;
19 // --------------------------------------------------------------------------
21 // --------------------------------------------------------------------------
23 class WXDLLIMPEXP_CORE wxXPMDecoder
26 // constructor, destructor, etc.
31 // Is the stream XPM file?
32 // NOTE: this function modifies the current stream position
33 bool CanRead(wxInputStream
& stream
);
35 // Read XPM file from the stream, parse it and create image from it
36 wxImage
ReadFile(wxInputStream
& stream
);
39 // Read directly from XPM data (as passed to wxBitmap ctor):
40 wxImage
ReadData(const char* const* xpm_data
);
43 // needed for Borland 5.5
44 wxImage
ReadData(char** xpm_data
)
45 { return ReadData(const_cast<const char* const*>(xpm_data
)); }
49 #endif // wxUSE_IMAGE && wxUSE_XPM