// global data
//-------------------------------------------------------------------------
-Atom g_textAtom = 0;
+Atom g_textAtom = 0;
//-------------------------------------------------------------------------
// wxDataFormat
//-------------------------------------------------------------------------
-IMPLEMENT_CLASS(wxDataFormat, wxObject)
-
wxDataFormat::wxDataFormat()
{
if (!g_textAtom) g_textAtom = XInternAtom( (Display*) wxGetDisplay(), "STRING", FALSE );
m_hasAtom = FALSE;
}
-wxDataFormatId wxDataFormat::GetType() const
-{
- return m_type;
-}
-
-wxString wxDataFormat::GetId() const
-{
- return m_id;
-}
-
void wxDataFormat::SetId( const wxChar *id )
{
m_type = wxDF_PRIVATE;
return m_atom;
}
-//-------------------------------------------------------------------------
-// wxDataObject
-//-------------------------------------------------------------------------
-
-IMPLEMENT_ABSTRACT_CLASS( wxDataObject, wxObject )
-
-wxDataObject::wxDataObject()
-{
-}
-
-wxDataObject::~wxDataObject()
-{
-}
-
-wxDataFormat &wxDataObject::GetFormat()
-{
- return m_format;
-}
-
-wxDataFormatId wxDataObject::GetFormatType() const
-{
- return m_format.GetType();
-}
-
-wxString wxDataObject::GetFormatId() const
-{
- return m_format.GetId();
-}
-
-Atom wxDataObject::GetFormatAtom() const
-{
- Atom ret = ((wxDataObject*) this)->m_format.GetAtom();
- return ret;
-}
-
-// ----------------------------------------------------------------------------
-// wxTextDataObject
-// ----------------------------------------------------------------------------
-
-IMPLEMENT_DYNAMIC_CLASS( wxTextDataObject, wxDataObject )
-
-wxTextDataObject::wxTextDataObject()
-{
- m_format.SetType( wxDF_TEXT );
-}
-
-wxTextDataObject::wxTextDataObject( const wxString& data )
-{
- m_format.SetType( wxDF_TEXT );
-
- m_data = data;
-}
-
-void wxTextDataObject::SetText( const wxString& data )
-{
- m_data = data;
-}
-
-wxString wxTextDataObject::GetText() const
-{
- return m_data;
-}
-
-void wxTextDataObject::WriteData( void *dest ) const
-{
- WriteString( m_data, dest );
-}
-
-size_t wxTextDataObject::GetSize() const
-{
- return m_data.Len() + 1;
-}
-
-void wxTextDataObject::WriteString( const wxString &str, void *dest ) const
-{
- memcpy( dest, str.mb_str(), str.Len()+1 );
-}
+#if 0
// ----------------------------------------------------------------------------
// wxPrivateDataObject
memcpy( dest, data, GetSize() );
}
+#endif // 0
+
#endif // wxUSE_CLIPBOARD