]> git.saurik.com Git - wxWidgets.git/blob - src/gtk1/filedlg.cpp
Tweaks for demos on MacOSX
[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 : wxGenericFileDialog(parent, message, defaultDir, defaultFileName,
34 wildCard, style, pos, true )
35 {
36 wxGenericFileDialog::Create( parent, message, defaultDir, defaultFileName, wildCard, style, pos );
37 }
38
39 wxFileDialog::~wxFileDialog()
40 {
41 }
42
43 void wxFileDialog::OnFakeOk( wxCommandEvent &event )
44 {
45 wxGenericFileDialog::OnListOk( event );
46 }
47
48 int wxFileDialog::ShowModal()
49 {
50 return wxGenericFileDialog::ShowModal();
51 }
52
53 bool wxFileDialog::Show( bool show )
54 {
55 return wxGenericFileDialog::Show( show );
56 }
57
58 void wxFileDialog::DoSetSize(int x, int y, int width, int height, int sizeFlags )
59 {
60 if (!m_wxwindow)
61 return;
62 else
63 wxGenericFileDialog::DoSetSize( x, y, width, height, sizeFlags );
64 }
65
66 wxString wxFileDialog::GetPath() const
67 {
68 return wxGenericFileDialog::GetPath();
69 }
70
71 void wxFileDialog::GetFilenames(wxArrayString& files) const
72 {
73 wxGenericFileDialog::GetFilenames( files );
74 }
75
76 void wxFileDialog::GetPaths(wxArrayString& paths) const
77 {
78 wxGenericFileDialog::GetPaths( paths );
79 }
80
81 void wxFileDialog::SetMessage(const wxString& message)
82 {
83 wxGenericFileDialog::SetMessage( message );
84 }
85
86 void wxFileDialog::SetPath(const wxString& path)
87 {
88 wxGenericFileDialog::SetPath( path );
89 }
90
91 void wxFileDialog::SetDirectory(const wxString& dir)
92 {
93 wxGenericFileDialog::SetDirectory( dir );
94 }
95
96 wxString wxFileDialog::GetDirectory() const
97 {
98 return wxGenericFileDialog::GetDirectory();
99 }
100
101 void wxFileDialog::SetFilename(const wxString& name)
102 {
103
104 wxGenericFileDialog::SetFilename( name );
105 }
106
107 wxString wxFileDialog::GetFilename() const
108 {
109 return wxGenericFileDialog::GetFilename();
110 }
111
112 void wxFileDialog::SetWildcard(const wxString& wildCard)
113 {
114 wxGenericFileDialog::SetWildcard( wildCard );
115 }
116
117 void wxFileDialog::SetFilterIndex(int filterIndex)
118 {
119 wxGenericFileDialog::SetFilterIndex( filterIndex );
120 }
121
122 int wxFileDialog::GetFilterIndex() const
123 {
124 return wxGenericFileDialog::GetFilterIndex();
125 }
126
127 #endif // wxUSE_FILEDLG