]> git.saurik.com Git - wxWidgets.git/blob - include/wx/xpmdecod.h
Don't check for tr1/type_traits in configure if type_traits was found.
[wxWidgets.git] / include / wx / xpmdecod.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/xpmdecod.h
3 // Purpose: wxXPMDecoder, XPM reader for wxImage and wxBitmap
4 // Author: Vaclav Slavik
5 // Copyright: (c) 2001 Vaclav Slavik
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
8
9 #ifndef _WX_XPMDECOD_H_
10 #define _WX_XPMDECOD_H_
11
12 #include "wx/defs.h"
13
14 #if wxUSE_IMAGE && wxUSE_XPM
15
16 class WXDLLIMPEXP_FWD_CORE wxImage;
17 class WXDLLIMPEXP_FWD_BASE wxInputStream;
18
19 // --------------------------------------------------------------------------
20 // wxXPMDecoder class
21 // --------------------------------------------------------------------------
22
23 class WXDLLIMPEXP_CORE wxXPMDecoder
24 {
25 public:
26 // constructor, destructor, etc.
27 wxXPMDecoder() {}
28 ~wxXPMDecoder() {}
29
30 #if wxUSE_STREAMS
31 // Is the stream XPM file?
32 // NOTE: this function modifies the current stream position
33 bool CanRead(wxInputStream& stream);
34
35 // Read XPM file from the stream, parse it and create image from it
36 wxImage ReadFile(wxInputStream& stream);
37 #endif
38
39 // Read directly from XPM data (as passed to wxBitmap ctor):
40 wxImage ReadData(const char* const* xpm_data);
41
42 #ifdef __BORLANDC__
43 // needed for Borland 5.5
44 wxImage ReadData(char** xpm_data)
45 { return ReadData(const_cast<const char* const*>(xpm_data)); }
46 #endif
47 };
48
49 #endif // wxUSE_IMAGE && wxUSE_XPM
50
51 #endif // _WX_XPM_H_