]> git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/xpmhand.h
added missing include (for instance, needed in the calendar sample for wxMotif)
[wxWidgets.git] / include / wx / os2 / xpmhand.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: xpmhand.h
3 // Purpose: XPM bitmap handler
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 04/01/98
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifdef __GNUG__
13 #pragma interface "xpmhand.h"
14 #endif
15
16 #ifndef _WX_XPMHAND_H_
17 #define _WX_XPMHAND_H_
18
19 class WXDLLEXPORT wxXPMFileHandler: public wxBitmapHandler
20 {
21 DECLARE_DYNAMIC_CLASS(wxXPMFileHandler)
22 public:
23 inline wxXPMFileHandler(void)
24 {
25 m_sName = "XPM bitmap file";
26 m_sExtension = "xpm";
27 m_lType = wxBITMAP_TYPE_XPM;
28 };
29
30 virtual bool LoadFile( wxBitmap* pBitmap
31 ,const wxString& rsName
32 ,long lFlags
33 ,int nDesiredWidth = -1
34 ,int nDesiredHeight = -1
35 );
36 virtual bool SaveFile( wxBitmap* pBitmap
37 ,const wxString& rsName
38 ,int nType
39 ,const wxPalette* pPalette = NULL
40 );
41 private:
42 inline bool LoadFile( wxBitmap* pBitmap
43 ,const wxString& rsName
44 ,HPS hPs
45 ,long lFlags
46 ,int nDesiredWidth
47 ,int nDesiredHeight
48 )
49 {
50 return(wxBitmapHandler::LoadFile(pBitmap, rsName, hPs, lFlags, nDesiredWidth, nDesiredHeight));
51 }
52
53 }; // end of CLASS wxWPMFileHandler
54
55 class WXDLLEXPORT wxXPMDataHandler: public wxBitmapHandler
56 {
57 DECLARE_DYNAMIC_CLASS(wxXPMDataHandler)
58 public:
59 inline wxXPMDataHandler(void)
60 {
61 m_sName = "XPM bitmap data";
62 m_sExtension = "xpm";
63 m_lType = wxBITMAP_TYPE_XPM_DATA;
64 };
65 virtual bool Create( wxBitmap* pBitmap
66 ,void* pData
67 ,long lFlags
68 ,int lWidth
69 ,int lHeight
70 ,int lDepth = 1
71 );
72 private:
73 bool Create( wxGDIImage* pImage
74 ,void* pData
75 ,long lFlags
76 ,int nWidth
77 ,int nHeight
78 ,int nDepth = 1
79 )
80 {
81 return(wxBitmapHandler::Create(pImage, pData, lFlags, nWidth, nHeight, nDepth));
82 }
83
84 }; // end of wxXPMDataHandler
85
86 #endif
87 // _WX_XPMHAND_H_
88