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