]>
Commit | Line | Data |
---|---|---|
2bda0e17 KB |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: filedlg.h | |
3 | // Purpose: wxFileDialog class | |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 01/02/97 | |
7 | // RCS-ID: $Id$ | |
bbcdf8bc | 8 | // Copyright: (c) Julian Smart |
ba681060 | 9 | // Licence: wxWindows licence |
2bda0e17 KB |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
bbcdf8bc JS |
12 | #ifndef _WX_FILEDLG_H_ |
13 | #define _WX_FILEDLG_H_ | |
2bda0e17 KB |
14 | |
15 | #ifdef __GNUG__ | |
16 | #pragma interface "filedlg.h" | |
17 | #endif | |
18 | ||
19 | #include "wx/dialog.h" | |
20 | ||
21 | /* | |
22 | * File selector | |
23 | */ | |
24 | ||
25 | WXDLLEXPORT_DATA(extern const char*) wxFileSelectorPromptStr; | |
26 | WXDLLEXPORT_DATA(extern const char*) wxFileSelectorDefaultWildcardStr; | |
27 | ||
28 | class WXDLLEXPORT wxFileDialog: public wxDialog | |
29 | { | |
30 | DECLARE_DYNAMIC_CLASS(wxFileDialog) | |
ba681060 | 31 | |
2bda0e17 KB |
32 | public: |
33 | wxFileDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr, | |
62448488 | 34 | const wxString& defaultDir = wxEmptyString, const wxString& defaultFile = wxEmptyString, const wxString& wildCard = wxFileSelectorDefaultWildcardStr, |
2bda0e17 KB |
35 | long style = 0, const wxPoint& pos = wxDefaultPosition); |
36 | ||
37 | inline void SetMessage(const wxString& message) { m_message = message; } | |
38 | inline void SetPath(const wxString& path) { m_path = path; } | |
39 | inline void SetDirectory(const wxString& dir) { m_dir = dir; } | |
40 | inline void SetFilename(const wxString& name) { m_fileName = name; } | |
41 | inline void SetWildcard(const wxString& wildCard) { m_wildCard = wildCard; } | |
42 | inline void SetStyle(long style) { m_dialogStyle = style; } | |
43 | inline void SetFilterIndex(int filterIndex) { m_filterIndex = filterIndex; } | |
44 | ||
45 | inline wxString GetMessage(void) const { return m_message; } | |
46 | inline wxString GetPath(void) const { return m_path; } | |
47 | inline wxString GetDirectory(void) const { return m_dir; } | |
48 | inline wxString GetFilename(void) const { return m_fileName; } | |
49 | inline wxString GetWildcard(void) const { return m_wildCard; } | |
50 | inline long GetStyle(void) const { return m_dialogStyle; } | |
51 | inline int GetFilterIndex(void) const { return m_filterIndex ; } | |
52 | ||
53 | int ShowModal(void); | |
ba681060 VZ |
54 | |
55 | protected: | |
56 | wxString m_message; | |
57 | long m_dialogStyle; | |
58 | wxWindow * m_parent; | |
59 | wxString m_dir; | |
60 | wxString m_path; // Full path | |
61 | wxString m_fileName; | |
62 | wxString m_wildCard; | |
63 | int m_filterIndex; | |
2bda0e17 KB |
64 | }; |
65 | ||
a8e50c86 VZ |
66 | #define wxOPEN 0x0001 |
67 | #define wxSAVE 0x0002 | |
68 | #define wxOVERWRITE_PROMPT 0x0004 | |
69 | #define wxHIDE_READONLY 0x0008 | |
70 | #define wxFILE_MUST_EXIST 0x0010 | |
2bda0e17 | 71 | |
2bda0e17 | 72 | #endif |
bbcdf8bc | 73 | // _WX_FILEDLG_H_ |