+ if (style & wxDD_NEW_DIR_BUTTON)
+ {
+ wxBitmapButton* newButton =
+ new wxBitmapButton(this, ID_NEW,
+ wxArtProvider::GetBitmap(wxART_NEW_DIR, wxART_BUTTON));
+ buttonsizer->Add( newButton, 0, wxRIGHT, 10 );
+#if wxUSE_TOOLTIPS
+ newButton->SetToolTip(_("Create new directory"));
+#endif
+ }
+
+#if wxUSE_TOOLTIPS
+ homeButton->SetToolTip(_("Go to home directory"));
+#endif
+
+ topsizer->Add( buttonsizer, 0, wxTOP | wxALIGN_RIGHT, 10 );
+
+#endif // __SMARTPHONE__/!__SMARTPHONE__
+
+ // 1) dir ctrl
+ m_dirCtrl = NULL; // this is necessary, event handler called from
+ // wxGenericDirCtrl would crash otherwise!
+ long dirStyle = wxDIRCTRL_DIR_ONLY | wxDEFAULT_CONTROL_BORDER;
+
+#ifdef __WXMSW__
+ if (style & wxDD_NEW_DIR_BUTTON)
+ {
+ // Only under Windows do we need the wxTR_EDIT_LABEL tree control style
+ // before we can call EditLabel (required for "New directory")
+ dirStyle |= wxDIRCTRL_EDIT_LABELS;
+ }
+#endif
+
+ m_dirCtrl = new wxGenericDirCtrl(this, ID_DIRCTRL,
+ m_path, wxDefaultPosition,
+ wxSize(300, 200),
+ dirStyle);
+
+ topsizer->Add( m_dirCtrl, 1, wxTOP|wxLEFT|wxRIGHT | wxEXPAND, wxLARGESMALL(10,0) );
+
+#ifndef __SMARTPHONE__
+ // Make the an option depending on a flag?
+ wxCheckBox* check = new wxCheckBox( this, ID_SHOW_HIDDEN, _("Show hidden directories") );
+ topsizer->Add( check, 0, wxLEFT|wxRIGHT|wxTOP | wxALIGN_RIGHT, 10 );
+#endif // !__SMARTPHONE__
+
+ // 2) text ctrl
+ m_input = new wxTextCtrl( this, ID_TEXTCTRL, m_path, wxDefaultPosition );
+ topsizer->Add( m_input, 0, wxTOP|wxLEFT|wxRIGHT | wxEXPAND, wxLARGESMALL(10,0) );
+
+ // 3) buttons if any
+ wxSizer *buttonSizer = CreateButtonSizer( wxOK|wxCANCEL , true, wxLARGESMALL(10,0) );
+ if(buttonSizer->GetChildren().GetCount() > 0 )
+ {
+ topsizer->Add( buttonSizer, 0, wxEXPAND | wxALL, wxLARGESMALL(10,0) );
+ }
+ else
+ {
+ topsizer->AddSpacer( wxLARGESMALL(10,0) );
+ delete buttonSizer;
+ }