-}
-
-//-----------------------------------------------------------------------------
-// wxFileDialog
-//-----------------------------------------------------------------------------
-
-#define ID_LIST_CTRL 5010
-#define ID_LIST_MODE 5000
-#define ID_REPORT_MODE 5001
-#define ID_UP_DIR 5005
-#define ID_PARENT_DIR 5006
-#define ID_NEW_DIR 5007
-
-IMPLEMENT_DYNAMIC_CLASS(wxFileDialog,wxDialog)
-
-BEGIN_EVENT_TABLE(wxFileDialog,wxDialog)
- EVT_BUTTON(ID_LIST_MODE, wxFileDialog::OnList)
- EVT_BUTTON(ID_REPORT_MODE, wxFileDialog::OnReport)
- EVT_BUTTON(ID_UP_DIR, wxFileDialog::OnUp)
- EVT_BUTTON(ID_PARENT_DIR, wxFileDialog::OnHome)
- EVT_BUTTON(ID_NEW_DIR, wxFileDialog::OnNew)
- EVT_BUTTON(wxID_OK, wxFileDialog::OnListOk)
- EVT_LIST_ITEM_SELECTED(ID_LIST_CTRL, wxFileDialog::OnSelected)
- EVT_LIST_ITEM_ACTIVATED(ID_LIST_CTRL, wxFileDialog::OnActivated)
-END_EVENT_TABLE()
-
-wxFileDialog::wxFileDialog(wxWindow *parent,
- const wxString& message,
- const wxString& defaultDir,
- const wxString& defaultFile,
- const wxString& wildCard,
- long style,
- const wxPoint& pos ) :
- wxDialog( parent, -1, message, pos, wxDefaultSize, style | wxRESIZE_BORDER )
-{
- wxBeginBusyCursor();
-
- m_message = message;
- m_dialogStyle = style;
- m_dir = defaultDir;
- if (m_dir.IsEmpty()) m_dir = wxGetUserHome();
- m_path = defaultDir;
- m_path += _T("/");
- m_path += defaultFile;
- m_fileName = defaultFile;
- m_wildCard = wildCard;
- m_filterIndex = 0;
-
- wxBoxSizer *mainsizer = new wxBoxSizer( wxVERTICAL );
-
- wxBoxSizer *buttonsizer = new wxBoxSizer( wxHORIZONTAL );
-
- wxBitmapButton *but;
-
- but = new wxBitmapButton( this, ID_LIST_MODE, wxBitmap( listview_xpm ) );
-#if wxUSE_TOOLTIPS
- but->SetToolTip( _("View files as a list view") );
-#endif
- buttonsizer->Add( but, 0, wxALL, 5 );
-
- but = new wxBitmapButton( this, ID_REPORT_MODE, wxBitmap( repview_xpm ) );
-#if wxUSE_TOOLTIPS
- but->SetToolTip( _("View files as a detailed view") );
-#endif
- buttonsizer->Add( but, 0, wxALL, 5 );
-
- buttonsizer->Add( 30, 5, 1 );
-
- but = new wxBitmapButton( this, ID_UP_DIR, wxBitmap( dir_up_xpm ) );
-#if wxUSE_TOOLTIPS
- but->SetToolTip( _("Go to parent directory") );
-#endif
- buttonsizer->Add( but, 0, wxALL, 5 );
-
- but = new wxBitmapButton( this, ID_PARENT_DIR, wxBitmap(home_xpm) );
-#if wxUSE_TOOLTIPS
- but->SetToolTip( _("Go to home directory") );
-#endif
- buttonsizer->Add( but, 0, wxALL, 5);
-
- buttonsizer->Add( 20, 20 );
-
- but = new wxBitmapButton( this, ID_NEW_DIR, wxBitmap(new_dir_xpm) );
-#if wxUSE_TOOLTIPS
- but->SetToolTip( _("Create new directory") );