]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/dataobj.cpp
reverted last changes by DW
[wxWidgets.git] / src / motif / dataobj.cpp
index 2edfb0e4b65e8d4c7429ef3bdd7226007d63ac13..5564b4c24c8e289e975dc824afa1a679068018c8 100644 (file)
 // 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 );
@@ -89,7 +87,7 @@ wxDataFormat::wxDataFormat( const Atom atom )
         m_type = wxDF_PRIVATE;
        m_id = XGetAtomName( (Display*) wxGetDisplay(),  m_atom );
 
-       if (m_id == T("file:ALL"))
+       if (m_id == wxT("file:ALL"))
        {
            m_type = wxDF_FILENAME;
        }
@@ -102,36 +100,26 @@ void wxDataFormat::SetType( wxDataFormatId type )
 
     if (m_type == wxDF_TEXT)
     {
-        m_id = T("STRING");
+        m_id = wxT("STRING");
     }
     else
     if (m_type == wxDF_BITMAP)
     {
-        m_id = T("BITMAP");
+        m_id = wxT("BITMAP");
     }
     else
     if (m_type == wxDF_FILENAME)
     {
-        m_id = T("file:ALL");
+        m_id = wxT("file:ALL");
     }
     else
     {
-       wxFAIL_MSG( T("invalid dataformat") );
+       wxFAIL_MSG( wxT("invalid dataformat") );
     }
 
     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;
@@ -176,83 +164,7 @@ Atom wxDataFormat::GetAtom()
     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
@@ -268,7 +180,7 @@ void wxPrivateDataObject::Free()
 
 wxPrivateDataObject::wxPrivateDataObject()
 {
-    wxString id = T("application/");
+    wxString id = wxT("application/");
     id += wxTheApp->GetAppName();
 
     m_format.SetId( id );
@@ -302,4 +214,6 @@ void wxPrivateDataObject::WriteData( const void *data, void *dest ) const
     memcpy( dest, data, GetSize() );
 }
 
+#endif // 0
+
 #endif // wxUSE_CLIPBOARD