class WXDLLIMPEXP_CORE wxDirDialog : public wxDirDialogBase
{
public:
+ wxDirDialog() { Init(); }
+
wxDirDialog(wxWindow *parent,
+ const wxString& message = wxDirSelectorPromptStr,
+ const wxString& defaultPath = wxT(""),
+ long style = wxDD_DEFAULT_STYLE,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ const wxString& name = wxDirDialogNameStr)
+ {
+ Init();
+
+ Create(parent,message,defaultPath,style,pos,size,name);
+ }
+
+ void Create(wxWindow *parent,
const wxString& message = wxDirSelectorPromptStr,
const wxString& defaultPath = wxT(""),
long style = wxDD_DEFAULT_STYLE,
WX_NSObject m_sheetDelegate;
#endif
+ // Common part of all ctors.
+ void Init();
+
DECLARE_DYNAMIC_CLASS(wxDirDialog)
};
wxArrayString m_paths;
public:
+ wxFileDialog() { Init(); }
wxFileDialog(wxWindow *parent,
+ const wxString& message = wxFileSelectorPromptStr,
+ const wxString& defaultDir = wxEmptyString,
+ const wxString& defaultFile = wxEmptyString,
+ const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
+ long style = wxFD_DEFAULT_STYLE,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& sz = wxDefaultSize,
+ const wxString& name = wxFileDialogNameStr)
+ {
+ Init();
+
+ Create(parent,message,defaultDir,defaultFile,wildCard,style,pos,sz,name);
+ }
+
+ void Create(wxWindow *parent,
const wxString& message = wxFileSelectorPromptStr,
const wxString& defaultDir = wxEmptyString,
const wxString& defaultFile = wxEmptyString,
WX_NSObject m_delegate;
WX_NSObject m_sheetDelegate;
#endif
+
+private:
+ // Common part of all ctors.
+ void Init();
};
#endif // _WX_FILEDLG_H_
}
}
-wxDirDialog::wxDirDialog(wxWindow *parent,
+void wxDirDialog::Init()
+{
+}
+
+void wxDirDialog::Create(wxWindow *parent,
const wxString& message,
const wxString& defaultPath,
long style,
}
-wxFileDialog::wxFileDialog(
+void wxFileDialog::Init()
+{
+}
+
+void wxFileDialog::Create(
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)
{
+ wxFileDialogBase::Create(parent, message, defaultDir, defaultFileName, wildCard, style, pos, sz, name);
+
wxASSERT_MSG( NavServicesAvailable() , wxT("Navigation Services are not running") ) ;
}
IMPLEMENT_CLASS(wxDirDialog, wxDialog)
-wxDirDialog::wxDirDialog(wxWindow *parent, const wxString& message,
+void wxDirDialog::Init()
+{
+ m_sheetDelegate = nil;
+}
+
+void wxDirDialog::Create(wxWindow *parent, const wxString& message,
const wxString& defaultPath, long style, const wxPoint& WXUNUSED(pos),
const wxSize& WXUNUSED(size), const wxString& WXUNUSED(name))
{
IMPLEMENT_CLASS(wxFileDialog, wxFileDialogBase)
-wxFileDialog::wxFileDialog(
+void wxFileDialog::Init()
+{
+ m_filterIndex = -1;
+ m_delegate = nil;
+ m_sheetDelegate = nil;
+}
+
+void wxFileDialog::Create(
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)
{
- m_filterIndex = -1;
+ wxFileDialogBase::Create(parent, message, defaultDir, defaultFileName, wildCard, style, pos, sz, name);
+
m_sheetDelegate = [[ModalDialogDelegate alloc] init];
[(ModalDialogDelegate*)m_sheetDelegate setImplementation: this];
- m_delegate = nil;
}
wxFileDialog::~wxFileDialog()