1 #include "dndFileTarget.hh"
4 #include "Base/Debug/Error.hh"
5 #include <Gui/StringConv.hh>
6 #include <wx/filename.h>
12 dndFileTarget::dndFileTarget(wxFrame *frame){m_frame = frame;}
15 bool dndFileTarget::OnDropFiles (wxCoord , wxCoord ,
const wxArrayString& filenames)
18 for (
size_t n = 0; n < filenames.Count(); n++){
19 if (wxFileName(filenames[n]).IsDir()) {
20 wxMessageBox(wxT(
"Dropping directories is unsupoprted. Please drop only filenames!"),
21 wxT(
"dndFileTarget Error"), wxOK|wxICON_EXCLAMATION);
25 ss<<n<<
". "<<filenames[n]<<
" ";
28 BIASASSERT(m_frame!=NULL);
29 m_frame->SetStatusText(
AsciiToWx(ss.str()) );
wxString AsciiToWx(const char *thestring)
Converts a C string to a wxString.