//#include "wx/checkbox.h"
#include "wx/treectrl.h"
-WXDLLEXPORT_DATA(extern const char*) wxFileSelectorPromptStr;
-
//-----------------------------------------------------------------------------
-// wxDirItemData
+// data
//-----------------------------------------------------------------------------
-class wxDirItemData : public wxTreeItemData
-{
-public:
- wxDirItemData(wxString& path, wxString& name);
- ~wxDirItemData();
- bool HasSubDirs();
- wxString *m_path, *m_name;
- bool m_isHidden;
- bool m_hasSubDirs;
-};
+WXDLLEXPORT_DATA(extern const wxChar*) wxFileSelectorPromptStr;
//-----------------------------------------------------------------------------
-// wxDirCtrl
+// classes
//-----------------------------------------------------------------------------
-class wxDirCtrl: public wxTreeCtrl
-{
- DECLARE_DYNAMIC_CLASS(wxDirCtrl)
-
- public:
- bool m_showHidden;
- wxTreeItemId m_rootId;
-
- wxDirCtrl(void);
- wxDirCtrl(wxWindow *parent, const wxWindowID id = -1,
- const wxString &dir = "/",
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- const long style = wxTR_HAS_BUTTONS,
- const wxString& name = "wxTreeCtrl" );
- void OnExpandItem( const wxTreeEvent &event );
- void OnCollapseItem( const wxTreeEvent &event );
- void ShowHidden( const bool yesno );
- DECLARE_EVENT_TABLE()
- protected:
- void CreateItems(const wxTreeItemId &parent);
- void SetupSections(void);
- wxArrayString m_paths, m_names;
-};
+class wxDirItemData;
+class wxDirCtrl;
+class wxDirDialog;
//-----------------------------------------------------------------------------
// wxDirDialog
public:
wxDirDialog(wxWindow *parent,
const wxString& message = wxFileSelectorPromptStr,
- const wxString& defaultPath = "",
+ const wxString& defaultPath = wxEmptyString,
long style = 0, const wxPoint& pos = wxDefaultPosition);
inline void SetMessage(const wxString& message) { m_message = message; }
inline void SetPath(const wxString& path) { m_path = path; }
int ShowModal();
void OnTreeSelected( wxTreeEvent &event );
- void OnTreeKeyDown( wxKeyEvent &event );
+ void OnTreeKeyDown( wxTreeEvent &event );
void OnSize(wxSizeEvent& event);
void OnOK(wxCommandEvent& event);
void OnCancel(wxCommandEvent& event);