]> git.saurik.com Git - wxWidgets.git/blame - include/wx/cocoa/dataform.h
using Run of base class
[wxWidgets.git] / include / wx / cocoa / dataform.h
CommitLineData
977ea6b6
DE
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
977ea6b6 7// Copyright: (c) 2003 David Elliott
65571936 8// Licence: wxWindows licence
977ea6b6
DE
9///////////////////////////////////////////////////////////////////////////////
10
11#ifndef __WX_COCOA_DATAFORM_H__
12#define __WX_COCOA_DATAFORM_H__
13
14class wxDataFormat
15{
16public:
17 wxDataFormat(unsigned int uFormat = wxDF_INVALID) { m_uFormat = uFormat; }
a1eb65c2 18 wxDataFormat(const wxString& zFormat) { SetId(zFormat); }
977ea6b6
DE
19
20 wxDataFormat& operator=(unsigned int uFormat) { m_uFormat = uFormat; return(*this); }
21 wxDataFormat& operator=(const wxDataFormat& rFormat) {m_uFormat = rFormat.m_uFormat; return(*this); }
22
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; }
31
32 unsigned int GetFormatId(void) const { return (unsigned int)m_uFormat; }
33 unsigned int GetType(void) const { return (unsigned int)m_uFormat; }
34
35 bool IsStandard(void) const;
36
37 void SetType(unsigned int uType){ m_uFormat = uType; }
38
39 //
40 // String ids are used for custom types - this SetId() must be used for
41 // application-specific formats
42 //
43 wxString GetId(void) const;
a1eb65c2 44 void SetId(const wxString& WXUNUSED(pId)) { /* TODO */ }
977ea6b6
DE
45
46private:
47 unsigned int m_uFormat;
48}; // end of CLASS wxDataFormat
49
50#endif // __WX_COCOA_DATAFORM_H__