-
Notifications
You must be signed in to change notification settings - Fork 2
/
FTPBrowserPanel.h
76 lines (62 loc) · 1.62 KB
/
FTPBrowserPanel.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#ifndef __FTPBROWSERPANEL
#define __FTPBROWSERPANEL
#include <wx/wx.h>
#include <wx/listctrl.h>
#include <wx/textctrl.h>
#include <wx/thread.h>
#include <wx/protocol/ftp.h>
#include <wx/imaglist.h>
// Statsgen Includes
#include "WindowIDs.h"
#include "RemoteMachine.h"
#include "ProgressPanel.h"
#define WORKER_EVENT 1000
#define REMOTE_REQUEST_DIR_LIST
class RemoteFTPBrowserThread;
class FTPBrowserPanel : public wxPanel
{
public:
virtual ~FTPBrowserPanel();
FTPBrowserPanel(
wxString &configGroupIn,
wxString &defaultPath,
bool browsingForFile);
void CreateScreen();
void Update(int fileIndex);
void CreateList();
void OnResize(wxSizeEvent &event);
void OnRemoteRequest(wxCommandEvent &event);
RemoteMachine *remoteMachine;
wxArrayString fileNames;
void StartThreadWork();
void StopThreadWork();
bool DoingThreadWork();
void GetDirectoryListing();
void ChangeDirectory(wxString &filename);
void OnListDoubleClick(wxListEvent &event);
void OnListSingleClick(wxListEvent &event);
wxString GetCurrentSelection();
long selectedSize;
wxString CurrentPath();
protected:
wxListCtrl *directoryListing;
private:
wxImageList imageList;
wxString configGroup;
wxArrayLong fileSizes;
wxString currentPath;
bool workingForThread;
RemoteFTPBrowserThread *thread;
wxTextCtrl *currentSelection;
ProgressPanel *progressPanel;
DECLARE_EVENT_TABLE()
};
class RemoteFTPBrowserThread : public wxThread
{
public:
RemoteFTPBrowserThread(FTPBrowserPanel *browserPanelIn);
virtual void *Entry();
virtual void OnExit();
FTPBrowserPanel *browserPanel;
};
#endif