]>
Commit | Line | Data |
---|---|---|
9b6dbb09 JS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: filedlg.h | |
3 | // Purpose: wxFileDialog class | |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 17/09/98 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Julian Smart | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _WX_FILEDLG_H_ | |
13 | #define _WX_FILEDLG_H_ | |
14 | ||
3399051e | 15 | #if defined(__GNUG__) && !defined(__APPLE__) |
9b6dbb09 JS |
16 | #pragma interface "filedlg.h" |
17 | #endif | |
18 | ||
19 | #include "wx/dialog.h" | |
20 | ||
21 | /* | |
83df96d6 JS |
22 | * File selector |
23 | */ | |
9b6dbb09 | 24 | |
9b6dbb09 JS |
25 | class WXDLLEXPORT wxFileDialog: public wxDialog |
26 | { | |
83df96d6 | 27 | DECLARE_DYNAMIC_CLASS(wxFileDialog) |
dfad0599 | 28 | public: |
9b6dbb09 JS |
29 | wxString m_message; |
30 | long m_dialogStyle; | |
31 | wxWindow * m_parent; | |
32 | wxString m_dir; | |
33 | wxString m_path; // Full path | |
34 | wxString m_fileName; | |
35 | wxString m_wildCard; | |
36 | int m_filterIndex; | |
83df96d6 | 37 | |
dfad0599 JS |
38 | // For Motif |
39 | wxPoint m_pos; | |
40 | static wxString m_fileSelectorAnswer; | |
41 | static bool m_fileSelectorReturned; | |
83df96d6 | 42 | |
9b6dbb09 JS |
43 | public: |
44 | wxFileDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr, | |
45 | const wxString& defaultDir = "", const wxString& defaultFile = "", const wxString& wildCard = wxFileSelectorDefaultWildcardStr, | |
46 | long style = 0, const wxPoint& pos = wxDefaultPosition); | |
83df96d6 | 47 | |
9b6dbb09 JS |
48 | inline void SetMessage(const wxString& message) { m_message = message; } |
49 | inline void SetPath(const wxString& path) { m_path = path; } | |
50 | inline void SetDirectory(const wxString& dir) { m_dir = dir; } | |
51 | inline void SetFilename(const wxString& name) { m_fileName = name; } | |
52 | inline void SetWildcard(const wxString& wildCard) { m_wildCard = wildCard; } | |
53 | inline void SetStyle(long style) { m_dialogStyle = style; } | |
54 | inline void SetFilterIndex(int filterIndex) { m_filterIndex = filterIndex; } | |
83df96d6 | 55 | |
9b6dbb09 JS |
56 | inline wxString GetMessage() const { return m_message; } |
57 | inline wxString GetPath() const { return m_path; } | |
36cc3968 | 58 | inline void GetPaths(wxArrayString& a) { a.Empty(); a.Add(m_path); } |
9b6dbb09 JS |
59 | inline wxString GetDirectory() const { return m_dir; } |
60 | inline wxString GetFilename() const { return m_fileName; } | |
36cc3968 | 61 | inline void GetFilenames(wxArrayString& a) { a.Empty(); |
83df96d6 | 62 | a.Add( m_fileName); } |
9b6dbb09 JS |
63 | inline wxString GetWildcard() const { return m_wildCard; } |
64 | inline long GetStyle() const { return m_dialogStyle; } | |
65 | inline int GetFilterIndex() const { return m_filterIndex ; } | |
83df96d6 | 66 | |
9b6dbb09 JS |
67 | int ShowModal(); |
68 | }; | |
69 | ||
b600ed13 | 70 | #endif // _WX_FILEDLG_H_ |