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
30 DECLARE_DYNAMIC_CLASS(wxFileDialog
)
32 friend void gtk_filedialog_ok_callback( GtkWidget
*widget
, gpointer data
);
38 wxFileDialog(wxWindow
*parent
, const wxString
& message
= wxFileSelectorPromptStr
,
39 const wxString
& defaultDir
= "", const wxString
& defaultFile
= "",
40 const wxString
& wildCard
= wxFileSelectorDefaultWildcardStr
,
41 long style
= 0, const wxPoint
& pos
= wxDefaultPosition
);
43 inline void SetMessage(const wxString
& message
) { m_message
= message
; }
44 inline void SetPath(const wxString
& path
) { m_path
= path
; }
45 inline void SetDirectory(const wxString
& dir
) { m_dir
= dir
; }
46 inline void SetFilename(const wxString
& name
) { m_fileName
= name
; }
47 inline void SetWildcard(const wxString
& wildCard
) { m_wildCard
= wildCard
; }
48 inline void SetStyle(long style
) { m_dialogStyle
= style
; }
49 inline void SetFilterIndex(int filterIndex
) { m_filterIndex
= filterIndex
; }
51 inline wxString
GetMessage(void) const { return m_message
; }
52 inline wxString
GetPath(void) const { return m_path
; }
53 inline wxString
GetDirectory(void) const { return m_dir
; }
54 inline wxString
GetFilename(void) const { return m_fileName
; }
55 inline wxString
GetWildcard(void) const { return m_wildCard
; }
56 inline long GetStyle(void) const { return m_dialogStyle
; }
57 inline int GetFilterIndex(void) const { return m_filterIndex
; }
67 wxString m_path
; // Full path
75 #define wxOVERWRITE_PROMPT 4
76 #define wxHIDE_READONLY 8
77 #define wxFILE_MUST_EXIST 16
79 // File selector - backward compatibility
81 wxFileSelector(const char *message
= wxFileSelectorPromptStr
,
82 const char *default_path
= NULL
,
83 const char *default_filename
= NULL
,
84 const char *default_extension
= NULL
,
85 const char *wildcard
= wxFileSelectorDefaultWildcardStr
,
87 wxWindow
*parent
= NULL
,
88 int x
= -1, int y
= -1);
90 // An extended version of wxFileSelector
92 wxFileSelectorEx(const char *message
= wxFileSelectorPromptStr
,
93 const char *default_path
= NULL
,
94 const char *default_filename
= NULL
,
95 int *indexDefaultExtension
= NULL
,
96 const char *wildcard
= wxFileSelectorDefaultWildcardStr
,
98 wxWindow
*parent
= NULL
,
99 int x
= -1, int y
= -1);
101 // Ask for filename to load
103 wxLoadFileSelector(const char *what
,
104 const char *extension
,
105 const char *default_name
= (const char *)NULL
,
106 wxWindow
*parent
= (wxWindow
*) NULL
);
108 // Ask for filename to save
110 wxSaveFileSelector(const char *what
,
111 const char *extension
,
112 const char *default_name
= (const char *) NULL
,
113 wxWindow
*parent
= (wxWindow
*) NULL
);