+class wxDirItemData : public wxTreeItemData
+{
+public:
+ wxDirItemData(wxString& path, wxString& name);
+ ~wxDirItemData();
+ bool HasSubDirs();
+ wxString *m_path, *m_name;
+ bool m_isHidden;
+ bool m_hasSubDirs;
+};
+
+//-----------------------------------------------------------------------------
+// wxDirCtrl
+//-----------------------------------------------------------------------------
+
+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(wxTreeEvent &event );
+ void OnCollapseItem(wxTreeEvent &event );
+ void ShowHidden( const bool yesno );
+ DECLARE_EVENT_TABLE()
+ protected:
+ void CreateItems(const wxTreeItemId &parent);
+ void SetupSections(void);
+ wxArrayString m_paths, m_names;
+};
+
+//-----------------------------------------------------------------------------
+// wxDirItemData
+//-----------------------------------------------------------------------------
+