1 |
// Vance Thrift and Biller File Utility 2 |
2 |
// |
3 |
// Douglas Thrift |
4 |
// |
5 |
// $Id: DiscBrowse.h,v 1.7 2003/09/03 22:58:37 douglas Exp $ |
6 |
|
7 |
#ifndef _DiscBrowse_h_ |
8 |
#define _DiscBrowse_h_ |
9 |
|
10 |
#include "IndividualClient.h" |
11 |
|
12 |
class DiscBrowse |
13 |
{ |
14 |
private: |
15 |
struct Thing |
16 |
{ |
17 |
int index; |
18 |
bool order; |
19 |
HWND list; |
20 |
}; |
21 |
PROPSHEETPAGE wizard[2]; |
22 |
string discDir; |
23 |
bool sortFile, sortNumber, sortName, sortSize; |
24 |
static map<HWND, DiscBrowse*> windows; |
25 |
void loadDir(void); |
26 |
void saveDir(void); |
27 |
void setDiscDir(HWND parent = NULL); |
28 |
void populate(HWND parent); |
29 |
static DiscBrowse* which(HWND window); |
30 |
static DiscBrowse* which(HWND window, LPARAM l); |
31 |
static int CALLBACK browse(HWND dialog, UINT msg, LPARAM l, LPARAM d); |
32 |
static int CALLBACK sort(LPARAM first, LPARAM second, LPARAM l); |
33 |
static INT_PTR CALLBACK start(HWND dialog, UINT msg, WPARAM w, LPARAM l); |
34 |
static INT_PTR CALLBACK browse(HWND dialog, UINT msg, WPARAM w, LPARAM l); |
35 |
protected: |
36 |
string title; |
37 |
HMENU popup; |
38 |
unsigned number; |
39 |
string tail(const string& path) { return path + (path[path.length() - 1] != |
40 |
'\\' ? "\\" : ""); } |
41 |
static unsigned count; |
42 |
static map<unsigned, DiscBrowse*> browsers; |
43 |
public: |
44 |
DiscBrowse(); |
45 |
virtual ~DiscBrowse(); |
46 |
virtual void run(void); |
47 |
}; |
48 |
|
49 |
#endif // _DiscBrowse_h_ |