]> git.saurik.com Git - wxWidgets.git/blob - src/gtk1/filedlg.cpp
Deallocate wxThreadSpecificInfo when wxThread ends.
[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 // 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
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::OnOk( event );
48 }
49
50 int wxFileDialog::ShowModal()
51 {
52 WX_HOOK_MODAL_DIALOG();
53
54 return wxGenericFileDialog::ShowModal();
55 }
56
57 bool wxFileDialog::Show( bool show )
58 {
59 return wxGenericFileDialog::Show( show );
60 }
61
62 void 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
70 wxString wxFileDialog::GetPath() const
71 {
72 return wxGenericFileDialog::GetPath();
73 }
74
75 void wxFileDialog::GetFilenames(wxArrayString& files) const
76 {
77 wxGenericFileDialog::GetFilenames( files );
78 }
79
80 void wxFileDialog::GetPaths(wxArrayString& paths) const
81 {
82 wxGenericFileDialog::GetPaths( paths );
83 }
84
85 void wxFileDialog::SetMessage(const wxString& message)
86 {
87 wxGenericFileDialog::SetMessage( message );
88 }
89
90 void wxFileDialog::SetPath(const wxString& path)
91 {
92 wxGenericFileDialog::SetPath( path );
93 }
94
95 void wxFileDialog::SetDirectory(const wxString& dir)
96 {
97 wxGenericFileDialog::SetDirectory( dir );
98 }
99
100 wxString wxFileDialog::GetDirectory() const
101 {
102 return wxGenericFileDialog::GetDirectory();
103 }
104
105 void wxFileDialog::SetFilename(const wxString& name)
106 {
107
108 wxGenericFileDialog::SetFilename( name );
109 }
110
111 wxString wxFileDialog::GetFilename() const
112 {
113 return wxGenericFileDialog::GetFilename();
114 }
115
116 void wxFileDialog::SetWildcard(const wxString& wildCard)
117 {
118 wxGenericFileDialog::SetWildcard( wildCard );
119 }
120
121 void wxFileDialog::SetFilterIndex(int filterIndex)
122 {
123 wxGenericFileDialog::SetFilterIndex( filterIndex );
124 }
125
126 int wxFileDialog::GetFilterIndex() const
127 {
128 return wxGenericFileDialog::GetFilterIndex();
129 }
130
131 #endif // wxUSE_FILEDLG