]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/dataform.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/os2/dataform.h
3 // Purpose: declaration of the wxDataFormat class
4 // Author: Stefan Csomor
7 // Copyright: (c) 1999 Stefan Csomor
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_OS2_DATAFORM_H
12 #define _WX_OS2_DATAFORM_H
17 wxDataFormat(unsigned int uFormat
= wxDF_INVALID
) { m_uFormat
= uFormat
; }
18 wxDataFormat(const wxString
& zFormat
) { SetId(zFormat
); }
20 wxDataFormat
& operator=(unsigned int uFormat
) { m_uFormat
= uFormat
; return(*this); }
21 wxDataFormat
& operator=(const wxDataFormat
& rFormat
) {m_uFormat
= rFormat
.m_uFormat
; return(*this); }
24 // Comparison (must have both versions)
26 bool operator==(wxDataFormatId eFormat
) const { return (m_uFormat
== (unsigned int)eFormat
); }
27 bool operator!=(wxDataFormatId eFormat
) const { return (m_uFormat
!= (unsigned int)eFormat
); }
28 bool operator==(const wxDataFormat
& rFormat
) const { return (m_uFormat
== rFormat
.m_uFormat
); }
29 bool operator!=(const wxDataFormat
& rFormat
) const { return (m_uFormat
!= rFormat
.m_uFormat
); }
30 operator unsigned int(void) const { return m_uFormat
; }
32 unsigned int GetFormatId(void) const { return (unsigned int)m_uFormat
; }
33 unsigned int GetType(void) const { return (unsigned int)m_uFormat
; }
35 bool IsStandard(void) const;
37 void SetType(unsigned int uType
){ m_uFormat
= uType
; }
40 // String ids are used for custom types - this SetId() must be used for
41 // application-specific formats
43 wxString
GetId(void) const;
44 void SetId(const wxString
& pId
);
47 unsigned int m_uFormat
;
48 }; // end of CLASS wxDataFormat
50 #endif // _WX_GTK_DATAFORM_H