]>
Commit | Line | Data |
---|---|---|
c801d85f | 1 | ///////////////////////////////////////////////////////////////////////////// |
9b5f1895 | 2 | // Name: src/gtk1/filedlg.cpp |
9755e73b | 3 | // Purpose: native implementation of wxFileDialog |
f8bc53eb | 4 | // Author: Robert Roebling, Zbigniew Zagorski, Mart Raudsepp |
f8bc53eb | 5 | // Copyright: (c) 1998 Robert Roebling, 2004 Zbigniew Zagorski, 2005 Mart Raudsepp |
65571936 | 6 | // Licence: wxWindows licence |
c801d85f KB |
7 | ///////////////////////////////////////////////////////////////////////////// |
8 | ||
14f355c2 VS |
9 | // For compilers that support precompilation, includes "wx.h". |
10 | #include "wx/wxprec.h" | |
11 | ||
4e1901b7 | 12 | #if wxUSE_FILEDLG |
9755e73b | 13 | |
c801d85f | 14 | #include "wx/filedlg.h" |
691745ab | 15 | #include "wx/modalhook.h" |
4e1901b7 | 16 | |
c801d85f | 17 | |
291a8f20 RR |
18 | //----------------------------------------------------------------------------- |
19 | // wxFileDialog | |
20 | //----------------------------------------------------------------------------- | |
21 | ||
4e1901b7 RR |
22 | IMPLEMENT_DYNAMIC_CLASS(wxFileDialog,wxGenericFileDialog) |
23 | ||
24 | BEGIN_EVENT_TABLE(wxFileDialog,wxGenericFileDialog) | |
f8bc53eb | 25 | EVT_BUTTON(wxID_OK, wxFileDialog::OnFakeOk) |
4e1901b7 | 26 | END_EVENT_TABLE() |
c801d85f | 27 | |
9755e73b VS |
28 | wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message, |
29 | const wxString& defaultDir, | |
30 | const wxString& defaultFileName, | |
31 | const wxString& wildCard, | |
ff3e84ff VZ |
32 | long style, const wxPoint& pos, |
33 | const wxSize& sz, | |
34 | const wxString& name) | |
4e1901b7 | 35 | : wxGenericFileDialog(parent, message, defaultDir, defaultFileName, |
ff3e84ff | 36 | wildCard, style, pos, sz, name, true ) |
c801d85f | 37 | { |
ff3e84ff | 38 | wxGenericFileDialog::Create( parent, message, defaultDir, defaultFileName, wildCard, style, pos, sz, name ); |
9755e73b | 39 | } |
0e1399b3 | 40 | |
76840ed0 | 41 | wxFileDialog::~wxFileDialog() |
9755e73b | 42 | { |
4e1901b7 RR |
43 | } |
44 | ||
45 | void wxFileDialog::OnFakeOk( wxCommandEvent &event ) | |
46 | { | |
0cf3e587 | 47 | wxGenericFileDialog::OnOk( event ); |
4e1901b7 RR |
48 | } |
49 | ||
50 | int wxFileDialog::ShowModal() | |
51 | { | |
691745ab | 52 | WX_HOOK_MODAL_DIALOG(); |
643e9cf9 | 53 | |
3cbab641 | 54 | return wxGenericFileDialog::ShowModal(); |
4e1901b7 RR |
55 | } |
56 | ||
57 | bool wxFileDialog::Show( bool show ) | |
58 | { | |
3cbab641 | 59 | return wxGenericFileDialog::Show( show ); |
9755e73b | 60 | } |
0e1399b3 | 61 | |
5b2e23bf RR |
62 | void wxFileDialog::DoSetSize(int x, int y, int width, int height, int sizeFlags ) |
63 | { | |
64 | if (!m_wxwindow) | |
65 | return; | |
66 | else | |
67 | wxGenericFileDialog::DoSetSize( x, y, width, height, sizeFlags ); | |
68 | } | |
69 | ||
f8bc53eb JS |
70 | wxString wxFileDialog::GetPath() const |
71 | { | |
3cbab641 | 72 | return wxGenericFileDialog::GetPath(); |
f8bc53eb JS |
73 | } |
74 | ||
27b2dd53 | 75 | void wxFileDialog::GetFilenames(wxArrayString& files) const |
9755e73b | 76 | { |
3cbab641 | 77 | wxGenericFileDialog::GetFilenames( files ); |
9755e73b | 78 | } |
76840ed0 | 79 | |
27b2dd53 | 80 | void wxFileDialog::GetPaths(wxArrayString& paths) const |
9755e73b | 81 | { |
3cbab641 | 82 | wxGenericFileDialog::GetPaths( paths ); |
9755e73b | 83 | } |
035b704a | 84 | |
9755e73b VS |
85 | void wxFileDialog::SetMessage(const wxString& message) |
86 | { | |
3cbab641 | 87 | wxGenericFileDialog::SetMessage( message ); |
9755e73b VS |
88 | } |
89 | ||
76840ed0 RR |
90 | void wxFileDialog::SetPath(const wxString& path) |
91 | { | |
3cbab641 | 92 | wxGenericFileDialog::SetPath( path ); |
76840ed0 RR |
93 | } |
94 | ||
9755e73b VS |
95 | void wxFileDialog::SetDirectory(const wxString& dir) |
96 | { | |
3cbab641 | 97 | wxGenericFileDialog::SetDirectory( dir ); |
9755e73b VS |
98 | } |
99 | ||
f8bc53eb JS |
100 | wxString wxFileDialog::GetDirectory() const |
101 | { | |
3cbab641 | 102 | return wxGenericFileDialog::GetDirectory(); |
f8bc53eb JS |
103 | } |
104 | ||
9755e73b VS |
105 | void wxFileDialog::SetFilename(const wxString& name) |
106 | { | |
3cbab641 MR |
107 | |
108 | wxGenericFileDialog::SetFilename( name ); | |
9755e73b | 109 | } |
035b704a | 110 | |
f8bc53eb JS |
111 | wxString wxFileDialog::GetFilename() const |
112 | { | |
3cbab641 | 113 | return wxGenericFileDialog::GetFilename(); |
f8bc53eb JS |
114 | } |
115 | ||
9755e73b VS |
116 | void wxFileDialog::SetWildcard(const wxString& wildCard) |
117 | { | |
3cbab641 | 118 | wxGenericFileDialog::SetWildcard( wildCard ); |
9755e73b | 119 | } |
a3622daa | 120 | |
9755e73b VS |
121 | void wxFileDialog::SetFilterIndex(int filterIndex) |
122 | { | |
3cbab641 | 123 | wxGenericFileDialog::SetFilterIndex( filterIndex ); |
4e1901b7 RR |
124 | } |
125 | ||
f8bc53eb | 126 | int wxFileDialog::GetFilterIndex() const |
4e1901b7 | 127 | { |
3cbab641 | 128 | return wxGenericFileDialog::GetFilterIndex(); |
9755e73b | 129 | } |
3f6638b8 | 130 | |
4e1901b7 | 131 | #endif // wxUSE_FILEDLG |