wxMotif compilation fixes for wxDataObject and PROCESS_EVENTS (wxSocket)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4122 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -25,14 +25,12 @@
|
||||
// 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 );
|
||||
@@ -122,16 +120,6 @@ void wxDataFormat::SetType( wxDataFormatId type )
|
||||
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
|
||||
@@ -302,4 +214,6 @@ void wxPrivateDataObject::WriteData( const void *data, void *dest ) const
|
||||
memcpy( dest, data, GetSize() );
|
||||
}
|
||||
|
||||
#endif // 0
|
||||
|
||||
#endif // wxUSE_CLIPBOARD
|
||||
|
||||
Reference in New Issue
Block a user