Mercurial > mercurial > hgweb_iv.cgi
comparison include/dndfile.h @ 0:3334ef689214 default tip
start develop.
author | pyon@macmini |
---|---|
date | Fri, 14 Aug 2020 03:15:53 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:3334ef689214 |
---|---|
1 // Filename : dndfile.h | |
2 // Last Change: 2020-08-13 木 12:16:35. | |
3 // | |
4 | |
5 #pragma once | |
6 | |
7 class DnDFile : public wxFileDropTarget | |
8 { | |
9 public: | |
10 DnDFile( wxTextCtrl *textCtrl ) | |
11 { | |
12 m_textCtrl = textCtrl; | |
13 } | |
14 virtual bool OnDropFiles( wxCoord x, wxCoord y, const wxArrayString& filenames ) | |
15 { | |
16 size_t nFiles = filenames.GetCount(); | |
17 if ( nFiles != 1 ) return false; | |
18 m_textCtrl->SetValue( filenames[0] ); | |
19 | |
20 return true; | |
21 } | |
22 | |
23 private: | |
24 wxTextCtrl* m_textCtrl; | |
25 }; | |
26 |