]> git.saurik.com Git - wxWidgets.git/blame - src/gtk1/filedlg.cpp
add support for alpha in color dialog on OSX, see #14127
[wxWidgets.git] / src / gtk1 / filedlg.cpp
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
9b5f1895 2// Name: src/gtk1/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
4e1901b7 13#if wxUSE_FILEDLG
9755e73b 14
c801d85f 15#include "wx/filedlg.h"
643e9cf9 16#include "wx/testing.h"
4e1901b7 17
c801d85f 18
291a8f20
RR
19//-----------------------------------------------------------------------------
20// wxFileDialog
21//-----------------------------------------------------------------------------
22
4e1901b7
RR
23IMPLEMENT_DYNAMIC_CLASS(wxFileDialog,wxGenericFileDialog)
24
25BEGIN_EVENT_TABLE(wxFileDialog,wxGenericFileDialog)
f8bc53eb 26 EVT_BUTTON(wxID_OK, wxFileDialog::OnFakeOk)
4e1901b7 27END_EVENT_TABLE()
c801d85f 28
9755e73b
VS
29wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
30 const wxString& defaultDir,
31 const wxString& defaultFileName,
32 const wxString& wildCard,
ff3e84ff
VZ
33 long style, const wxPoint& pos,
34 const wxSize& sz,
35 const wxString& name)
4e1901b7 36 : wxGenericFileDialog(parent, message, defaultDir, defaultFileName,
ff3e84ff 37 wildCard, style, pos, sz, name, true )
c801d85f 38{
ff3e84ff 39 wxGenericFileDialog::Create( parent, message, defaultDir, defaultFileName, wildCard, style, pos, sz, name );
9755e73b 40}
0e1399b3 41
76840ed0 42wxFileDialog::~wxFileDialog()
9755e73b 43{
4e1901b7
RR
44}
45
46void wxFileDialog::OnFakeOk( wxCommandEvent &event )
47{
0cf3e587 48 wxGenericFileDialog::OnOk( event );
4e1901b7
RR
49}
50
51int wxFileDialog::ShowModal()
52{
643e9cf9
VS
53 WX_TESTING_SHOW_MODAL_HOOK();
54
3cbab641 55 return wxGenericFileDialog::ShowModal();
4e1901b7
RR
56}
57
58bool wxFileDialog::Show( bool show )
59{
3cbab641 60 return wxGenericFileDialog::Show( show );
9755e73b 61}
0e1399b3 62
5b2e23bf
RR
63void 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
f8bc53eb
JS
71wxString wxFileDialog::GetPath() const
72{
3cbab641 73 return wxGenericFileDialog::GetPath();
f8bc53eb
JS
74}
75
27b2dd53 76void wxFileDialog::GetFilenames(wxArrayString& files) const
9755e73b 77{
3cbab641 78 wxGenericFileDialog::GetFilenames( files );
9755e73b 79}
76840ed0 80
27b2dd53 81void wxFileDialog::GetPaths(wxArrayString& paths) const
9755e73b 82{
3cbab641 83 wxGenericFileDialog::GetPaths( paths );
9755e73b 84}
035b704a 85
9755e73b
VS
86void wxFileDialog::SetMessage(const wxString& message)
87{
3cbab641 88 wxGenericFileDialog::SetMessage( message );
9755e73b
VS
89}
90
76840ed0
RR
91void wxFileDialog::SetPath(const wxString& path)
92{
3cbab641 93 wxGenericFileDialog::SetPath( path );
76840ed0
RR
94}
95
9755e73b
VS
96void wxFileDialog::SetDirectory(const wxString& dir)
97{
3cbab641 98 wxGenericFileDialog::SetDirectory( dir );
9755e73b
VS
99}
100
f8bc53eb
JS
101wxString wxFileDialog::GetDirectory() const
102{
3cbab641 103 return wxGenericFileDialog::GetDirectory();
f8bc53eb
JS
104}
105
9755e73b
VS
106void wxFileDialog::SetFilename(const wxString& name)
107{
3cbab641
MR
108
109 wxGenericFileDialog::SetFilename( name );
9755e73b 110}
035b704a 111
f8bc53eb
JS
112wxString wxFileDialog::GetFilename() const
113{
3cbab641 114 return wxGenericFileDialog::GetFilename();
f8bc53eb
JS
115}
116
9755e73b
VS
117void wxFileDialog::SetWildcard(const wxString& wildCard)
118{
3cbab641 119 wxGenericFileDialog::SetWildcard( wildCard );
9755e73b 120}
a3622daa 121
9755e73b
VS
122void wxFileDialog::SetFilterIndex(int filterIndex)
123{
3cbab641 124 wxGenericFileDialog::SetFilterIndex( filterIndex );
4e1901b7
RR
125}
126
f8bc53eb 127int wxFileDialog::GetFilterIndex() const
4e1901b7 128{
3cbab641 129 return wxGenericFileDialog::GetFilterIndex();
9755e73b 130}
3f6638b8 131
4e1901b7 132#endif // wxUSE_FILEDLG