1999-10-21 18:37:14 -04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
1999-11-09 10:24:52 -05:00
|
|
|
// Name: mac/dataform.h
|
1999-10-21 18:37:14 -04:00
|
|
|
// Purpose: declaration of the wxDataFormat class
|
1999-11-09 10:24:52 -05:00
|
|
|
// Author: Stefan Csomor
|
1999-10-21 18:37:14 -04:00
|
|
|
// Modified by:
|
|
|
|
// Created: 10/21/99
|
|
|
|
// RCS-ID: $Id$
|
1999-11-09 10:24:52 -05:00
|
|
|
// Copyright: (c) 1999 Stefan Csomor
|
1999-10-21 18:37:14 -04:00
|
|
|
// Licence: wxWindows licence
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_OS2_DATAFORM_H
|
|
|
|
#define _WX_OS2_DATAFORM_H
|
|
|
|
|
|
|
|
class wxDataFormat
|
|
|
|
{
|
|
|
|
public:
|
2003-01-24 17:31:41 -05:00
|
|
|
wxDataFormat(unsigned int uFormat = wxDF_INVALID) { m_uFormat = uFormat; }
|
|
|
|
wxDataFormat(const wxChar* zFormat) { SetId(zFormat); }
|
1999-10-21 18:37:14 -04:00
|
|
|
|
2003-01-24 17:31:41 -05:00
|
|
|
wxDataFormat& operator=(unsigned int uFormat) { m_uFormat = uFormat; return(*this); }
|
|
|
|
wxDataFormat& operator=(const wxDataFormat& rFormat) {m_uFormat = rFormat.m_uFormat; return(*this); }
|
1999-10-21 18:37:14 -04:00
|
|
|
|
2003-01-24 17:31:41 -05:00
|
|
|
//
|
|
|
|
// Comparison (must have both versions)
|
|
|
|
//
|
|
|
|
bool operator==(wxDataFormatId eFormat) const { return (m_uFormat == (unsigned int)eFormat); }
|
|
|
|
bool operator!=(wxDataFormatId eFormat) const { return (m_uFormat != (unsigned int)eFormat); }
|
|
|
|
bool operator==(const wxDataFormat& rFormat) const { return (m_uFormat == rFormat.m_uFormat); }
|
|
|
|
bool operator!=(const wxDataFormat& rFormat) const { return (m_uFormat != rFormat.m_uFormat); }
|
|
|
|
operator unsigned int(void) const { return m_uFormat; }
|
1999-10-21 18:37:14 -04:00
|
|
|
|
2003-01-24 17:31:41 -05:00
|
|
|
unsigned int GetFormatId(void) const { return (unsigned int)m_uFormat; }
|
|
|
|
unsigned int GetType(void) const { return (unsigned int)m_uFormat; }
|
1999-10-21 18:37:14 -04:00
|
|
|
|
2003-01-24 17:31:41 -05:00
|
|
|
bool IsStandard(void) const;
|
1999-10-21 18:37:14 -04:00
|
|
|
|
2003-01-24 17:31:41 -05:00
|
|
|
void SetType(unsigned int uType){ m_uFormat = uType; }
|
1999-10-21 18:37:14 -04:00
|
|
|
|
2003-01-24 17:31:41 -05:00
|
|
|
//
|
|
|
|
// String ids are used for custom types - this SetId() must be used for
|
1999-10-21 18:37:14 -04:00
|
|
|
// application-specific formats
|
2003-01-24 17:31:41 -05:00
|
|
|
//
|
|
|
|
wxString GetId(void) const;
|
|
|
|
void SetId(const wxChar* pId);
|
1999-10-21 18:37:14 -04:00
|
|
|
|
|
|
|
private:
|
2003-01-24 17:31:41 -05:00
|
|
|
unsigned int m_uFormat;
|
|
|
|
}; // end of CLASS wxDataFormat
|
1999-10-21 18:37:14 -04:00
|
|
|
|
|
|
|
#endif // _WX_GTK_DATAFORM_H
|