]>
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 |
a81258be | 5 | // Id: $Id$ |
f8bc53eb | 6 | // Copyright: (c) 1998 Robert Roebling, 2004 Zbigniew Zagorski, 2005 Mart Raudsepp |
65571936 | 7 | // Licence: wxWindows licence |
c801d85f KB |
8 | ///////////////////////////////////////////////////////////////////////////// |
9 | ||
14f355c2 VS |
10 | // For compilers that support precompilation, includes "wx.h". |
11 | #include "wx/wxprec.h" | |
12 | ||
4e1901b7 | 13 | #if wxUSE_FILEDLG |
9755e73b | 14 | |
c801d85f | 15 | #include "wx/filedlg.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 | { | |
3cbab641 | 52 | return wxGenericFileDialog::ShowModal(); |
4e1901b7 RR |
53 | } |
54 | ||
55 | bool wxFileDialog::Show( bool show ) | |
56 | { | |
3cbab641 | 57 | return wxGenericFileDialog::Show( show ); |
9755e73b | 58 | } |
0e1399b3 | 59 | |
5b2e23bf RR |
60 | void wxFileDialog::DoSetSize(int x, int y, int width, int height, int sizeFlags ) |
61 | { | |
62 | if (!m_wxwindow) | |
63 | return; | |
64 | else | |
65 | wxGenericFileDialog::DoSetSize( x, y, width, height, sizeFlags ); | |
66 | } | |
67 | ||
f8bc53eb JS |
68 | wxString wxFileDialog::GetPath() const |
69 | { | |
3cbab641 | 70 | return wxGenericFileDialog::GetPath(); |
f8bc53eb JS |
71 | } |
72 | ||
27b2dd53 | 73 | void wxFileDialog::GetFilenames(wxArrayString& files) const |
9755e73b | 74 | { |
3cbab641 | 75 | wxGenericFileDialog::GetFilenames( files ); |
9755e73b | 76 | } |
76840ed0 | 77 | |
27b2dd53 | 78 | void wxFileDialog::GetPaths(wxArrayString& paths) const |
9755e73b | 79 | { |
3cbab641 | 80 | wxGenericFileDialog::GetPaths( paths ); |
9755e73b | 81 | } |
035b704a | 82 | |
9755e73b VS |
83 | void wxFileDialog::SetMessage(const wxString& message) |
84 | { | |
3cbab641 | 85 | wxGenericFileDialog::SetMessage( message ); |
9755e73b VS |
86 | } |
87 | ||
76840ed0 RR |
88 | void wxFileDialog::SetPath(const wxString& path) |
89 | { | |
3cbab641 | 90 | wxGenericFileDialog::SetPath( path ); |
76840ed0 RR |
91 | } |
92 | ||
9755e73b VS |
93 | void wxFileDialog::SetDirectory(const wxString& dir) |
94 | { | |
3cbab641 | 95 | wxGenericFileDialog::SetDirectory( dir ); |
9755e73b VS |
96 | } |
97 | ||
f8bc53eb JS |
98 | wxString wxFileDialog::GetDirectory() const |
99 | { | |
3cbab641 | 100 | return wxGenericFileDialog::GetDirectory(); |
f8bc53eb JS |
101 | } |
102 | ||
9755e73b VS |
103 | void wxFileDialog::SetFilename(const wxString& name) |
104 | { | |
3cbab641 MR |
105 | |
106 | wxGenericFileDialog::SetFilename( name ); | |
9755e73b | 107 | } |
035b704a | 108 | |
f8bc53eb JS |
109 | wxString wxFileDialog::GetFilename() const |
110 | { | |
3cbab641 | 111 | return wxGenericFileDialog::GetFilename(); |
f8bc53eb JS |
112 | } |
113 | ||
9755e73b VS |
114 | void wxFileDialog::SetWildcard(const wxString& wildCard) |
115 | { | |
3cbab641 | 116 | wxGenericFileDialog::SetWildcard( wildCard ); |
9755e73b | 117 | } |
a3622daa | 118 | |
9755e73b VS |
119 | void wxFileDialog::SetFilterIndex(int filterIndex) |
120 | { | |
3cbab641 | 121 | wxGenericFileDialog::SetFilterIndex( filterIndex ); |
4e1901b7 RR |
122 | } |
123 | ||
f8bc53eb | 124 | int wxFileDialog::GetFilterIndex() const |
4e1901b7 | 125 | { |
3cbab641 | 126 | return wxGenericFileDialog::GetFilterIndex(); |
9755e73b | 127 | } |
3f6638b8 | 128 | |
4e1901b7 | 129 | #endif // wxUSE_FILEDLG |