-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathdragndrop.h
43 lines (33 loc) · 901 Bytes
/
dragndrop.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/////////////////////////////////////////////////////////////////////////////////
// Author: Steven Lamerton
// Copyright: Copyright (C) 2007-2009 Steven Lamerton
// License: GNU GPL 2 (See readme for more info)
/////////////////////////////////////////////////////////////////////////////////
#ifndef H_DRAGNDROP
#define H_DRAGNDROP
class DirCtrl;
class wxTextCtrl;
#include <wx/dnd.h>
class DnDFileTree : public wxFileDropTarget
{
public:
DnDFileTree(DirCtrl *tree) {
m_Tree = tree;
}
bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& arrFilenames);
private:
DirCtrl *m_Tree;
};
class DnDFileTreeText : public wxFileDropTarget
{
public:
DnDFileTreeText(wxTextCtrl *text, DirCtrl *tree) {
m_Text = text;
m_Tree = tree;
}
bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& arrFilenames);
private:
wxTextCtrl *m_Text;
DirCtrl *m_Tree;
};
#endif