Remove GTK2 stuff from src/gtk1. Rename wx/gtk includes to wx/gtk1.
[wxWidgets.git] / src / gtk1 / filedlg.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: gtk/filedlg.cpp
3 // Purpose: native implementation of wxFileDialog
4 // Author: Robert Roebling, Zbigniew Zagorski, Mart Raudsepp
5 // Id: $Id$
6 // Copyright: (c) 1998 Robert Roebling, 2004 Zbigniew Zagorski, 2005 Mart Raudsepp
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 // For compilers that support precompilation, includes "wx.h".
11 #include "wx/wxprec.h"
12
13 // Include setup.h to get wxUSE flags for compilers that do not support precompilation of headers
14 #include "wx/setup.h"
15
16 #if wxUSE_FILEDLG
17
18 #include "wx/filedlg.h"
19
20
21 //-----------------------------------------------------------------------------
22 // wxFileDialog
23 //-----------------------------------------------------------------------------
24
25 IMPLEMENT_DYNAMIC_CLASS(wxFileDialog,wxGenericFileDialog)
26
27 BEGIN_EVENT_TABLE(wxFileDialog,wxGenericFileDialog)
28 EVT_BUTTON(wxID_OK, wxFileDialog::OnFakeOk)
29 END_EVENT_TABLE()
30
31 wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
32 const wxString& defaultDir,
33 const wxString& defaultFileName,
34 const wxString& wildCard,
35 long style, const wxPoint& pos)
36 : wxGenericFileDialog(parent, message, defaultDir, defaultFileName,
37 wildCard, style, pos, true )
38 {
39 wxGenericFileDialog::Create( parent, message, defaultDir, defaultFileName, wildCard, style, pos );
40 }
41
42 wxFileDialog::~wxFileDialog()
43 {
44 }
45
46 void wxFileDialog::OnFakeOk( wxCommandEvent &event )
47 {
48 wxGenericFileDialog::OnListOk( event );
49 }
50
51 int wxFileDialog::ShowModal()
52 {
53 return wxGenericFileDialog::ShowModal();
54 }
55
56 bool wxFileDialog::Show( bool show )
57 {
58 return wxGenericFileDialog::Show( show );
59 }
60
61 void wxFileDialog::DoSetSize(int x, int y, int width, int height, int sizeFlags )
62 {
63 if (!m_wxwindow)
64 return;
65 else
66 wxGenericFileDialog::DoSetSize( x, y, width, height, sizeFlags );
67 }
68
69 wxString wxFileDialog::GetPath() const
70 {
71 return wxGenericFileDialog::GetPath();
72 }
73
74 void wxFileDialog::GetFilenames(wxArrayString& files) const
75 {
76 wxGenericFileDialog::GetFilenames( files );
77 }
78
79 void wxFileDialog::GetPaths(wxArrayString& paths) const
80 {
81 wxGenericFileDialog::GetPaths( paths );
82 }
83
84 void wxFileDialog::SetMessage(const wxString& message)
85 {
86 wxGenericFileDialog::SetMessage( message );
87 }
88
89 void wxFileDialog::SetPath(const wxString& path)
90 {
91 wxGenericFileDialog::SetPath( path );
92 }
93
94 void wxFileDialog::SetDirectory(const wxString& dir)
95 {
96 wxGenericFileDialog::SetDirectory( dir );
97 }
98
99 wxString wxFileDialog::GetDirectory() const
100 {
101 return wxGenericFileDialog::GetDirectory();
102 }
103
104 void wxFileDialog::SetFilename(const wxString& name)
105 {
106
107 wxGenericFileDialog::SetFilename( name );
108 }
109
110 wxString wxFileDialog::GetFilename() const
111 {
112 return wxGenericFileDialog::GetFilename();
113 }
114
115 void wxFileDialog::SetWildcard(const wxString& wildCard)
116 {
117 wxGenericFileDialog::SetWildcard( wildCard );
118 }
119
120 void wxFileDialog::SetFilterIndex(int filterIndex)
121 {
122 wxGenericFileDialog::SetFilterIndex( filterIndex );
123 }
124
125 int wxFileDialog::GetFilterIndex() const
126 {
127 return wxGenericFileDialog::GetFilterIndex();
128 }
129
130 #endif // wxUSE_FILEDLG