File/dir dialog styles and other changes (patch 1488371):
[wxWidgets.git] / src / gtk1 / filedlg.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/gtk1/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 #if wxUSE_FILEDLG
14
15 #include "wx/filedlg.h"
16
17
18 //-----------------------------------------------------------------------------
19 // wxFileDialog
20 //-----------------------------------------------------------------------------
21
22 IMPLEMENT_DYNAMIC_CLASS(wxFileDialog,wxGenericFileDialog)
23
24 BEGIN_EVENT_TABLE(wxFileDialog,wxGenericFileDialog)
25 EVT_BUTTON(wxID_OK, wxFileDialog::OnFakeOk)
26 END_EVENT_TABLE()
27
28 wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
29 const wxString& defaultDir,
30 const wxString& defaultFileName,
31 const wxString& wildCard,
32 long style, const wxPoint& pos,
33 const wxSize& sz,
34 const wxString& name)
35 : wxGenericFileDialog(parent, message, defaultDir, defaultFileName,
36 wildCard, style, pos, sz, name, true )
37 {
38 wxGenericFileDialog::Create( parent, message, defaultDir, defaultFileName, wildCard, style, pos, sz, name );
39 }
40
41 wxFileDialog::~wxFileDialog()
42 {
43 }
44
45 void wxFileDialog::OnFakeOk( wxCommandEvent &event )
46 {
47 wxGenericFileDialog::OnListOk( event );
48 }
49
50 int wxFileDialog::ShowModal()
51 {
52 return wxGenericFileDialog::ShowModal();
53 }
54
55 bool wxFileDialog::Show( bool show )
56 {
57 return wxGenericFileDialog::Show( show );
58 }
59
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
68 wxString wxFileDialog::GetPath() const
69 {
70 return wxGenericFileDialog::GetPath();
71 }
72
73 void wxFileDialog::GetFilenames(wxArrayString& files) const
74 {
75 wxGenericFileDialog::GetFilenames( files );
76 }
77
78 void wxFileDialog::GetPaths(wxArrayString& paths) const
79 {
80 wxGenericFileDialog::GetPaths( paths );
81 }
82
83 void wxFileDialog::SetMessage(const wxString& message)
84 {
85 wxGenericFileDialog::SetMessage( message );
86 }
87
88 void wxFileDialog::SetPath(const wxString& path)
89 {
90 wxGenericFileDialog::SetPath( path );
91 }
92
93 void wxFileDialog::SetDirectory(const wxString& dir)
94 {
95 wxGenericFileDialog::SetDirectory( dir );
96 }
97
98 wxString wxFileDialog::GetDirectory() const
99 {
100 return wxGenericFileDialog::GetDirectory();
101 }
102
103 void wxFileDialog::SetFilename(const wxString& name)
104 {
105
106 wxGenericFileDialog::SetFilename( name );
107 }
108
109 wxString wxFileDialog::GetFilename() const
110 {
111 return wxGenericFileDialog::GetFilename();
112 }
113
114 void wxFileDialog::SetWildcard(const wxString& wildCard)
115 {
116 wxGenericFileDialog::SetWildcard( wildCard );
117 }
118
119 void wxFileDialog::SetFilterIndex(int filterIndex)
120 {
121 wxGenericFileDialog::SetFilterIndex( filterIndex );
122 }
123
124 int wxFileDialog::GetFilterIndex() const
125 {
126 return wxGenericFileDialog::GetFilterIndex();
127 }
128
129 #endif // wxUSE_FILEDLG