-wxDirCtrl::wxDirCtrl(void)
-{
- m_showHidden = FALSE;
-}
-
-wxDirCtrl::wxDirCtrl(wxWindow *parent, const wxWindowID id, const wxString &WXUNUSED(dir),
- const wxPoint& pos, const wxSize& size,
- const long style, const wxString& name )
- :
- wxTreeCtrl( parent, id, pos, size, style, wxDefaultValidator, name )
-{
- #ifndef __WXMSW__
- m_imageListNormal = new wxImageList(16, 16, TRUE);
- m_imageListNormal->Add(wxICON(icon1));
- m_imageListNormal->Add(wxICON(icon2));
- SetImageList(m_imageListNormal);
- #endif
-
- m_showHidden = FALSE;
- m_rootId = AddRoot( _("Sections") );
- SetItemHasChildren(m_rootId);
- Expand(m_rootId); // automatically expand first level
-}
-
-/* Quick macro. Don't worry, I'll #undef it later */
-#define ADD_SECTION(a,b) \
- if (wxPathExists((a))) { m_paths.Add( (a) ); m_names.Add( (b) ); };
-
-void wxDirCtrl::SetupSections()
-{
- wxString home;
-
- m_paths.Clear();
- m_names.Clear();
-#ifdef __WXMSW__
- // better than nothing
- ADD_SECTION(T("c:\\"), _("My Harddisk") )
-#else
- ADD_SECTION(T("/"), _("The Computer") )
- wxGetHomeDir(&home);
- ADD_SECTION(home, _("My Home") )
- ADD_SECTION(T("/mnt"), _("Mounted Devices") )
- ADD_SECTION(T("/usr"), _("User") )
- ADD_SECTION(T("/usr/local"), _("User Local") )
- ADD_SECTION(T("/var"), _("Variables") )
- ADD_SECTION(T("/etc"), _("Etcetera") )
- ADD_SECTION(T("/tmp"), _("Temporary") )
-#endif
-}
-#undef ADD_SECTION
-
-void wxDirCtrl::CreateItems(const wxTreeItemId &parent)
+wxGenericDirDialog::wxGenericDirDialog(wxWindow* parent, const wxString& title,
+ const wxString& defaultPath, long style,
+ const wxPoint& pos, const wxSize& sz,
+ const wxString& name):
+ wxDialog(parent, ID_DIRCTRL, title, pos, sz, style, name)