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