]>
git.saurik.com Git - wxWidgets.git/blob - 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 // Copyright: (c) 1998 Robert Roebling, 2004 Zbigniew Zagorski, 2005 Mart Raudsepp
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
9 // For compilers that support precompilation, includes "wx.h".
10 #include "wx/wxprec.h"
14 #include "wx/filedlg.h"
15 #include "wx/modalhook.h"
18 //-----------------------------------------------------------------------------
20 //-----------------------------------------------------------------------------
22 IMPLEMENT_DYNAMIC_CLASS(wxFileDialog
,wxGenericFileDialog
)
24 BEGIN_EVENT_TABLE(wxFileDialog
,wxGenericFileDialog
)
25 EVT_BUTTON(wxID_OK
, wxFileDialog::OnFakeOk
)
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
,
35 : wxGenericFileDialog(parent
, message
, defaultDir
, defaultFileName
,
36 wildCard
, style
, pos
, sz
, name
, true )
38 wxGenericFileDialog::Create( parent
, message
, defaultDir
, defaultFileName
, wildCard
, style
, pos
, sz
, name
);
41 wxFileDialog::~wxFileDialog()
45 void wxFileDialog::OnFakeOk( wxCommandEvent
&event
)
47 wxGenericFileDialog::OnOk( event
);
50 int wxFileDialog::ShowModal()
52 WX_HOOK_MODAL_DIALOG();
54 return wxGenericFileDialog::ShowModal();
57 bool wxFileDialog::Show( bool show
)
59 return wxGenericFileDialog::Show( show
);
62 void wxFileDialog::DoSetSize(int x
, int y
, int width
, int height
, int sizeFlags
)
67 wxGenericFileDialog::DoSetSize( x
, y
, width
, height
, sizeFlags
);
70 wxString
wxFileDialog::GetPath() const
72 return wxGenericFileDialog::GetPath();
75 void wxFileDialog::GetFilenames(wxArrayString
& files
) const
77 wxGenericFileDialog::GetFilenames( files
);
80 void wxFileDialog::GetPaths(wxArrayString
& paths
) const
82 wxGenericFileDialog::GetPaths( paths
);
85 void wxFileDialog::SetMessage(const wxString
& message
)
87 wxGenericFileDialog::SetMessage( message
);
90 void wxFileDialog::SetPath(const wxString
& path
)
92 wxGenericFileDialog::SetPath( path
);
95 void wxFileDialog::SetDirectory(const wxString
& dir
)
97 wxGenericFileDialog::SetDirectory( dir
);
100 wxString
wxFileDialog::GetDirectory() const
102 return wxGenericFileDialog::GetDirectory();
105 void wxFileDialog::SetFilename(const wxString
& name
)
108 wxGenericFileDialog::SetFilename( name
);
111 wxString
wxFileDialog::GetFilename() const
113 return wxGenericFileDialog::GetFilename();
116 void wxFileDialog::SetWildcard(const wxString
& wildCard
)
118 wxGenericFileDialog::SetWildcard( wildCard
);
121 void wxFileDialog::SetFilterIndex(int filterIndex
)
123 wxGenericFileDialog::SetFilterIndex( filterIndex
);
126 int wxFileDialog::GetFilterIndex() const
128 return wxGenericFileDialog::GetFilterIndex();
131 #endif // wxUSE_FILEDLG