]> git.saurik.com Git - wxWidgets.git/blame - src/gtk1/filedlg.cpp
Calculate correct client size for windows that are using deferred sizing.
[wxWidgets.git] / src / gtk1 / filedlg.cpp
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
3f6638b8 2// Name: gtk/filedlg.cpp
9755e73b 3// Purpose: native implementation of wxFileDialog
f8bc53eb 4// Author: Robert Roebling, Zbigniew Zagorski, Mart Raudsepp
a81258be 5// Id: $Id$
f8bc53eb 6// Copyright: (c) 1998 Robert Roebling, 2004 Zbigniew Zagorski, 2005 Mart Raudsepp
65571936 7// Licence: wxWindows licence
c801d85f
KB
8/////////////////////////////////////////////////////////////////////////////
9
14f355c2
VS
10// For compilers that support precompilation, includes "wx.h".
11#include "wx/wxprec.h"
12
f8bc53eb
JS
13// Include setup.h to get wxUSE flags for compilers that do not support precompilation of headers
14#include "wx/setup.h"
15
4e1901b7 16#if wxUSE_FILEDLG
9755e73b 17
c801d85f 18#include "wx/filedlg.h"
4e1901b7 19
c801d85f 20
291a8f20
RR
21//-----------------------------------------------------------------------------
22// wxFileDialog
23//-----------------------------------------------------------------------------
24
4e1901b7
RR
25IMPLEMENT_DYNAMIC_CLASS(wxFileDialog,wxGenericFileDialog)
26
27BEGIN_EVENT_TABLE(wxFileDialog,wxGenericFileDialog)
f8bc53eb 28 EVT_BUTTON(wxID_OK, wxFileDialog::OnFakeOk)
4e1901b7 29END_EVENT_TABLE()
c801d85f 30
9755e73b
VS
31wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
32 const wxString& defaultDir,
33 const wxString& defaultFileName,
34 const wxString& wildCard,
35 long style, const wxPoint& pos)
4e1901b7
RR
36 : wxGenericFileDialog(parent, message, defaultDir, defaultFileName,
37 wildCard, style, pos, true )
c801d85f 38{
77f70672 39 wxGenericFileDialog::Create( parent, message, defaultDir, defaultFileName, wildCard, style, pos );
9755e73b 40}
0e1399b3 41
76840ed0 42wxFileDialog::~wxFileDialog()
9755e73b 43{
4e1901b7
RR
44}
45
46void wxFileDialog::OnFakeOk( wxCommandEvent &event )
47{
3cbab641 48 wxGenericFileDialog::OnListOk( event );
4e1901b7
RR
49}
50
51int wxFileDialog::ShowModal()
52{
3cbab641 53 return wxGenericFileDialog::ShowModal();
4e1901b7
RR
54}
55
56bool wxFileDialog::Show( bool show )
57{
3cbab641 58 return wxGenericFileDialog::Show( show );
9755e73b 59}
0e1399b3 60
5b2e23bf
RR
61void wxFileDialog::DoSetSize(int x, int y, int width, int height, int sizeFlags )
62{
63 if (!m_wxwindow)
64 return;
65 else
66 wxGenericFileDialog::DoSetSize( x, y, width, height, sizeFlags );
67}
68
f8bc53eb
JS
69wxString wxFileDialog::GetPath() const
70{
3cbab641 71 return wxGenericFileDialog::GetPath();
f8bc53eb
JS
72}
73
27b2dd53 74void wxFileDialog::GetFilenames(wxArrayString& files) const
9755e73b 75{
3cbab641 76 wxGenericFileDialog::GetFilenames( files );
9755e73b 77}
76840ed0 78
27b2dd53 79void wxFileDialog::GetPaths(wxArrayString& paths) const
9755e73b 80{
3cbab641 81 wxGenericFileDialog::GetPaths( paths );
9755e73b 82}
035b704a 83
9755e73b
VS
84void wxFileDialog::SetMessage(const wxString& message)
85{
3cbab641 86 wxGenericFileDialog::SetMessage( message );
9755e73b
VS
87}
88
76840ed0
RR
89void wxFileDialog::SetPath(const wxString& path)
90{
3cbab641 91 wxGenericFileDialog::SetPath( path );
76840ed0
RR
92}
93
9755e73b
VS
94void wxFileDialog::SetDirectory(const wxString& dir)
95{
3cbab641 96 wxGenericFileDialog::SetDirectory( dir );
9755e73b
VS
97}
98
f8bc53eb
JS
99wxString wxFileDialog::GetDirectory() const
100{
3cbab641 101 return wxGenericFileDialog::GetDirectory();
f8bc53eb
JS
102}
103
9755e73b
VS
104void wxFileDialog::SetFilename(const wxString& name)
105{
3cbab641
MR
106
107 wxGenericFileDialog::SetFilename( name );
9755e73b 108}
035b704a 109
f8bc53eb
JS
110wxString wxFileDialog::GetFilename() const
111{
3cbab641 112 return wxGenericFileDialog::GetFilename();
f8bc53eb
JS
113}
114
9755e73b
VS
115void wxFileDialog::SetWildcard(const wxString& wildCard)
116{
3cbab641 117 wxGenericFileDialog::SetWildcard( wildCard );
9755e73b 118}
a3622daa 119
9755e73b
VS
120void wxFileDialog::SetFilterIndex(int filterIndex)
121{
3cbab641 122 wxGenericFileDialog::SetFilterIndex( filterIndex );
4e1901b7
RR
123}
124
f8bc53eb 125int wxFileDialog::GetFilterIndex() const
4e1901b7 126{
3cbab641 127 return wxGenericFileDialog::GetFilterIndex();
9755e73b 128}
3f6638b8 129
4e1901b7 130#endif // wxUSE_FILEDLG