]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/gtk1/filedlg.cpp
fix building with WXWIN_COMPATIBILITY_2_8 == 0
[wxWidgets.git] / src / gtk1 / filedlg.cpp
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: src/gtk1/filedlg.cpp
3// Purpose: native implementation of wxFileDialog
4// Author: Robert Roebling, Zbigniew Zagorski, Mart Raudsepp
5// Copyright: (c) 1998 Robert Roebling, 2004 Zbigniew Zagorski, 2005 Mart Raudsepp
6// Licence: wxWindows licence
7/////////////////////////////////////////////////////////////////////////////
8
9// For compilers that support precompilation, includes "wx.h".
10#include "wx/wxprec.h"
11
12#if wxUSE_FILEDLG
13
14#include "wx/filedlg.h"
15#include "wx/modalhook.h"
16
17
18//-----------------------------------------------------------------------------
19// wxFileDialog
20//-----------------------------------------------------------------------------
21
22IMPLEMENT_DYNAMIC_CLASS(wxFileDialog,wxGenericFileDialog)
23
24BEGIN_EVENT_TABLE(wxFileDialog,wxGenericFileDialog)
25 EVT_BUTTON(wxID_OK, wxFileDialog::OnFakeOk)
26END_EVENT_TABLE()
27
28wxFileDialog::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
41wxFileDialog::~wxFileDialog()
42{
43}
44
45void wxFileDialog::OnFakeOk( wxCommandEvent &event )
46{
47 wxGenericFileDialog::OnOk( event );
48}
49
50int wxFileDialog::ShowModal()
51{
52 WX_HOOK_MODAL_DIALOG();
53
54 return wxGenericFileDialog::ShowModal();
55}
56
57bool wxFileDialog::Show( bool show )
58{
59 return wxGenericFileDialog::Show( show );
60}
61
62void wxFileDialog::DoSetSize(int x, int y, int width, int height, int sizeFlags )
63{
64 if (!m_wxwindow)
65 return;
66 else
67 wxGenericFileDialog::DoSetSize( x, y, width, height, sizeFlags );
68}
69
70wxString wxFileDialog::GetPath() const
71{
72 return wxGenericFileDialog::GetPath();
73}
74
75void wxFileDialog::GetFilenames(wxArrayString& files) const
76{
77 wxGenericFileDialog::GetFilenames( files );
78}
79
80void wxFileDialog::GetPaths(wxArrayString& paths) const
81{
82 wxGenericFileDialog::GetPaths( paths );
83}
84
85void wxFileDialog::SetMessage(const wxString& message)
86{
87 wxGenericFileDialog::SetMessage( message );
88}
89
90void wxFileDialog::SetPath(const wxString& path)
91{
92 wxGenericFileDialog::SetPath( path );
93}
94
95void wxFileDialog::SetDirectory(const wxString& dir)
96{
97 wxGenericFileDialog::SetDirectory( dir );
98}
99
100wxString wxFileDialog::GetDirectory() const
101{
102 return wxGenericFileDialog::GetDirectory();
103}
104
105void wxFileDialog::SetFilename(const wxString& name)
106{
107
108 wxGenericFileDialog::SetFilename( name );
109}
110
111wxString wxFileDialog::GetFilename() const
112{
113 return wxGenericFileDialog::GetFilename();
114}
115
116void wxFileDialog::SetWildcard(const wxString& wildCard)
117{
118 wxGenericFileDialog::SetWildcard( wildCard );
119}
120
121void wxFileDialog::SetFilterIndex(int filterIndex)
122{
123 wxGenericFileDialog::SetFilterIndex( filterIndex );
124}
125
126int wxFileDialog::GetFilterIndex() const
127{
128 return wxGenericFileDialog::GetFilterIndex();
129}
130
131#endif // wxUSE_FILEDLG