Main Page | Namespace List | Class List | Directories | File List | Namespace Members | Class Members | File Members

FileDropTarget.cc

Go to the documentation of this file.
00001 /*
00002  * ffse
00003  * Copyright (C) 2004-2005 emuWorks
00004  * http://games.technoplaza.net/
00005  *
00006  * This file is part of ffse.
00007  *
00008  * ffse is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * ffse is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with ffse; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00021  */
00022 
00023 // $Id: FileDropTarget.cc,v 1.2 2005/08/04 03:07:59 technoplaza Exp $
00024 
00025 #ifdef HAVE_CONFIG_H
00026     #include <config.h>
00027 #endif
00028 
00029 #include <wx/wxprec.h>
00030 
00031 #ifndef WX_PRECOMP
00032     #include <wx/wx.h>
00033 #endif
00034 
00035 #include "FileDropTarget.hh"
00036 
00037 using namespace ffse;
00038 
00039 bool FileDropTarget::OnDropFiles(wxCoord, wxCoord, const wxArrayString &files) {
00040     int size = files.GetCount();
00041 
00042     if (size > 0) {
00043         wxString filename = files[0];
00044 
00045         #ifdef __WXGTK__
00046             filename.Replace("%20", " ");
00047         #endif
00048 
00049         owner->load(filename);
00050     }
00051 
00052     return true;
00053 }
00054 

Generated on Wed Aug 3 22:01:53 2005 for ffse by  doxygen 1.4.4