1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/filedlg.h
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_GTKFILEDLG_H_
11 #define _WX_GTKFILEDLG_H_
13 #include "wx/gtk/filectrl.h" // for wxGtkFileChooser
15 //-------------------------------------------------------------------------
17 //-------------------------------------------------------------------------
19 class WXDLLIMPEXP_CORE wxFileDialog
: public wxFileDialogBase
24 wxFileDialog(wxWindow
*parent
,
25 const wxString
& message
= wxFileSelectorPromptStr
,
26 const wxString
& defaultDir
= wxEmptyString
,
27 const wxString
& defaultFile
= wxEmptyString
,
28 const wxString
& wildCard
= wxFileSelectorDefaultWildcardStr
,
29 long style
= wxFD_DEFAULT_STYLE
,
30 const wxPoint
& pos
= wxDefaultPosition
,
31 const wxSize
& sz
= wxDefaultSize
,
32 const wxString
& name
= wxFileDialogNameStr
);
33 bool Create(wxWindow
*parent
,
34 const wxString
& message
= wxFileSelectorPromptStr
,
35 const wxString
& defaultDir
= wxEmptyString
,
36 const wxString
& defaultFile
= wxEmptyString
,
37 const wxString
& wildCard
= wxFileSelectorDefaultWildcardStr
,
38 long style
= wxFD_DEFAULT_STYLE
,
39 const wxPoint
& pos
= wxDefaultPosition
,
40 const wxSize
& sz
= wxDefaultSize
,
41 const wxString
& name
= wxFileDialogNameStr
);
42 virtual ~wxFileDialog();
44 virtual wxString
GetPath() const;
45 virtual void GetPaths(wxArrayString
& paths
) const;
46 virtual wxString
GetFilename() const;
47 virtual void GetFilenames(wxArrayString
& files
) const;
48 virtual int GetFilterIndex() const;
50 virtual void SetMessage(const wxString
& message
);
51 virtual void SetPath(const wxString
& path
);
52 virtual void SetDirectory(const wxString
& dir
);
53 virtual void SetFilename(const wxString
& name
);
54 virtual void SetWildcard(const wxString
& wildCard
);
55 virtual void SetFilterIndex(int filterIndex
);
57 virtual int ShowModal();
59 virtual bool SupportsExtraControl() const { return true; }
61 // Implementation only.
62 void GTKSelectionChanged(const wxString
& filename
);
66 // override this from wxTLW since the native
67 // form doesn't have any m_wxwindow
68 virtual void DoSetSize(int x
, int y
,
69 int width
, int height
,
70 int sizeFlags
= wxSIZE_AUTO
);
74 void OnFakeOk( wxCommandEvent
&event
);
75 void OnSize(wxSizeEvent
&);
76 virtual void AddChildGTK(wxWindowGTK
* child
);
78 wxGtkFileChooser m_fc
;
80 DECLARE_DYNAMIC_CLASS(wxFileDialog
)
84 #endif // _WX_GTKFILEDLG_H_