1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __GTKFILEDLGH__
12 #define __GTKFILEDLGH__
18 #include "wx/dialog.h"
20 //-------------------------------------------------------------------------
22 //-------------------------------------------------------------------------
24 extern const char *wxFileSelectorPromptStr
;
25 extern const char *wxFileSelectorDefaultWildcardStr
;
27 class wxFileDialog
: public wxDialog
29 DECLARE_DYNAMIC_CLASS(wxFileDialog
)
34 wxFileDialog(wxWindow
*parent
,
35 const wxString
& message
= wxFileSelectorPromptStr
,
36 const wxString
& defaultDir
= "",
37 const wxString
& defaultFile
= "",
38 const wxString
& wildCard
= wxFileSelectorDefaultWildcardStr
,
40 const wxPoint
& pos
= wxDefaultPosition
);
42 void SetMessage(const wxString
& message
) { m_message
= message
; }
43 void SetPath(const wxString
& path
);
44 void SetDirectory(const wxString
& dir
) { m_dir
= dir
; }
45 void SetFilename(const wxString
& name
) { m_fileName
= name
; }
46 void SetWildcard(const wxString
& wildCard
) { m_wildCard
= wildCard
; }
47 void SetStyle(long style
) { m_dialogStyle
= style
; }
48 void SetFilterIndex(int filterIndex
) { m_filterIndex
= filterIndex
; }
50 wxString
GetMessage() const { return m_message
; }
51 wxString
GetPath() const { return m_path
; }
52 wxString
GetDirectory() const { return m_dir
; }
53 wxString
GetFilename() const { return m_fileName
; }
54 wxString
GetWildcard() const { return m_wildCard
; }
55 long GetStyle() const { return m_dialogStyle
; }
56 int GetFilterIndex() const { return m_filterIndex
; }
64 wxString m_path
; // Full path
72 #define wxOVERWRITE_PROMPT 4
73 #define wxHIDE_READONLY 8
74 #define wxFILE_MUST_EXIST 16
76 // File selector - backward compatibility
78 wxFileSelector(const char *message
= wxFileSelectorPromptStr
,
79 const char *default_path
= NULL
,
80 const char *default_filename
= NULL
,
81 const char *default_extension
= NULL
,
82 const char *wildcard
= wxFileSelectorDefaultWildcardStr
,
84 wxWindow
*parent
= NULL
,
85 int x
= -1, int y
= -1);
87 // An extended version of wxFileSelector
89 wxFileSelectorEx(const char *message
= wxFileSelectorPromptStr
,
90 const char *default_path
= NULL
,
91 const char *default_filename
= NULL
,
92 int *indexDefaultExtension
= NULL
,
93 const char *wildcard
= wxFileSelectorDefaultWildcardStr
,
95 wxWindow
*parent
= NULL
,
96 int x
= -1, int y
= -1);
98 // Ask for filename to load
100 wxLoadFileSelector(const char *what
,
101 const char *extension
,
102 const char *default_name
= (const char *)NULL
,
103 wxWindow
*parent
= (wxWindow
*) NULL
);
105 // Ask for filename to save
107 wxSaveFileSelector(const char *what
,
108 const char *extension
,
109 const char *default_name
= (const char *) NULL
,
110 wxWindow
*parent
= (wxWindow
*) NULL
);