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