]> git.saurik.com Git - wxWidgets.git/blame - user/wxFile/FMJobs.h
* wxThread fixes
[wxWidgets.git] / user / wxFile / FMJobs.h
CommitLineData
e3e65dac
RR
1/*
2 * File: FMJobs.h
3 *
4 * Author: Robert Roebling
5 *
6 * Copyright: (C) 1997, GNU (Robert Roebling)
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */
22
23#ifndef FMJobs_h
24#define FMJobs_h
25
26#ifdef __GNUG__
27#pragma interface
28#endif
29
30#include "wx/defs.h"
31#include "wx/dialog.h"
32#include "wx/frame.h"
33#include "wx/button.h"
34#include "wx/stattext.h"
35#include "wx/timer.h"
36
37//-----------------------------------------------------------------------------
38// derived classes
39//-----------------------------------------------------------------------------
40
41class wxCopyStatusDia;
42class wxDeleteStatusDia;
43class wxCopyTimer;
44class wxDeleteTimer;
45
46//-----------------------------------------------------------------------------
47// wxCopyStatusDia
48//-----------------------------------------------------------------------------
49
50class wxCopyStatusDia: public wxDialog
51{
52 DECLARE_DYNAMIC_CLASS( wxCopyStatusDia );
53
54 private:
55
56 wxString m_dest;
57 wxArrayString *m_files;
58 wxButton *m_cancelButton;
59 wxStaticText *m_sourceMsg;
60 wxStaticText *m_destMsg;
61 wxStaticText *m_statusMsg;
62 bool m_stop;
63 wxTimer *m_timer;
64
65 public:
66
67 wxCopyStatusDia(void) : wxDialog() {};
68 wxCopyStatusDia( wxFrame *parent, const wxString &dest, wxArrayString *files );
69 ~wxCopyStatusDia();
70 void OnCommand( wxCommandEvent &event );
71 void DoCopy(void);
72
73 private:
74 void CopyDir( wxString &srcDir, wxString &destDir );
75 void CopyFile( wxString &src, wxString &destDir );
76
77 DECLARE_EVENT_TABLE();
78};
79
80//-----------------------------------------------------------------------------
81// wxDeleteStatusDia
82//-----------------------------------------------------------------------------
83
84/*
85class wxDeleteStatusDia: public wxDialog
86{
87 DECLARE_DYNAMIC_CLASS( wxDeleteStatusDia );
88
89 private:
90
91 wxArrayString *m_files;
92 wxButton *m_cancelButton;
93 wxStaticText *m_targetMsg;
94 wxStaticText *m_filesMsg,*m_dirsMsg;
95 bool m_stop;
96 wxTimer *m_timer;
97 int m_countFiles,m_countDirs;
98
99 public:
100
101 wxDeleteStatusDia(void) : wxDialog() {};
102 wxDeleteStatusDia( wxFrame *parent, wxArrayString *files );
103 ~wxDeleteStatusDia();
104 void OnCommand( wxCommandEvent &event );
105 void DoDelete(void);
106
107 private:
108 void DeleteDir( wxString &target );
109 void DeleteFile( wxString &target );
110
111 DECLARE_EVENT_TABLE();
112};
113*/
114
115//-----------------------------------------------------------------------------
116// wxTimer
117//-----------------------------------------------------------------------------
118
119class wxCopyTimer: public wxTimer
120{
121 private:
122 wxCopyStatusDia *m_owner;
123
124 public:
125 wxCopyTimer( wxCopyStatusDia *owner ) { m_owner = owner; };
126 void Notify() { m_owner->DoCopy(); };
127};
128
129/*
130class wxDeleteTimer: public wxTimer
131{
132 private:
133 wxDeleteStatusDia *m_owner;
134
135 public:
136 wxDeleteTimer( wxDeleteStatusDia *owner ) { m_owner = owner; };
137 void Notify() { m_owner->DoDelete(); };
138};
139*/
140
141#endif // FMJobs_h
142
143