]>
Commit | Line | Data |
---|---|---|
424f5e27 | 1 | ///////////////////////////////////////////////////////////////////////////// |
ce7208d4 | 2 | // Name: wx/xpmdecod.h |
424f5e27 VS |
3 | // Purpose: wxXPMDecoder, XPM reader for wxImage and wxBitmap |
4 | // Author: Vaclav Slavik | |
424f5e27 | 5 | // Copyright: (c) 2001 Vaclav Slavik |
65571936 | 6 | // Licence: wxWindows licence |
424f5e27 VS |
7 | ///////////////////////////////////////////////////////////////////////////// |
8 | ||
9 | #ifndef _WX_XPMDECOD_H_ | |
10 | #define _WX_XPMDECOD_H_ | |
11 | ||
2ecf902b | 12 | #include "wx/defs.h" |
424f5e27 | 13 | |
552796e0 | 14 | #if wxUSE_IMAGE && wxUSE_XPM |
424f5e27 | 15 | |
b5dbe15d VS |
16 | class WXDLLIMPEXP_FWD_CORE wxImage; |
17 | class WXDLLIMPEXP_FWD_BASE wxInputStream; | |
424f5e27 VS |
18 | |
19 | // -------------------------------------------------------------------------- | |
20 | // wxXPMDecoder class | |
21 | // -------------------------------------------------------------------------- | |
22 | ||
53a2db12 | 23 | class WXDLLIMPEXP_CORE wxXPMDecoder |
424f5e27 VS |
24 | { |
25 | public: | |
26 | // constructor, destructor, etc. | |
27 | wxXPMDecoder() {} | |
28 | ~wxXPMDecoder() {} | |
29 | ||
30 | #if wxUSE_STREAMS | |
31 | // Is the stream XPM file? | |
8faef7cc | 32 | // NOTE: this function modifies the current stream position |
424f5e27 | 33 | bool CanRead(wxInputStream& stream); |
03647350 | 34 | |
424f5e27 VS |
35 | // Read XPM file from the stream, parse it and create image from it |
36 | wxImage ReadFile(wxInputStream& stream); | |
37 | #endif | |
8faef7cc | 38 | |
424f5e27 | 39 | // Read directly from XPM data (as passed to wxBitmap ctor): |
452418c4 | 40 | wxImage ReadData(const char* const* xpm_data); |
03647350 | 41 | |
29b7b6ca PC |
42 | #ifdef __BORLANDC__ |
43 | // needed for Borland 5.5 | |
03647350 | 44 | wxImage ReadData(char** xpm_data) |
8faef7cc | 45 | { return ReadData(const_cast<const char* const*>(xpm_data)); } |
29b7b6ca | 46 | #endif |
424f5e27 VS |
47 | }; |
48 | ||
552796e0 | 49 | #endif // wxUSE_IMAGE && wxUSE_XPM |
424f5e27 | 50 | |
552796e0 | 51 | #endif // _WX_XPM_H_ |