// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#include "wx/wxprec.h"
+#include <wx/wxprec.h>
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
-#include "wx/wx.h"
+#include <wx/wx.h>
#endif
-#include "wx/intl.h"
-#include "wx/log.h"
+#include <wx/intl.h>
+#include <wx/log.h>
-#include "wx/dnd.h"
+#include <wx/dnd.h>
#ifdef __WXMOTIF__
#error Sorry, drag and drop is not yet implemented on wxMotif.
// file names) we drop on them
// ----------------------------------------------------------------------------
+// FIXME this is ugly and should be fixed in the library itself
+#ifdef __WXMSW__
+ typedef long wxDropPointCoord;
+#else // wxGTK
+ typedef int wxDropPointCoord;
+#endif // MSW/GTK
+
class DnDText : public wxTextDropTarget
{
public:
DnDText(wxListBox *pOwner) { m_pOwner = pOwner; }
- virtual bool OnDropText(int x, int y, const wxChar* psz );
+ virtual bool OnDropText(wxDropPointCoord x, wxDropPointCoord y, const wxChar* psz );
private:
wxListBox *m_pOwner;
public:
DnDFile(wxListBox *pOwner) { m_pOwner = pOwner; }
- virtual bool OnDropFiles(int x, int y,
+ virtual bool OnDropFiles(wxDropPointCoord x, wxDropPointCoord y,
size_t nFiles, const wxChar* const aszFiles[] );
private:
// associate drop targets with 2 text controls
m_ctrlFile->SetDropTarget(new DnDFile(m_ctrlFile));
- m_ctrlText->SetDropTarget( new DnDText(m_ctrlText) );
+ m_ctrlText->SetDropTarget(new DnDText(m_ctrlText));
wxLayoutConstraints *c;
// ----------------------------------------------------------------------------
// Notifications called by the base class
// ----------------------------------------------------------------------------
-bool DnDText::OnDropText( int, int, const wxChar *psz )
+bool DnDText::OnDropText( wxDropPointCoord, wxDropPointCoord, const wxChar *psz )
{
m_pOwner->Append(psz);
return TRUE;
}
-bool DnDFile::OnDropFiles( int, int, size_t nFiles,
+bool DnDFile::OnDropFiles( wxDropPointCoord, wxDropPointCoord, size_t nFiles,
const wxChar* const aszFiles[])
{
wxString str;