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