Add default ctors and Create() to wxDirDialog and wxFileDialog in wxOSX.
Allow two-step creation of these classes. Closes #15316. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74476 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -19,7 +19,22 @@
|
||||
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,
|
||||
@@ -47,6 +62,9 @@ private:
|
||||
WX_NSObject m_sheetDelegate;
|
||||
#endif
|
||||
|
||||
// Common part of all ctors.
|
||||
void Init();
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxDirDialog)
|
||||
};
|
||||
|
||||
|
@@ -31,7 +31,23 @@ protected:
|
||||
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,
|
||||
@@ -87,6 +103,10 @@ protected:
|
||||
WX_NSObject m_delegate;
|
||||
WX_NSObject m_sheetDelegate;
|
||||
#endif
|
||||
|
||||
private:
|
||||
// Common part of all ctors.
|
||||
void Init();
|
||||
};
|
||||
|
||||
#endif // _WX_FILEDLG_H_
|
||||
|
Reference in New Issue
Block a user