void wxDataFormat::SetType( wxDataFormatId type ) { PrepareFormats(); m_type = type; #if wxUSE_UNICODE if (m_type == wxDF_UNICODETEXT) m_format = g_textAtom; else if (m_type == wxDF_TEXT) m_format = g_altTextAtom; #else // !wxUSE_UNICODE // notice that we don't map wxDF_UNICODETEXT to g_textAtom here, this // would lead the code elsewhere to treat data objects with this format as // containing UTF-8 data which is not true if (m_type == wxDF_TEXT) m_format = g_textAtom; #endif // wxUSE_UNICODE/!wxUSE_UNICODE else if (m_type == wxDF_BITMAP) m_format = g_pngAtom; else if (m_type == wxDF_FILENAME) m_format = g_fileAtom; else { wxFAIL_MSG( wxT("invalid dataformat") ); } }
void wxDataFormat::SetType( wxDataFormatId type ) { PrepareFormats(); m_type = type; #if wxUSE_UNICODE if (m_type == wxDF_UNICODETEXT) m_format = g_textAtom; else if (m_type == wxDF_TEXT) m_format = g_altTextAtom; #else if (m_type == wxDF_TEXT || m_type == wxDF_UNICODETEXT) m_format = g_textAtom; #endif else if (m_type == wxDF_BITMAP) m_format = g_pngAtom; else if (m_type == wxDF_FILENAME) m_format = g_fileAtom; else { wxFAIL_MSG( wxT("invalid dataformat") ); } }
void wxDataFormat::SetId( const wxString& id ) { PrepareFormats(); m_type = wxDF_PRIVATE; m_format = XInternAtom( wxGlobalDisplay(), id.mbc_str(), False ); }
void wxDataFormat::SetId( const wxString& id ) { #if !wxUSE_NANOX PrepareFormats(); m_type = wxDF_PRIVATE; m_format = XInternAtom( (Display*) wxGetDisplay(), id.ToAscii(), FALSE ); #endif }
void wxDataFormat::SetId( NativeFormat format ) { PrepareFormats(); m_format = format; if (m_format == g_textAtom) #if wxUSE_UNICODE m_type = wxDF_UNICODETEXT; #else m_type = wxDF_TEXT; #endif else if (m_format == g_altTextAtom)
void wxDataFormat::SetId( NativeFormat format ) { PrepareFormats(); m_format = format; if (m_format == g_textAtom) m_type = wxDF_TEXT; else if (m_format == g_bitmapAtom) m_type = wxDF_BITMAP; else if (m_format == g_fileAtom) m_type = wxDF_FILENAME; else m_type = wxDF_PRIVATE; }
void wxDataFormat::SetType( wxDataFormatId type ) { PrepareFormats(); m_type = type; if (m_type == wxDF_TEXT) m_format = g_textAtom; else if (m_type == wxDF_BITMAP) m_format = g_bitmapAtom; else if (m_type == wxDF_FILENAME) m_format = g_fileAtom; else { wxFAIL_MSG( wxT("invalid dataformat") ); } }
wxDataFormat::wxDataFormat( NativeFormat format ) { PrepareFormats(); SetId( format ); }
void wxDataFormat::InitFromString( const wxString &id ) { PrepareFormats(); SetId( id ); }
wxDataFormat::wxDataFormat( wxDataFormatId type ) { PrepareFormats(); SetType( type ); }
wxDataFormat::wxDataFormat( const wxString &id ) { PrepareFormats(); SetId( id ); }
wxDataFormat::wxDataFormat( const wxChar *id ) { PrepareFormats(); SetId( id ); }