1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxFileDialog class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_FILEDLG_H_
13 #define _WX_FILEDLG_H_
16 #pragma interface "filedlg.h"
19 #include "wx/dialog.h"
25 WXDLLEXPORT_DATA(extern const wxChar
*) wxFileSelectorPromptStr
;
26 WXDLLEXPORT_DATA(extern const wxChar
*) wxFileSelectorDefaultWildcardStr
;
28 class WXDLLEXPORT wxFileDialog
: public wxDialog
30 DECLARE_DYNAMIC_CLASS(wxFileDialog
)
33 wxFileDialog(wxWindow
*parent
, const wxString
& message
= wxFileSelectorPromptStr
,
34 const wxString
& defaultDir
= wxEmptyString
, const wxString
& defaultFile
= wxEmptyString
, const wxString
& wildCard
= wxFileSelectorDefaultWildcardStr
,
35 long style
= 0, const wxPoint
& pos
= wxDefaultPosition
);
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
; }
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
; }
60 wxString m_path
; // Full path
68 #define wxOVERWRITE_PROMPT 0x0004
69 #define wxHIDE_READONLY 0x0008
70 #define wxFILE_MUST_EXIST 0x0010
72 // File selector - backward compatibility
74 wxFileSelector(const wxChar
*message
= wxFileSelectorPromptStr
,
75 const wxChar
*default_path
= NULL
,
76 const wxChar
*default_filename
= NULL
,
77 const wxChar
*default_extension
= NULL
,
78 const wxChar
*wildcard
= wxFileSelectorDefaultWildcardStr
,
80 wxWindow
*parent
= NULL
,
81 int x
= -1, int y
= -1);
83 // An extended version of wxFileSelector
85 wxFileSelectorEx(const wxChar
*message
= wxFileSelectorPromptStr
,
86 const wxChar
*default_path
= NULL
,
87 const wxChar
*default_filename
= NULL
,
88 int *indexDefaultExtension
= NULL
,
89 const wxChar
*wildcard
= wxFileSelectorDefaultWildcardStr
,
91 wxWindow
*parent
= NULL
,
92 int x
= -1, int y
= -1);
94 // Ask for filename to load
96 wxLoadFileSelector(const wxChar
*what
,
97 const wxChar
*extension
,
98 const wxChar
*default_name
= (const wxChar
*)NULL
,
99 wxWindow
*parent
= (wxWindow
*) NULL
);
101 // Ask for filename to save
103 wxSaveFileSelector(const wxChar
*what
,
104 const wxChar
*extension
,
105 const wxChar
*default_name
= (const wxChar
*) NULL
,
106 wxWindow
*parent
= (wxWindow
*) NULL
);