]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/dataform.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: motif/dataform.h
3 // Purpose: declaration of the wxDataFormat class
4 // Author: Vadim Zeitlin
6 // Created: 19.10.99 (extracted from motif/dataobj.h)
8 // Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_MOTIF_DATAFORM_H
13 #define _WX_MOTIF_DATAFORM_H
19 wxDataFormat( wxDataFormatId type
);
20 wxDataFormat( const wxString
&id
);
21 wxDataFormat( const wxChar
*id
);
22 wxDataFormat( const wxDataFormat
&format
);
23 wxDataFormat( const Atom atom
);
25 void SetType( wxDataFormatId type
);
26 wxDataFormatId
GetType() const;
28 /* the string Id identifies the format of clipboard or DnD data. a word
29 * processor would e.g. add a wxTextDataObject and a wxPrivateDataObject
30 * to the clipboard - the latter with the Id "application/wxword", an
31 * image manipulation program would put a wxBitmapDataObject and a
32 * wxPrivateDataObject to the clipboard - the latter with "image/png". */
34 wxString
GetId() const;
35 void SetId( const wxChar
*id
);
38 void SetAtom(Atom atom
) { m_hasAtom
= TRUE
; m_atom
= atom
; }
40 // implicit conversion to wxDataFormatId
41 operator wxDataFormatId() const { return m_type
; }
43 bool operator==(wxDataFormatId type
) const { return m_type
== type
; }
44 bool operator!=(wxDataFormatId type
) const { return m_type
!= type
; }
47 wxDataFormatId m_type
;
53 #endif // _WX_MOTIF_DATAFORM_H