diff include/dndfile.h @ 5:52697c869ce8

delete move&detect button.
author pyon@macmini
date Tue, 18 Oct 2011 07:53:48 +0900
parents
children 9c85d71cad7c
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/include/dndfile.h	Tue Oct 18 07:53:48 2011 +0900
@@ -0,0 +1,23 @@
+#include "wx/wxprec.h"
+ 
+#ifndef WX_PRECOMP
+    #include "wx/wx.h"
+    #include "wx/arrstr.h"
+    #include "wx/textctrl.h"
+    #include "wx/dnd.h"
+#endif
+
+class DnDFile : public wxFileDropTarget
+{
+    public:
+        DnDFile( wxTextCtrl *owner ) { m_owner = owner; }
+        virtual bool OnDropFiles( wxCoord x, wxCoord y, const wxArrayString& finenames )
+        {
+            m_owner->SetValue( finenames[0] );
+            return true;
+        }
+
+    private:
+        wxTextCtrl *m_owner;
+};
+