]> git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/dataform.h
Fix missing documentation for several GDI functions.
[wxWidgets.git] / include / wx / cocoa / dataform.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/dataform.h
3 // Purpose: declaration of the wxDataFormat class
4 // Author: David Elliott <dfe@cox.net>
5 // Modified by:
6 // Created: 2003/07/23
7 // RCS-ID: $Id$
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
11
12 #ifndef __WX_COCOA_DATAFORM_H__
13 #define __WX_COCOA_DATAFORM_H__
14
15 class wxDataFormat
16 {
17 public:
18 wxDataFormat(unsigned int uFormat = wxDF_INVALID) { m_uFormat = uFormat; }
19 wxDataFormat(const wxString& zFormat) { SetId(zFormat); }
20
21 wxDataFormat& operator=(unsigned int uFormat) { m_uFormat = uFormat; return(*this); }
22 wxDataFormat& operator=(const wxDataFormat& rFormat) {m_uFormat = rFormat.m_uFormat; return(*this); }
23
24 //
25 // Comparison (must have both versions)
26 //
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; }
32
33 unsigned int GetFormatId(void) const { return (unsigned int)m_uFormat; }
34 unsigned int GetType(void) const { return (unsigned int)m_uFormat; }
35
36 bool IsStandard(void) const;
37
38 void SetType(unsigned int uType){ m_uFormat = uType; }
39
40 //
41 // String ids are used for custom types - this SetId() must be used for
42 // application-specific formats
43 //
44 wxString GetId(void) const;
45 void SetId(const wxString& WXUNUSED(pId)) { /* TODO */ }
46
47 private:
48 unsigned int m_uFormat;
49 }; // end of CLASS wxDataFormat
50
51 #endif // __WX_COCOA_DATAFORM_H__