00001 /* 00002 * Super Metroid SRAM Editor 00003 * Copyright (C) 2005 emuWorks 00004 * http://games.technoplaza.net/ 00005 * 00006 * This file is part of Super Metroid SRAM Editor. 00007 * 00008 * Super Metroid SRAM Editor is free software; you can redistribute it and/or 00009 * modify 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 * Super Metroid SRAM Editor 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 Super Metroid SRAM Editor; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00021 */ 00022 00023 // $Id: SRAMFileTarget.hh,v 1.1 2005/10/15 03:13:48 technoplaza Exp $ 00024 00025 #ifndef _SMSE_SRAMFILETARGET_HH_ 00026 #define _SMSE_SRAMFILETARGET_HH_ 00027 00028 #include <wx/dnd.h> 00029 00030 namespace smse { 00031 class Frame; 00032 00033 /// Class to implement a drop target for SRAM files on the Frame 00034 class SRAMFileTarget : public wxFileDropTarget { 00035 private: 00036 Frame *frame; 00037 00038 public: 00039 /** 00040 * Creates a new SRAMFileTarget. 00041 * 00042 * @param frame The Frame to send files to. 00043 */ 00044 SRAMFileTarget(Frame *frame); 00045 00046 /** 00047 * Called when files are dropped on the associated Frame. 00048 * 00049 * @param x The x-coordinate of the drop (unused). 00050 * @param y The y-coordinate of the drop (unused). 00051 * @param files The filenames. 00052 * 00053 * @return true if the drop was accepted; false otherwise. 00054 */ 00055 virtual bool OnDropFiles(wxCoord x, wxCoord y, 00056 const wxArrayString &files); 00057 }; 00058 00059 inline SRAMFileTarget::SRAMFileTarget(Frame *frame) : frame(frame) {} 00060 } 00061 00062 #endif 00063