-
- // this filed is redundant and using it is error prone but keep it for
- // backwards compatibility
-#if WXWIN_COMPATIBILITY_2
- void SetOk() { m_ok = m_handle != 0; }
-
- bool m_ok;
-#endif // WXWIN_COMPATIBILITY_2
-};
-
-// ----------------------------------------------------------------------------
-// wxGDIImageHandler: a class which knows how to load/save wxGDIImages.
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxGDIImageHandler : public wxObject
-{
-public:
- // ctor
- wxGDIImageHandler() { m_type = wxBITMAP_TYPE_INVALID; }
- wxGDIImageHandler(const wxString& name,
- const wxString& ext,
- long type)
- : m_name(name), m_extension(ext)
- {
- m_type = type;
- }
-
- // accessors
- void SetName(const wxString& name) { m_name = name; }
- void SetExtension(const wxString& ext) { m_extension = ext; }
- void SetType(long type) { m_type = type; }
-
- wxString GetName() const { return m_name; }
- wxString GetExtension() const { return m_extension; }
- long GetType() const { return m_type; }
-
- // real handler operations: to implement in derived classes
- virtual bool Create(wxGDIImage *image,
- void *data,
- long flags,
- int width, int height, int depth = 1) = 0;
- virtual bool Load(wxGDIImage *image,
- const wxString& name,
- long flags,
- int desiredWidth, int desiredHeight) = 0;
- virtual bool Save(wxGDIImage *image,
- const wxString& name,
- int type) = 0;
-
-protected:
- wxString m_name;
- wxString m_extension;
- long m_type;