1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxXPMDecoder, XPM reader for wxImage and wxBitmap
4 // Author: Vaclav Slavik
6 // Copyright: (c) 2001 Vaclav Slavik
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_XPMDECOD_H_
11 #define _WX_XPMDECOD_H_
15 #if wxUSE_IMAGE && wxUSE_XPM
17 class WXDLLIMPEXP_FWD_CORE wxImage
;
18 class WXDLLIMPEXP_FWD_BASE wxInputStream
;
20 // --------------------------------------------------------------------------
22 // --------------------------------------------------------------------------
24 class WXDLLIMPEXP_CORE wxXPMDecoder
27 // constructor, destructor, etc.
32 // Is the stream XPM file?
33 // NOTE: this function modifies the current stream position
34 bool CanRead(wxInputStream
& stream
);
36 // Read XPM file from the stream, parse it and create image from it
37 wxImage
ReadFile(wxInputStream
& stream
);
40 // Read directly from XPM data (as passed to wxBitmap ctor):
41 wxImage
ReadData(const char* const* xpm_data
);
44 // needed for Borland 5.5
45 wxImage
ReadData(char** xpm_data
)
46 { return ReadData(const_cast<const char* const*>(xpm_data
)); }
50 #endif // wxUSE_IMAGE && wxUSE_XPM