]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/dataform.h
859ada24146454b6838077d17a7026d45fab6203
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/os2/dataform.h
3 // Purpose: declaration of the wxDataFormat class
4 // Author: Stefan Csomor
8 // Copyright: (c) 1999 Stefan Csomor
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_OS2_DATAFORM_H
13 #define _WX_OS2_DATAFORM_H
18 wxDataFormat(unsigned int uFormat
= wxDF_INVALID
) { m_uFormat
= uFormat
; }
19 wxDataFormat(const wxString
& zFormat
) { SetId(zFormat
); }
21 wxDataFormat
& operator=(unsigned int uFormat
) { m_uFormat
= uFormat
; return(*this); }
22 wxDataFormat
& operator=(const wxDataFormat
& rFormat
) {m_uFormat
= rFormat
.m_uFormat
; return(*this); }
25 // Comparison (must have both versions)
27 bool operator==(wxDataFormatId eFormat
) const { return (m_uFormat
== (unsigned int)eFormat
); }
28 bool operator!=(wxDataFormatId eFormat
) const { return (m_uFormat
!= (unsigned int)eFormat
); }
29 bool operator==(const wxDataFormat
& rFormat
) const { return (m_uFormat
== rFormat
.m_uFormat
); }
30 bool operator!=(const wxDataFormat
& rFormat
) const { return (m_uFormat
!= rFormat
.m_uFormat
); }
31 operator unsigned int(void) const { return m_uFormat
; }
33 unsigned int GetFormatId(void) const { return (unsigned int)m_uFormat
; }
34 unsigned int GetType(void) const { return (unsigned int)m_uFormat
; }
36 bool IsStandard(void) const;
38 void SetType(unsigned int uType
){ m_uFormat
= uType
; }
41 // String ids are used for custom types - this SetId() must be used for
42 // application-specific formats
44 wxString
GetId(void) const;
45 void SetId(const wxString
& pId
);
48 unsigned int m_uFormat
;
49 }; // end of CLASS wxDataFormat
51 #endif // _WX_GTK_DATAFORM_H