-//static const int ID_CHECK = 1005;
-
-//-----------------------------------------------------------------------------
-// wxDirItemData
-//-----------------------------------------------------------------------------
-
-wxDirItemData::wxDirItemData(wxString& path, wxString& name)
-{
- m_path = path;
- m_name = name;
- /* Insert logic to detect hidden files here
- * In UnixLand we just check whether the first char is a dot
- * For FileNameFromPath read LastDirNameInThisPath ;-) */
- // m_isHidden = (bool)(wxFileNameFromPath(*m_path)[0] == '.');
- m_isHidden = FALSE;
- m_hasSubDirs = HasSubDirs();
-}
-
-wxDirItemData::~wxDirItemData()
-{
-}
-
-void wxDirItemData::SetNewDirName( wxString path )
-{
- m_path = path;
- m_name = wxFileNameFromPath( path );
-}
-
-bool wxDirItemData::HasSubDirs()
-{
- wxString search = m_path + wxT("/*");
- wxLogNull log;
- wxString path = wxFindFirstFile( search, wxDIR );
- return (bool)(!path.IsNull());
-}
-
-//-----------------------------------------------------------------------------
-// wxDirCtrl
-//-----------------------------------------------------------------------------
-
-IMPLEMENT_DYNAMIC_CLASS(wxDirCtrl,wxTreeCtrl)
-
-BEGIN_EVENT_TABLE(wxDirCtrl,wxTreeCtrl)
- EVT_TREE_ITEM_EXPANDING (-1, wxDirCtrl::OnExpandItem)
- EVT_TREE_ITEM_COLLAPSED (-1, wxDirCtrl::OnCollapseItem)
- EVT_TREE_BEGIN_LABEL_EDIT (-1, wxDirCtrl::OnBeginEditItem)
- EVT_TREE_END_LABEL_EDIT (-1, wxDirCtrl::OnEndEditItem)
+static const int ID_SHOW_HIDDEN = 1005;
+static const int ID_GO_HOME = 1006;
+
+BEGIN_EVENT_TABLE(wxGenericDirDialog, wxDialog)
+ EVT_CLOSE (wxGenericDirDialog::OnCloseWindow)
+ EVT_BUTTON (wxID_OK, wxGenericDirDialog::OnOK)
+ EVT_BUTTON (ID_NEW, wxGenericDirDialog::OnNew)
+ EVT_BUTTON (ID_GO_HOME, wxGenericDirDialog::OnGoHome)
+ EVT_TREE_KEY_DOWN (-1, wxGenericDirDialog::OnTreeKeyDown)
+ EVT_TREE_SEL_CHANGED (-1, wxGenericDirDialog::OnTreeSelected)
+ EVT_TEXT_ENTER (ID_TEXTCTRL, wxGenericDirDialog::OnOK)
+ EVT_CHECKBOX (ID_SHOW_HIDDEN, wxGenericDirDialog::OnShowHidden)