-
- wxDataFormat();
- wxDataFormat( wxDataType type );
- wxDataFormat( const wxString &id );
- wxDataFormat( const wxChar *id );
- wxDataFormat( wxDataFormat &format );
- wxDataFormat( const GdkAtom atom );
-
- void SetType( wxDataType type );
- wxDataType GetType() const;
-
- wxString GetId() const;
- void SetId( const wxChar *id );
-
- GdkAtom GetAtom();
- void SetAtom(GdkAtom atom) { m_hasAtom = TRUE; m_atom = atom; }
+ wxDataFormat();
+ wxDataFormat( wxDataFormatId type );
+ wxDataFormat( const wxString &id );
+ wxDataFormat( const wxChar *id );
+ wxDataFormat( const wxDataFormat &format );
+ wxDataFormat( const GdkAtom atom );
+
+ void SetType( wxDataFormatId type );
+ wxDataFormatId GetType() const;
+
+ /* the string Id identifies the format of clipboard or DnD data. a word
+ * processor would e.g. add a wxTextDataObject and a wxPrivateDataObject
+ * to the clipboard - the latter with the Id "application/wxword", an
+ * image manipulation program would put a wxBitmapDataObject and a
+ * wxPrivateDataObject to the clipboard - the latter with "image/png". */
+
+ wxString GetId() const;
+ void SetId( const wxChar *id );
+
+ 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; }
+