- m_message = message;
- m_dialogStyle = style;
- m_parent = parent;
-
- m_path = defaultPath;
-
- wxBeginBusyCursor();
-
- wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
-
- // 1) dir ctrl
- m_dir = new wxDirCtrl( this, ID_DIRCTRL, "/", wxDefaultPosition, wxSize(200,200),
- wxTR_HAS_BUTTONS | wxSUNKEN_BORDER | wxTR_EDIT_LABELS);
- topsizer->Add( m_dir, 1, wxTOP|wxLEFT|wxRIGHT | wxEXPAND, 10 );
-
- // 2) text ctrl
- m_input = new wxTextCtrl( this, ID_TEXTCTRL, m_path, wxDefaultPosition );
- topsizer->Add( m_input, 0, wxTOP|wxLEFT|wxRIGHT | wxEXPAND, 10 );
-
- // m_check = new wxCheckBox( this, ID_CHECK, _("Show hidden") );
- // m_check->SetValue(TRUE);
-
-#if wxUSE_STATLINE
- // 3) static line
- topsizer->Add( new wxStaticLine( this, -1 ), 0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 10 );
-#endif
-
- // 4) buttons
- wxSizer* buttonsizer = new wxBoxSizer( wxHORIZONTAL );
- m_ok = new wxButton( this, ID_OK, _("OK") );
- buttonsizer->Add( m_ok, 0, wxLEFT|wxRIGHT, 10 );
- m_cancel = new wxButton( this, ID_CANCEL, _("Cancel") );
- buttonsizer->Add( m_cancel, 0, wxLEFT|wxRIGHT, 10 );
- m_new = new wxButton( this, ID_NEW, _("New...") );
- buttonsizer->Add( m_new, 0, wxLEFT|wxRIGHT, 10 );
-
- topsizer->Add( buttonsizer, 0, wxALL | wxCENTER, 10 );
-
- m_ok->SetDefault();
- m_dir->SetFocus();
-
- SetAutoLayout( TRUE );
- SetSizer( topsizer );
-
- topsizer->SetSizeHints( this );
- topsizer->Fit( this );
-
- Centre( wxBOTH );
-
- wxEndBusyCursor();