-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathdragndrop.cpp
29 lines (26 loc) · 1.07 KB
/
dragndrop.cpp
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
/////////////////////////////////////////////////////////////////////////////////
// Author: Steven Lamerton
// Copyright: Copyright (C) 2007-2009 Steven Lamerton
// License: GNU GPL 2 (See readme for more info)
/////////////////////////////////////////////////////////////////////////////////
#include "dragndrop.h"
#include "toucan.h"
#include "forms/frmmain.h"
#include "controls/dirctrl.h"
bool DnDFileTree::OnDropFiles(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), const wxArrayString& arrFilenames){
for(unsigned int i = 0; i < arrFilenames.GetCount(); i++){
m_Tree->AddItem(arrFilenames.Item(i));
if(m_Tree->GetId() == ID_BACKUP_TREECTRL){
wxGetApp().MainWindow->m_BackupLocations->Add(arrFilenames.Item(i));
}
else if(m_Tree->GetId() == ID_SECURE_TREECTRL){
wxGetApp().MainWindow->m_SecureLocations->Add(arrFilenames.Item(i));
}
}
return true;
}
bool DnDFileTreeText::OnDropFiles(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), const wxArrayString& arrFilenames){
m_Text->SetValue(arrFilenames.Item(0));
m_Tree->AddItem(arrFilenames.Item(0));
return true;
}