Mercurial > mercurial > hgweb_searcher03.cgi
diff include/dndfile.h @ 22:92188f60323d default tip
Implement Masking function on Preview Dialog.
author | pyon@macmini |
---|---|
date | Sat, 04 Apr 2015 17:23:46 +0900 |
parents | bc2e2b304095 |
children |
line wrap: on
line diff
--- a/include/dndfile.h Wed Dec 17 00:52:43 2014 +0900 +++ b/include/dndfile.h Sat Apr 04 17:23:46 2015 +0900 @@ -1,10 +1,13 @@ // Filename : dndfile.h -// Last Change: 12-Sep-2013. +// Last Change: 2015-04-04 11:10:10. // #ifndef __DNDFILE_H__ #define __DNDFILE_H__ #include "db.h" +#include "wx/config.h" +#include "wx/fileconf.h" +#include "myframe.h" class DnDFile : public wxFileDropTarget { @@ -54,5 +57,27 @@ private: wxGrid* m_grid; }; - + +class DnDFile2 : public wxFileDropTarget +{ + public: + DnDFile2( MyFrame *frame ) + { + m_frame = frame; + } + virtual bool OnDropFiles( wxCoord x, wxCoord y, const wxArrayString& filenames ) + { + size_t nFiles = filenames.GetCount(); + if ( nFiles != 1 ) return false; + + m_frame->ShowBPrintFrame( filenames[0] ); + + return true; + } + + private: + MyFrame* m_frame; +}; + #endif //__DNDFILE_H__ +