- CreateItems( event.GetItem() );
- SortChildren( event.GetItem() );
-
- wxEndBusyCursor();
-}
-
-void wxDirCtrl::OnCollapseItem(wxTreeEvent &event )
-{
- wxTreeItemId child, parent = event.GetItem();
- long cookie;
- /* Workaround because DeleteChildren has disapeared (why?) and
- * CollapseAndReset doesn't work as advertised (deletes parent too) */
- child = GetFirstChild(parent, cookie);
- while (child.IsOk())
- {
- Delete(child);
- /* Not GetNextChild below, because the cookie mechanism can't
- * handle disappearing children! */
- child = GetFirstChild(parent, cookie);
- }
-}
-
-//-----------------------------------------------------------------------------
-// wxDirDialog
-//-----------------------------------------------------------------------------
-
-
-IMPLEMENT_DYNAMIC_CLASS( wxDirDialog, wxDialog )
-
-BEGIN_EVENT_TABLE( wxDirDialog, wxDialog )
- EVT_TREE_KEY_DOWN (ID_DIRCTRL, wxDirDialog::OnTreeKeyDown)
- EVT_TREE_SEL_CHANGED (ID_DIRCTRL, wxDirDialog::OnTreeSelected)
- EVT_SIZE ( wxDirDialog::OnSize)
- EVT_BUTTON (ID_OK, wxDirDialog::OnOK)
- EVT_BUTTON (ID_CANCEL, wxDirDialog::OnCancel)
- EVT_BUTTON (ID_NEW, wxDirDialog::OnNew)
- EVT_TEXT_ENTER (ID_TEXTCTRL, wxDirDialog::OnOK)
- // EVT_CHECKBOX (ID_CHECK, wxDirDialog::OnCheck)
-END_EVENT_TABLE()
-
-wxDirDialog::wxDirDialog(wxWindow *parent,
- const wxString& message,
- const wxString& defaultPath,
- long style,
- const wxPoint& pos)
- : wxDialog(parent, -1, message, pos, wxSize(300,300),
- wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
-{
- m_message = message;
- m_dialogStyle = style;
- m_parent = parent;
-
- m_path = defaultPath;
-
- wxBeginBusyCursor();