1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxFileDialog class
4 // Author: David Webster
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_FILEDLG_H_
13 #define _WX_FILEDLG_H_
15 #include "wx/dialog.h"
21 class WXDLLEXPORT wxFileDialog
: public wxDialog
23 DECLARE_DYNAMIC_CLASS(wxFileDialog
)
25 wxFileDialog( wxWindow
* pParent
26 ,const wxString
& rsMessage
= wxFileSelectorPromptStr
27 ,const wxString
& rsDefaultDir
= ""
28 ,const wxString
& rsDefaultFile
= ""
29 ,const wxString
& rsWildCard
= wxFileSelectorDefaultWildcardStr
31 ,const wxPoint
& rPos
= wxDefaultPosition
34 inline void SetMessage(const wxString
& rsMessage
) { m_sMessage
= rsMessage
; }
35 inline void SetPath(const wxString
& rsPath
) { m_sPath
= rsPath
; }
36 inline void SetDirectory(const wxString
& rsDir
) { m_sDir
= rsDir
; }
37 inline void SetFilename(const wxString
& rsName
) { m_sFileName
= rsName
; }
38 inline void SetWildcard(const wxString
& rsWildCard
) { m_sWildCard
= rsWildCard
; }
39 inline void SetStyle(long lStyle
) { m_lDialogStyle
= lStyle
; }
40 inline void SetFilterIndex(int nFilterIndex
) { m_nFilterIndex
= nFilterIndex
; }
42 inline wxString
GetMessage(void) const { return m_sMessage
; }
43 inline wxString
GetPath(void) const { return m_sPath
; }
44 void GetPaths(wxArrayString
& rasPath
) const;
45 inline wxString
GetDirectory(void) const { return m_sDir
; }
46 inline wxString
GetFilename(void) const { return m_sFileName
; }
47 inline void GetFilenames(wxArrayString
& rasFilenames
) { rasFilenames
= m_asFileNames
; }
48 inline wxString
GetWildcard(void) const { return m_sWildCard
; }
49 inline long GetStyle(void) const { return m_lDialogStyle
; }
50 inline int GetFilterIndex() const { return m_nFilterIndex
; }
59 wxString m_sPath
; // Full path
61 wxArrayString m_asFileNames
;
65 }; // end of CLASS wxFileDialog
69 #define wxOVERWRITE_PROMPT 0x0004
70 #define wxHIDE_READONLY 0x0008
71 #define wxFILE_MUST_EXIST 0x0010
74 // File selector - backward compatibility
76 WXDLLEXPORT wxString
wxFileSelector( const char* pzMessage
= wxFileSelectorPromptStr
77 ,const char* pzDefaultPath
= NULL
78 ,const char* pzDefaultFilename
= NULL
79 ,const char* pzDefaultExtension
= NULL
80 ,const char* pzWildcard
= wxFileSelectorDefaultWildcardStr
82 ,wxWindow
* pParent
= NULL
88 // An extended version of wxFileSelector
90 WXDLLEXPORT wxString
wxFileSelectorEx( const char* pzMessage
= wxFileSelectorPromptStr
91 ,const char* pzDefaultPath
= NULL
92 ,const char* pzDefaultFilename
= NULL
93 ,int* pnIndexDefaultExtension
= NULL
94 ,const char* pzWildcard
= wxFileSelectorDefaultWildcardStr
96 ,wxWindow
* pParent
= NULL
102 // Generic file load dialog
104 WXDLLEXPORT wxString
wxLoadFileSelector( const char* pzWhat
105 ,const char* pzExtension
106 ,const char* pzDefaultName
= NULL
107 ,wxWindow
* pParent
= NULL
111 // Generic file save dialog
113 WXDLLEXPORT wxString
wxSaveFileSelector( const char* pzWhat
114 ,const char* pzExtension
115 ,const char* pzDefaultName
= NULL
116 ,wxWindow
* pParent
= NULL