WXDLLEXPORT_DATA(extern const wxChar*) wxDirDialogNameStr;
WXDLLEXPORT_DATA(extern const wxChar*) wxDirDialogDefaultFolderStr;
+WXDLLEXPORT_DATA(extern const wxChar*) wxDirSelectorPromptStr;
WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString;
+#define wxDD_DEFAULT_STYLE \
+ (wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxDD_NEW_DIR_BUTTON)
+
+/*
+ The interface (TODO: make the other classes really derive from it!) is
+ something like this:
+
+class WXDLLEXPORT wxDirDialogBase : public wxDialog
+{
+public:
+ wxDirDialogBase(wxWindow *parent,
+ const wxString& title = wxFileSelectorPromptStr,
+ const wxString& defaultPath = wxEmptyString,
+ long style = wxDD_DEFAULT_STYLE,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& sz = wxDefaultSize,
+ const wxString& name = _T("dirdialog"));
+
+ void SetMessage(const wxString& message);
+ void SetPath(const wxString& path);
+ void SetStyle(long style);
+
+ wxString GetMessage() const;
+ wxString GetPath() const;
+ long GetStyle() const;
+};
+
+*/
+
#if defined(__WXMSW__)
#if defined(__WIN16__) || (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS) || defined(__SALFORDC__) || !wxUSE_OLE
#include "wx/generic/dirdlgg.h"
#include "wx/generic/dirdlgg.h"
#endif
+#if !defined(__WXMSW__) && !defined(__WXMAC__)
+ #define wxDirDialog wxGenericDirDialog
+#endif
+
// ----------------------------------------------------------------------------
// common ::wxDirSelector() function
// ----------------------------------------------------------------------------
-WXDLLEXPORT_DATA(extern const wxChar*) wxDirSelectorPromptStr;
-
WXDLLEXPORT wxString
wxDirSelector(const wxString& message = wxDirSelectorPromptStr,
const wxString& defaultPath = wxEmptyString,
- long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxDD_NEW_DIR_BUTTON,
+ long style = wxDD_DEFAULT_STYLE,
const wxPoint& pos = wxDefaultPosition,
wxWindow *parent = NULL);
#pragma interface "dirdlgg.h"
#endif
-#include "wx/defs.h"
-
-#if wxUSE_DIRDLG
-
-#include "wx/dialog.h"
class WXDLLEXPORT wxGenericDirCtrl;
class WXDLLEXPORT wxTextCtrl;
class WXDLLEXPORT wxTreeEvent;
class WXDLLEXPORT wxGenericDirDialog: public wxDialog
{
public:
- wxGenericDirDialog(): wxDialog() {}
- wxGenericDirDialog(wxWindow* parent, const wxString& title,
+ wxGenericDirDialog() : wxDialog() { }
+
+ wxGenericDirDialog(wxWindow* parent,
+ const wxString& title = wxDirSelectorPromptStr,
const wxString& defaultPath = wxEmptyString,
- long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxDD_NEW_DIR_BUTTON,
+ long style = wxDD_DEFAULT_STYLE,
const wxPoint& pos = wxDefaultPosition,
const wxSize& sz = wxSize(450, 550),
- const wxString& name = _T("dialog"));
+ const wxString& name = wxDirDialogNameStr);
//// Accessors
inline void SetMessage(const wxString& message) { m_message = message; }
DECLARE_EVENT_TABLE()
};
-#if !defined(__WXMSW__) && !defined(__WXMAC__)
- #define wxDirDialog wxGenericDirDialog
-#endif
-
-#endif // wxUSE_DIRDLG
-
#endif // _WX_DIRDLGG_H_
#pragma interface "dirdlg.h"
#endif
-#include "wx/dialog.h"
-
-WXDLLEXPORT_DATA(extern const char*) wxFileSelectorPromptStr;
-
-class WXDLLEXPORT wxDirDialog: public wxDialog
+class WXDLLEXPORT wxDirDialog : public wxDialog
{
-DECLARE_DYNAMIC_CLASS(wxDirDialog)
public:
- wxDirDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr,
- const wxString& defaultPath = "",
- long style = 0, const wxPoint& pos = wxDefaultPosition);
+ wxDirDialog(wxWindow *parent,
+ const wxString& message = wxDirSelectorPromptStr,
+ const wxString& defaultPath = _T(""),
+ long style = 0,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ const wxString& name = wxDirDialogNameStr);
- inline void SetMessage(const wxString& message) { m_message = message; }
- inline void SetPath(const wxString& path) { m_path = path; }
- inline void SetStyle(long style) { m_dialogStyle = style; }
+ void SetMessage(const wxString& message) { m_message = message; }
+ void SetPath(const wxString& path) { m_path = path; }
+ void SetStyle(long style) { m_dialogStyle = style; }
- inline wxString GetMessage() const { return m_message; }
- inline wxString GetPath() const { return m_path; }
- inline long GetStyle() const { return m_dialogStyle; }
+ wxString GetMessage() const { return m_message; }
+ wxString GetPath() const { return m_path; }
+ long GetStyle() const { return m_dialogStyle; }
- int ShowModal();
+ virtual int ShowModal();
protected:
wxString m_message;
long m_dialogStyle;
wxWindow * m_parent;
wxString m_path;
+
+ DECLARE_DYNAMIC_CLASS(wxDirDialog)
};
#endif
#pragma interface "dirdlg.h"
#endif
-#include "wx/dialog.h"
-
-WXDLLEXPORT_DATA(extern const wxChar*) wxFileSelectorPromptStr;
-
class WXDLLEXPORT wxDirDialog : public wxDialog
{
public:
wxDirDialog(wxWindow *parent,
- const wxString& message = wxFileSelectorPromptStr,
+ const wxString& message = wxDirSelectorPromptStr,
const wxString& defaultPath = wxEmptyString,
long style = 0,
- const wxPoint& pos = wxDefaultPosition);
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ const wxString& name = wxDirDialogNameStr);
void SetMessage(const wxString& message) { m_message = message; }
void SetPath(const wxString& path);
#endif
#include "wx/statline.h"
-#include "wx/generic/dirctrlg.h"
-#include "wx/generic/dirdlgg.h"
+#include "wx/dirctrl.h"
+#include "wx/dirdlg.h"
#include "wx/artprov.h"
#include "wx/bmpbuttn.h"
IMPLEMENT_CLASS(wxDirDialog, wxDialog)
#endif
-wxDirDialog::wxDirDialog(wxWindow *parent, const wxString& message,
- const wxString& defaultPath,
- long style, const wxPoint& pos)
+wxDirDialog::wxDirDialog(wxWindow *parent,
+ const wxString& message,
+ const wxString& defaultPath,
+ long style,
+ const wxPoint& WXUNUSED(pos),
+ const wxSize& WXUNUSED(size),
+ const wxString& WXUNUSED(name))
{
wxASSERT_MSG( NavServicesAvailable() , "Navigation Services are not running" ) ;
m_message = message;
IMPLEMENT_CLASS(wxDirDialog, wxDialog)
#endif
-wxDirDialog::wxDirDialog(wxWindow *parent, const wxString& message,
- const wxString& defaultPath,
- long style, const wxPoint& pos)
+wxDirDialog::wxDirDialog(wxWindow *parent,
+ const wxString& message,
+ const wxString& defaultPath,
+ long style,
+ const wxPoint& WXUNUSED(pos),
+ const wxSize& WXUNUSED(size),
+ const wxString& WXUNUSED(name))
{
wxASSERT_MSG( NavServicesAvailable() , "Navigation Services are not running" ) ;
m_message = message;
const wxString& message,
const wxString& defaultPath,
long WXUNUSED(style),
- const wxPoint& WXUNUSED(pos))
+ const wxPoint& WXUNUSED(pos),
+ const wxSize& WXUNUSED(size),
+ const wxString& WXUNUSED(name))
{
m_message = message;
m_parent = parent;