#if wxUSE_DRAG_AND_DROP
#include "wx/dataobj.h"
- static bool wxSetClipboardData(wxDataObject *data);
+// static bool wxSetClipboardData(wxDataObject *data);
#endif
// ===========================================================================
bool wxOpenClipboard()
{
- wxCHECK_MSG( !gs_wxClipboardIsOpen, TRUE, wxT("clipboard already opened.") );
+ wxCHECK_MSG( !gs_wxClipboardIsOpen, true, wxT("clipboard already opened.") );
// TODO:
/*
wxWindow *win = wxTheApp->GetTopWindow();
return FALSE;
}
*/
- return TRUE;
+ return true;
}
bool wxEmptyClipboard()
return FALSE;
}
*/
- return TRUE;
+ return true;
}
bool wxIsClipboardOpened()
return gs_wxClipboardIsOpen;
}
-bool wxIsClipboardFormatAvailable(wxDataFormat dataFormat)
+bool wxIsClipboardFormatAvailable(wxDataFormat WXUNUSED(dataFormat))
{
// TODO: return ::IsClipboardFormatAvailable(dataFormat) != 0;
- return FALSE;
+ return false;
}
+#if 0
#if wxUSE_DRAG_AND_DROP
static bool wxSetClipboardData(wxDataObject *data)
{
return FALSE;
}
*/
- return TRUE;
+ return true;
}
#endif // wxUSE_DRAG_AND_DROP
+#endif
bool wxSetClipboardData(wxDataFormat dataFormat,
const void *data,
return FALSE;
}
*/
- return TRUE;
+ return true;
}
void *wxGetClipboardData(wxDataFormat dataFormat, long *len)
{
- void *retval = NULL;
+// void *retval = NULL;
// TODO:
/*
switch ( dataFormat )
wxBM->SetWidth(bm.bmWidth);
wxBM->SetHeight(bm.bmHeight);
wxBM->SetDepth(bm.bmPlanes);
- wxBM->SetOk(TRUE);
+ wxBM->SetOk(true);
retval = wxBM;
break;
}
if ( data )
return AddData(data);
else
- return TRUE;
+ return true;
*/
- return TRUE;
+ return true;
}
bool wxClipboard::AddData( wxDataObject *data )
#if wxUSE_DRAG_AND_DROP
wxCHECK_MSG( wxIsClipboardOpened(), FALSE, wxT("clipboard not open") );
-// wxDataFormat format = data->GetFormat();
+// wxDataFormat format = data->GetPreferredFormat();
// TODO:
/*
switch ( format )
{
wxBitmapDataObject* bitmapDataObject = (wxBitmapDataObject*) data;
wxBitmap bitmap(bitmapDataObject->GetBitmap());
- return wxSetClipboardData(data->GetFormat(), &bitmap);
+ return wxSetClipboardData(data->GetPreferredFormat(), &bitmap);
}
#if wxUSE_METAFILE
#else // !wxUSE_DRAG_AND_DROP
*/
return FALSE;
+#else
+ return FALSE;
#endif // wxUSE_DRAG_AND_DROP/!wxUSE_DRAG_AND_DROP
}
wxCloseClipboard();
}
-bool wxClipboard::IsSupported( wxDataFormat format )
+bool wxClipboard::IsSupported( const wxDataFormat& format )
{
return wxIsClipboardFormatAvailable(format);
}
wxCHECK_MSG( wxIsClipboardOpened(), FALSE, wxT("clipboard not open") );
#if wxUSE_DRAG_AND_DROP
-// wxDataFormat format = data.GetFormat();
+// wxDataFormat format = data.GetPreferredFormat();
// TODO:
/*
switch ( format )
{
textDataObject.SetText(s);
delete[] s;
- return TRUE;
+ return true;
}
else
return FALSE;
case wxDF_DIB:
{
wxBitmapDataObject& bitmapDataObject = (wxBitmapDataObject &)data;
- wxBitmap* bitmap = (wxBitmap *)wxGetClipboardData(data->GetFormat());
+ wxBitmap* bitmap = (wxBitmap *)wxGetClipboardData(data->GetPreferredFormat());
if (bitmap)
{
bitmapDataObject.SetBitmap(* bitmap);
delete bitmap;
- return TRUE;
+ return true;
}
else
return FALSE;
{
metaFileDataObject.SetMetafile(*metaFile);
delete metaFile;
- return TRUE;
+ return true;
}
else
return FALSE;
((wxPrivateDataObject &)data).SetData(buf, len);
free(buf);
- return TRUE;
+ return true;
}
}
#else
*/
return FALSE;
+#else
+ return FALSE;
#endif
}
-#else
- #error "Please turn wxUSE_CLIPBOARD on to compile this file."
#endif // wxUSE_CLIPBOARD
-