git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21036
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
m_format = kDragFlavorTypeHFS ;
else
{
m_format = kDragFlavorTypeHFS ;
else
{
wxFAIL_MSG( wxT("invalid dataformat") );
wxFAIL_MSG( wxT("invalid dataformat") );
-wxDataFormatId wxDataFormat::GetType() const
-{
- return m_type;
}
wxString wxDataFormat::GetId() const
{
}
wxString wxDataFormat::GetId() const
{
- char text[5] ;
- strncpy( text , (char*) &m_format , 4 ) ;
- text[4] = 0 ;
+ // note that m_format is not a pointer to string, it *is* itself a 4
+ // character string
+ char text[5] ;
+ strncpy( text , (char*) &m_format , 4 ) ;
+ text[4] = 0 ;
+
return wxString::FromAscii( text ) ;
}
return wxString::FromAscii( text ) ;
}
if (m_format == kScrapFlavorTypeText)
m_type = wxDF_TEXT;
if (m_format == kScrapFlavorTypeText)
m_type = wxDF_TEXT;
- else
- if (m_format == kScrapFlavorTypeUnicode )
+ else if (m_format == kScrapFlavorTypeUnicode )
m_type = wxDF_UNICODETEXT;
m_type = wxDF_UNICODETEXT;
- else
- if (m_format == kScrapFlavorTypePicture)
+ else if (m_format == kScrapFlavorTypePicture)
- else
- if (m_format == kDragFlavorTypeHFS )
+ else if (m_format == kDragFlavorTypeHFS )
m_type = wxDF_FILENAME;
else
m_type = wxDF_PRIVATE;
m_type = wxDF_FILENAME;
else
m_type = wxDF_PRIVATE;
void wxDataFormat::SetId( const wxChar* zId )
{
void wxDataFormat::SetId( const wxChar* zId )
{
m_type = wxDF_PRIVATE;
m_format = 0;// TODO: get the format gdk_atom_intern( wxMBSTRINGCAST tmp.mbc_str(), FALSE );
}
m_type = wxDF_PRIVATE;
m_format = 0;// TODO: get the format gdk_atom_intern( wxMBSTRINGCAST tmp.mbc_str(), FALSE );
}
m_format = kDragFlavorTypeHFS ;
else
{
m_format = kDragFlavorTypeHFS ;
else
{
wxFAIL_MSG( wxT("invalid dataformat") );
wxFAIL_MSG( wxT("invalid dataformat") );
-wxDataFormatId wxDataFormat::GetType() const
-{
- return m_type;
}
wxString wxDataFormat::GetId() const
{
}
wxString wxDataFormat::GetId() const
{
- char text[5] ;
- strncpy( text , (char*) &m_format , 4 ) ;
- text[4] = 0 ;
+ // note that m_format is not a pointer to string, it *is* itself a 4
+ // character string
+ char text[5] ;
+ strncpy( text , (char*) &m_format , 4 ) ;
+ text[4] = 0 ;
+
return wxString::FromAscii( text ) ;
}
return wxString::FromAscii( text ) ;
}
if (m_format == kScrapFlavorTypeText)
m_type = wxDF_TEXT;
if (m_format == kScrapFlavorTypeText)
m_type = wxDF_TEXT;
- else
- if (m_format == kScrapFlavorTypeUnicode )
+ else if (m_format == kScrapFlavorTypeUnicode )
m_type = wxDF_UNICODETEXT;
m_type = wxDF_UNICODETEXT;
- else
- if (m_format == kScrapFlavorTypePicture)
+ else if (m_format == kScrapFlavorTypePicture)
- else
- if (m_format == kDragFlavorTypeHFS )
+ else if (m_format == kDragFlavorTypeHFS )
m_type = wxDF_FILENAME;
else
m_type = wxDF_PRIVATE;
m_type = wxDF_FILENAME;
else
m_type = wxDF_PRIVATE;
void wxDataFormat::SetId( const wxChar* zId )
{
void wxDataFormat::SetId( const wxChar* zId )
{
m_type = wxDF_PRIVATE;
m_format = 0;// TODO: get the format gdk_atom_intern( wxMBSTRINGCAST tmp.mbc_str(), FALSE );
}
m_type = wxDF_PRIVATE;
m_format = 0;// TODO: get the format gdk_atom_intern( wxMBSTRINGCAST tmp.mbc_str(), FALSE );
}