// uses wxDirCtrl class written by Robert Roebling for the
// wxFile application, modified by Harm van der Heijden
//
// Description: This generic dirdialog implementation defines three classes:
// 1) wxDirItemData(public wxTreeItemData) stores pathname and
// displayed name for each item in the directory tree
// uses wxDirCtrl class written by Robert Roebling for the
// wxFile application, modified by Harm van der Heijden
//
// Description: This generic dirdialog implementation defines three classes:
// 1) wxDirItemData(public wxTreeItemData) stores pathname and
// displayed name for each item in the directory tree
// user's homedir, /usr/local, /tmp ...etc), similar to
// Win95 Explorer's shortcuts to 'My Computer', 'Desktop', etc.
// 3) wxDirDialog is the dialog box itself. The user can choose
// a directory by navigating the tree, or by typing a dir
// in an inputbox. The inputbox displays paths selected in the
// tree. It is possible to create new directories. The user
// user's homedir, /usr/local, /tmp ...etc), similar to
// Win95 Explorer's shortcuts to 'My Computer', 'Desktop', etc.
// 3) wxDirDialog is the dialog box itself. The user can choose
// a directory by navigating the tree, or by typing a dir
// in an inputbox. The inputbox displays paths selected in the
// tree. It is possible to create new directories. The user
// enters a non-existing dir.
//
// TODO/BUGS: - standard sections only have reasonable defaults for Unix
// (but others are easily added in wxDirCtrl::SetupSections)
// - No direct support for "show hidden" toggle. Partly due
// enters a non-existing dir.
//
// TODO/BUGS: - standard sections only have reasonable defaults for Unix
// (but others are easily added in wxDirCtrl::SetupSections)
// - No direct support for "show hidden" toggle. Partly due
// wxFindFirst/NextFile never seems to find hidden dirs
// anyway.
// - No automatic update of the tree (branch) after directory
// wxFindFirst/NextFile never seems to find hidden dirs
// anyway.
// - No automatic update of the tree (branch) after directory
// CDROM drive or something is involved) but that doesn't
// seem to do anything. Need to look into that.
// - Am still looking for an efficient way to delete wxTreeCtrl
// CDROM drive or something is involved) but that doesn't
// seem to do anything. Need to look into that.
// - Am still looking for an efficient way to delete wxTreeCtrl
// CollapseAndReset( parent ) deletes the parent as well.
// - The dialog window layout is done using wxConstraints. It
// CollapseAndReset( parent ) deletes the parent as well.
// - The dialog window layout is done using wxConstraints. It
// comments in wxDirDialog::doSize)
//
/////////////////////////////////////////////////////////////////////////////
// comments in wxDirDialog::doSize)
//
/////////////////////////////////////////////////////////////////////////////
-WXDLLEXPORT_DATA(extern const char*) wxFileSelectorPromptStr;
+//-----------------------------------------------------------------------------
+// data
+//-----------------------------------------------------------------------------
+
+WXDLLEXPORT_DATA(extern const wxChar*) wxFileSelectorPromptStr;
+WXDLLEXPORT_DATA(extern const wxChar*) wxDirDialogDefaultFolderStr;
+
+//-----------------------------------------------------------------------------
+// classes
+//-----------------------------------------------------------------------------
+
+class wxDirItemData;
+class wxDirCtrl;
+class wxDirDialog;
//-----------------------------------------------------------------------------
// wxDirItemData
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// wxDirItemData
//-----------------------------------------------------------------------------
-
- wxDirCtrl(void);
- wxDirCtrl(wxWindow *parent, const wxWindowID id = -1,
- const wxString &dir = "/",
+
+ wxDirCtrl();
+ wxDirCtrl(wxWindow *parent, const wxWindowID id = -1,
+ const wxString &dir = wxDirDialogDefaultFolderStr,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
const long style = wxTR_HAS_BUTTONS,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
const long style = wxTR_HAS_BUTTONS,
long style = 0, const wxPoint& pos = wxDefaultPosition);
inline void SetMessage(const wxString& message) { m_message = message; }
inline void SetPath(const wxString& path) { m_path = path; }
long style = 0, const wxPoint& pos = wxDefaultPosition);
inline void SetMessage(const wxString& message) { m_message = message; }
inline void SetPath(const wxString& path) { m_path = path; }
- wxString m_message;
- long m_dialogStyle;
- wxWindow * m_parent;
- wxString m_path;
- wxDirCtrl *m_dir;
- wxTextCtrl *m_input;
- // wxCheckBox *m_check;
- wxButton *m_ok, *m_cancel, *m_new;
- void doSize();
+ wxString m_message;
+ long m_dialogStyle;
+ wxString m_path;
+ wxDirCtrl *m_dir;
+ wxTextCtrl *m_input;
+ wxCheckBox *m_check; // not yet used
+ wxButton *m_ok, *m_cancel, *m_new;
+
+private:
+ DECLARE_EVENT_TABLE()
+ DECLARE_DYNAMIC_CLASS(wxDirDialog)