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

source/view/FileDropTarget.cc

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

Generated on Sat Dec 4 23:06:36 2004 for hack4u by  doxygen 1.3.9.1