]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/dataform.h
03f04a76c7becfa07cfcc5164b930cc36a1c32d6
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
18 typedef unsigned long /* Atom */ NativeFormat
;
21 wxDataFormat( wxDataFormatId type
);
22 wxDataFormat( const wxString
&id
);
23 wxDataFormat( const wxChar
*id
);
24 wxDataFormat( const wxDataFormat
&format
);
25 wxDataFormat( const Atom atom
);
27 void SetType( wxDataFormatId type
);
28 NativeFormat
GetType() const { return m_type
; }
30 /* the string Id identifies the format of clipboard or DnD data. a word
31 * processor would e.g. add a wxTextDataObject and a wxPrivateDataObject
32 * to the clipboard - the latter with the Id "application/wxword", an
33 * image manipulation program would put a wxBitmapDataObject and a
34 * wxPrivateDataObject to the clipboard - the latter with "image/png". */
36 wxString
GetId() const { return m_id
; }
37 void SetId( const wxChar
*id
);
40 void SetAtom(Atom atom
) { m_hasAtom
= TRUE
; m_atom
= atom
; }
42 // implicit conversion to wxDataFormatId
43 operator NativeFormat() const { return m_type
; }
45 bool operator==(NativeFormat type
) const { return m_type
== type
; }
46 bool operator!=(NativeFormat type
) const { return m_type
!= type
; }
55 #endif // _WX_MOTIF_DATAFORM_H