1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __GTKFILEDLGH__
13 #define __GTKFILEDLGH__
19 #include "wx/dialog.h"
21 //-------------------------------------------------------------------------
23 //-------------------------------------------------------------------------
25 extern const char *wxFileSelectorPromptStr
;
26 extern const char *wxFileSelectorDefaultWildcardStr
;
28 class wxFileDialog
: public wxDialog
31 DECLARE_DYNAMIC_CLASS(wxFileDialog
)
33 friend void gtk_filedialog_ok_callback( GtkWidget
*widget
, gpointer data
);
39 wxFileDialog(wxWindow
*parent
, const wxString
& message
= wxFileSelectorPromptStr
,
40 const wxString
& defaultDir
= "", const wxString
& defaultFile
= "",
41 const wxString
& wildCard
= wxFileSelectorDefaultWildcardStr
,
42 long style
= 0, const wxPoint
& pos
= wxDefaultPosition
);
44 inline void SetMessage(const wxString
& message
) { m_message
= message
; }
45 inline void SetPath(const wxString
& path
) { m_path
= path
; }
46 inline void SetDirectory(const wxString
& dir
) { m_dir
= dir
; }
47 inline void SetFilename(const wxString
& name
) { m_fileName
= name
; }
48 inline void SetWildcard(const wxString
& wildCard
) { m_wildCard
= wildCard
; }
49 inline void SetStyle(long style
) { m_dialogStyle
= style
; }
50 inline void SetFilterIndex(int filterIndex
) { m_filterIndex
= filterIndex
; }
52 inline wxString
GetMessage(void) const { return m_message
; }
53 inline wxString
GetPath(void) const { return m_path
; }
54 inline wxString
GetDirectory(void) const { return m_dir
; }
55 inline wxString
GetFilename(void) const { return m_fileName
; }
56 inline wxString
GetWildcard(void) const { return m_wildCard
; }
57 inline long GetStyle(void) const { return m_dialogStyle
; }
58 inline int GetFilterIndex(void) const { return m_filterIndex
; }
68 wxString m_path
; // Full path
76 #define wxOVERWRITE_PROMPT 4
77 #define wxHIDE_READONLY 8
78 #define wxFILE_MUST_EXIST 16
80 // File selector - backward compatibility
82 char* wxFileSelector(const char *message
= wxFileSelectorPromptStr
, const char *default_path
= (const char *) NULL
,
83 const char *default_filename
= (const char *) NULL
, const char *default_extension
= (const char *) NULL
,
84 const char *wildcard
= wxFileSelectorDefaultWildcardStr
, int flags
= 0,
85 wxWindow
*parent
= (wxWindow
*) NULL
, int x
= -1, int y
= -1);
87 char* wxLoadFileSelector(const char *what
, const char *extension
, const char *default_name
= (const char *) NULL
,
88 wxWindow
*parent
= (wxWindow
*) NULL
);
90 char* wxSaveFileSelector(const char *what
, const char *extension
, const char *default_name
= (const char *) NULL
,
91 wxWindow
*parent
= (wxWindow
*) NULL
);