]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/filedlg.h
Reset sorting column in generic wxDataViewCtrl properly.
[wxWidgets.git] / include / wx / gtk / filedlg.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/filedlg.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Id: $Id$
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifndef _WX_GTKFILEDLG_H_
11 #define _WX_GTKFILEDLG_H_
12
13 #include "wx/gtk/filectrl.h" // for wxGtkFileChooser
14
15 //-------------------------------------------------------------------------
16 // wxFileDialog
17 //-------------------------------------------------------------------------
18
19 class WXDLLIMPEXP_CORE wxFileDialog: public wxFileDialogBase
20 {
21 public:
22 wxFileDialog() { }
23
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();
43
44 virtual wxString GetPath() const;
45 virtual void GetPaths(wxArrayString& paths) const;
46 virtual wxString GetDirectory() const;
47 virtual wxString GetFilename() const;
48 virtual void GetFilenames(wxArrayString& files) const;
49 virtual int GetFilterIndex() const;
50
51 virtual void SetMessage(const wxString& message);
52 virtual void SetPath(const wxString& path);
53 virtual void SetDirectory(const wxString& dir);
54 virtual void SetFilename(const wxString& name);
55 virtual void SetWildcard(const wxString& wildCard);
56 virtual void SetFilterIndex(int filterIndex);
57
58 virtual int ShowModal();
59
60 virtual bool SupportsExtraControl() const { return true; }
61
62 // Implementation only.
63 void GTKOnAccept();
64 void GTKOnCancel();
65
66 protected:
67 // override this from wxTLW since the native
68 // form doesn't have any m_wxwindow
69 virtual void DoSetSize(int x, int y,
70 int width, int height,
71 int sizeFlags = wxSIZE_AUTO);
72
73
74 private:
75 void OnSize(wxSizeEvent&);
76 virtual void AddChildGTK(wxWindowGTK* child);
77
78 wxString m_selectedDirectory;
79 wxGtkFileChooser m_fc;
80
81 DECLARE_DYNAMIC_CLASS(wxFileDialog)
82 DECLARE_EVENT_TABLE()
83 };
84
85 #endif // _WX_GTKFILEDLG_H_