SetId( id );
}
-wxDataFormat::wxDataFormat( wxDataFormat &format )
+wxDataFormat::wxDataFormat( const wxDataFormat &format )
{
if (!g_textAtom) g_textAtom = gdk_atom_intern( "STRING", FALSE );
m_type = format.GetType();
m_id = format.GetId();
m_hasAtom = TRUE;
- m_atom = format.GetAtom();
+ m_atom = ((wxDataFormat &)format).GetAtom(); // const_cast
}
wxDataFormat::wxDataFormat( const GdkAtom atom )
return m_dataObjects.GetCount();
}
-wxDataFormat &wxDataBroker::GetPreferredFormat() const
+wxDataFormatId wxDataBroker::GetPreferredFormat() const
{
wxNode *node = m_dataObjects.Nth( m_preferred );
wxDataObject* data_obj = (wxDataObject*)node->Data();
- return data_obj->GetFormat();
+ return data_obj->GetFormat().GetType();
}
wxDataFormat &wxDataBroker::GetNthFormat( size_t nth ) const