]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/dataform.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / os2 / dataform.h
CommitLineData
2e1a688e 1///////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: wx/os2/dataform.h
2e1a688e 3// Purpose: declaration of the wxDataFormat class
e7549107 4// Author: Stefan Csomor
2e1a688e
DW
5// Modified by:
6// Created: 10/21/99
e7549107 7// Copyright: (c) 1999 Stefan Csomor
65571936 8// Licence: wxWindows licence
2e1a688e
DW
9///////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_OS2_DATAFORM_H
12#define _WX_OS2_DATAFORM_H
13
14class wxDataFormat
15{
16public:
4fd899b6 17 wxDataFormat(unsigned int uFormat = wxDF_INVALID) { m_uFormat = uFormat; }
a1eb65c2 18 wxDataFormat(const wxString& zFormat) { SetId(zFormat); }
2e1a688e 19
4fd899b6
DW
20 wxDataFormat& operator=(unsigned int uFormat) { m_uFormat = uFormat; return(*this); }
21 wxDataFormat& operator=(const wxDataFormat& rFormat) {m_uFormat = rFormat.m_uFormat; return(*this); }
2e1a688e 22
4fd899b6
DW
23 //
24 // Comparison (must have both versions)
25 //
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; }
2e1a688e 31
4fd899b6
DW
32 unsigned int GetFormatId(void) const { return (unsigned int)m_uFormat; }
33 unsigned int GetType(void) const { return (unsigned int)m_uFormat; }
2e1a688e 34
4fd899b6 35 bool IsStandard(void) const;
2e1a688e 36
4fd899b6 37 void SetType(unsigned int uType){ m_uFormat = uType; }
2e1a688e 38
4fd899b6
DW
39 //
40 // String ids are used for custom types - this SetId() must be used for
2e1a688e 41 // application-specific formats
4fd899b6
DW
42 //
43 wxString GetId(void) const;
a1eb65c2 44 void SetId(const wxString& pId);
2e1a688e
DW
45
46private:
4fd899b6
DW
47 unsigned int m_uFormat;
48}; // end of CLASS wxDataFormat
2e1a688e
DW
49
50#endif // _WX_GTK_DATAFORM_H