Debian Codegraph @

editor/FilePageAddDlg.h

raw symbols SCIP
1 /*
2 * Descent 3
3 * Copyright (C) 2024 Parallax Software
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 #if !defined(AFX_FILEPAGEADDDLG_H__F3555122_C5AB_11D2_AB2B_006008BF0B09__INCLUDED_)
20 #define AFX_FILEPAGEADDDLG_H__F3555122_C5AB_11D2_AB2B_006008BF0B09__INCLUDED_
21
22 #if _MSC_VER > 1000
23 #pragma once
24 #endif // _MSC_VER > 1000
25 // FilePageAddDlg.h : header file
26 //
27
28 /////////////////////////////////////////////////////////////////////////////
29 // CFilePageAddDlg dialog
30
31 #define DRIVES 0
32 #define DIRECTORIES 1
33 #define FILES 2
34
35 extern char *DirectoryNames[];
36 extern int NumDirectoryNames;
37
38 /////////////////////////////////////////////////////////////////////////////
39 // CFileList window
40 class CFileList : public CListBox {
41 // Construction
42 public:
43 BOOL RefreshMask(CString mask);
44 BOOL RefreshBox(CString path);
45 //*.* is default filemask
46 BOOL RefreshBox(CString path, CString mask);
47 void setFileMask(CString mask);
48 CString getFileMask();
49 void setPath(CString path);
50 CString getPath();
51 BOOL InitBox(UINT res, CWnd *parent, LPSTR lpszPath, LPSTR lpszFileMask, UINT flags, UINT msg,
52 void (*cb)(char *path) = NULL);
53 CFileList();
54
55 // Attributes
56 public:
57 // Operations
58 protected:
59 // Overrides
60 // ClassWizard generated virtual function overrides
61 //{{AFX_VIRTUAL(CFileList)
62 //}}AFX_VIRTUAL
63
64 // Implementation
65 public:
66 virtual ~CFileList();
67
68 // Generated message map functions
69 protected:
70 //{{AFX_MSG(CFileList)
71 afx_msg void OnDblclk();
72 //}}AFX_MSG
73
74 DECLARE_MESSAGE_MAP()
75 private:
76 CWnd *m_cwndParent;
77 UINT m_nMsg;
78 UINT m_nFlag;
79 CString m_csPath;
80 CString m_csFileMask;
81 void CheckEntry(LPSTR name, DWORD flag, BOOL dir); // dir==TRUE for directories
82 BOOL FillBox();
83 void (*callback)(char *path);
84 };
85
86 class CFilePageAddDlg : public CDialog {
87 // Construction
88 public:
89 CFilePageAddDlg(CWnd *pParent = NULL); // standard constructor
90 ~CFilePageAddDlg(void);
91
92 void SetInitialPath(char *path);
93
94 int m_NumberOfSelectedFiles;
95 char **m_SelectedFiles;
96 char *m_SelectedDestDir;
97
98 private:
99 bool Quit(void);
100 CString initial_path;
101
102 // Dialog Data
103 //{{AFX_DATA(CFilePageAddDlg)
104 enum { IDD = IDD_FILEPAGEADD };
105 // NOTE: the ClassWizard will add data members here
106 //}}AFX_DATA
107
108 // Overrides
109 // ClassWizard generated virtual function overrides
110 //{{AFX_VIRTUAL(CFilePageAddDlg)
111 protected:
112 virtual void DoDataExchange(CDataExchange *pDX); // DDX/DDV support
113 virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
114 //}}AFX_VIRTUAL
115
116 // Implementation
117 protected:
118 // Generated message map functions
119 //{{AFX_MSG(CFilePageAddDlg)
120 virtual BOOL OnInitDialog();
121 afx_msg void OnSelchangeListDrives();
122 afx_msg void OnSelchangeListFolders();
123 virtual void OnOK();
124 //}}AFX_MSG
125 DECLARE_MESSAGE_MAP()
126
127 private:
128 // the three boxes in this example
129 CFileList m_cflDrive;
130 CFileList m_cflDir;
131 CFileList m_cflFile;
132 // user-defined message for communication between the boxes
133 // and dialog (msg is trapped in WindowProc)
134 UINT m_nBoxMsg;
135 };
136
137 //{{AFX_INSERT_LOCATION}}
138 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
139
140 #endif // !defined(AFX_FILEPAGEADDDLG_H__F3555122_C5AB_11D2_AB2B_006008BF0B09__INCLUDED_)