/////////////////////////////////////////////////////////////////////////////
-// Name: dirctrlg.h
+// Name: wx/generic/dirctrlg.h
// Purpose: wxGenericDirCtrl class
// Builds on wxDirCtrl class written by Robert Roebling for the
// wxFile application, modified by Harm van der Heijden.
void OnCollapseItem(wxTreeEvent &event );
void OnBeginEditItem(wxTreeEvent &event );
void OnEndEditItem(wxTreeEvent &event );
+ void OnTreeSelChange(wxTreeEvent &event);
void OnSize(wxSizeEvent &event );
// Try to expand as much of the given path as possible.
// If the path string has been used (we're at the leaf), done is set to true
virtual wxTreeItemId FindChild(wxTreeItemId parentId, const wxString& path, bool& done);
+ wxString GetPath(wxTreeItemId itemId) const;
+
// Resize the components of the control
virtual void DoResize();
bool ExtractWildcard(const wxString& filterStr, int n, wxString& filter, wxString& description);
private:
+ void PopulateNode(wxTreeItemId node);
+ wxDirItemData* GetItemData(wxTreeItemId itemId);
+
bool m_showHidden;
wxTreeItemId m_rootId;
wxString m_defaultPath; // Starting path
wxDECLARE_NO_COPY_CLASS(wxGenericDirCtrl);
};
+wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_DIRCTRL_CHANGED, wxTreeEvent );
+
+#define wx__DECLARE_DIRCTRL_EVT(evt, id, fn) \
+ wx__DECLARE_EVT1(wxEVT_COMMAND_DIRCTRL_ ## evt, id, wxTreeEventHandler(fn))
+
+#define EVT_DIRCTRL_CHANGED(id, fn) wx__DECLARE_DIRCTRL_EVT(CHANGED, id, fn)
+
//-----------------------------------------------------------------------------
// wxDirFilterListCtrl
//-----------------------------------------------------------------------------