]>
Commit | Line | Data |
---|---|---|
8f493002 | 1 | ///////////////////////////////////////////////////////////////////////////// |
80fdcdb9 | 2 | // Name: wx/imagpnm.h |
8f493002 VS |
3 | // Purpose: wxImage PNM handler |
4 | // Author: Sylvain Bougnoux | |
8f493002 | 5 | // Copyright: (c) Sylvain Bougnoux |
65571936 | 6 | // Licence: wxWindows licence |
8f493002 VS |
7 | ///////////////////////////////////////////////////////////////////////////// |
8 | ||
9 | #ifndef _WX_IMAGPNM_H_ | |
10 | #define _WX_IMAGPNM_H_ | |
11 | ||
8f493002 VS |
12 | #include "wx/image.h" |
13 | ||
14 | //----------------------------------------------------------------------------- | |
15 | // wxPNMHandler | |
16 | //----------------------------------------------------------------------------- | |
17 | ||
18 | #if wxUSE_PNM | |
53a2db12 | 19 | class WXDLLIMPEXP_CORE wxPNMHandler : public wxImageHandler |
8f493002 | 20 | { |
8f493002 | 21 | public: |
2b5f62a0 VZ |
22 | inline wxPNMHandler() |
23 | { | |
24 | m_name = wxT("PNM file"); | |
25 | m_extension = wxT("pnm"); | |
ba4800d3 VZ |
26 | m_altExtensions.Add(wxT("ppm")); |
27 | m_altExtensions.Add(wxT("pgm")); | |
28 | m_altExtensions.Add(wxT("pbm")); | |
2b5f62a0 VZ |
29 | m_type = wxBITMAP_TYPE_PNM; |
30 | m_mime = wxT("image/pnm"); | |
31 | } | |
8f493002 VS |
32 | |
33 | #if wxUSE_STREAMS | |
7beb59f3 WS |
34 | virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); |
35 | virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); | |
6f02a879 | 36 | protected: |
2b5f62a0 | 37 | virtual bool DoCanRead( wxInputStream& stream ); |
8f493002 | 38 | #endif |
2b5f62a0 VZ |
39 | |
40 | private: | |
41 | DECLARE_DYNAMIC_CLASS(wxPNMHandler) | |
8f493002 VS |
42 | }; |
43 | #endif | |
44 | ||
45 | ||
46 | #endif | |
47 | // _WX_IMAGPNM_H_ | |
48 |