X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3f480da37ca0840ddbe48b908d511d2e9fc20bf4..dc30432a6323eca35c21fece7eeb2d3968d274de:/include/wx/gtk/dataobj.h diff --git a/include/wx/gtk/dataobj.h b/include/wx/gtk/dataobj.h index 4949cf9c51..e8d598e3dd 100644 --- a/include/wx/gtk/dataobj.h +++ b/include/wx/gtk/dataobj.h @@ -44,7 +44,7 @@ public: wxDataFormat( wxDataFormatId type ); wxDataFormat( const wxString &id ); wxDataFormat( const wxChar *id ); - wxDataFormat( wxDataFormat &format ); + wxDataFormat( const wxDataFormat &format ); wxDataFormat( const GdkAtom atom ); void SetType( wxDataFormatId type ); @@ -62,6 +62,12 @@ public: GdkAtom GetAtom(); void SetAtom(GdkAtom atom) { m_hasAtom = TRUE; m_atom = atom; } + // implicit conversion to wxDataFormatId + operator wxDataFormatId() const { return m_type; } + + bool operator==(wxDataFormatId type) const { return m_type == type; } + bool operator!=(wxDataFormatId type) const { return m_type != type; } + private: wxDataFormatId m_type; wxString m_id; @@ -96,7 +102,7 @@ private: virtual wxDataFormat &GetNthFormat( size_t nth ) const; /* return preferrd/best supported format */ - virtual wxDataFormat &GetPreferredFormat() const; + virtual wxDataFormatId GetPreferredFormat() const; /* search through m_dataObjects, return TRUE if found */ virtual bool IsSupportedFormat( wxDataFormat &format ) const;