#if wxUSE_FILEDLG
+#include "wx/filedlg.h"
+
#ifndef WX_PRECOMP
#include "wx/msgdlg.h"
- #include "wx/filedlg.h"
#include "wx/app.h"
#endif
// wxFileDialog
// ----------------------------------------------------------------------------
-wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
- const wxString& defaultDir, const wxString& defaultFileName,
- const wxString& wildCard, long style, const wxPoint& pos)
-: wxFileDialogBase(parent, message, defaultDir, defaultFileName,
- wildCard, style, pos)
+wxFileDialog::wxFileDialog(wxWindow *parent,
+ const wxString& message,
+ const wxString& defaultDir,
+ const wxString& defaultFileName,
+ const wxString& wildCard,
+ long style,
+ const wxPoint& pos,
+ const wxSize& sz,
+ const wxString& name)
+ : wxFileDialogBase(parent, message, defaultDir, defaultFileName,
+ wildCard, style, pos, sz, name)
{
wxTopLevelWindows.Append(this);
//If the user requests to save - use a NSSavePanel
//else use a NSOpenPanel
- if (m_dialogStyle & wxFD_SAVE)
+ if (HasFlag(wxFD_SAVE))
{
SetNSPanel([NSSavePanel savePanel]);
SetNSPanel([NSOpenPanel openPanel]);
[m_cocoaNSWindow setTitle:wxNSStringWithWxString(message)];
- [(NSOpenPanel*)m_cocoaNSWindow setAllowsMultipleSelection:(m_dialogStyle & wxFD_MULTIPLE)];
+ [(NSOpenPanel*)m_cocoaNSWindow setAllowsMultipleSelection:(HasFlag(wxFD_MULTIPLE))];
[(NSOpenPanel*)m_cocoaNSWindow setResolvesAliases:YES];
[(NSOpenPanel*)m_cocoaNSWindow setCanChooseFiles:YES];
[(NSOpenPanel*)m_cocoaNSWindow setCanChooseDirectories:NO];
int nResult;
- if (m_dialogStyle & wxFD_SAVE)
+ if (HasFlag(wxFD_SAVE))
{
nResult = [GetNSSavePanel()
runModalForDirectory:wxNSStringWithWxString(m_dir)